| 1 | <?php |
||
| 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 |