Completed
Push — apply-codeceptions ( 341052...a29855 )
by Kentaro
53:23 queued 21:51
created

BlockEditPage::入力_データ()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
nc 1
nop 1
dl 0
loc 6
rs 10
c 0
b 0
f 0
1
<?php
2
3
4
namespace Page\Admin;
5
6
7
class BlockEditPage extends AbstractAdminPageStyleGuide
8
{
9
    public static $登録完了メッセージ = 'body > div.c-container > div.c-contentsArea > div.alert.alert-success.alert-dismissible.fade.show.m-3 > span';
10
11
    /**
12
     * BlockEditPage constructor.
13
     */
14
    public function __construct(\AcceptanceTester $I)
15
    {
16
        parent::__construct($I);
17
    }
18
19
    public static function at($I)
20
    {
21
        $page = new self($I);
22
        $page->atPage('ブロック管理コンテンツ管理');
23
        $page->tester->see('ブロック編集', '#content_block_form > div.c-contentsArea__cols > div > div > div > div.card-header > div > div.col-8 > span');
24
        return $page;
25
    }
26
27
    public function 入力_ブロック名($value)
28
    {
29
        $this->tester->fillField(['id' => 'block_name'], $value);
30
        return $this;
31
    }
32
33
    public function 入力_ファイル名($value)
34
    {
35
        $this->tester->fillField(['id' => 'block_file_name'], $value);
36
        return $this;
37
    }
38
39
    public function 入力_データ($value)
40
    {
41
        $value = preg_replace("/([^\\\])'/", "$1\\'", $value);
42
        $this->tester->executeJS("ace.edit('editor').setValue('$value')");
43
        return $this;
44
    }
45
46
    public function 登録()
47
    {
48
        $this->tester->click('#content_block_form > div.c-conversionArea > div > div > div:nth-child(2) > div > div > button');
49
        return $this;
50
    }
51
}
52