| 1 | <?php |
||
| 7 | class PageEditPage extends AbstractAdminPageStyleGuide |
||
| 8 | { |
||
| 9 | |||
| 10 | public static $登録完了メッセージ = ['xpath' => "//div[@class='alert alert-success alert-dismissible fade show m-3']"]; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * PageNewPage constructor. |
||
| 14 | */ |
||
| 15 | public function __construct(\AcceptanceTester $I) |
||
| 16 | { |
||
| 17 | parent::__construct($I); |
||
| 18 | } |
||
| 19 | |||
| 20 | public static function at($I) |
||
| 21 | { |
||
| 22 | $page = new self($I); |
||
| 23 | $page->atPage('ページ管理コンテンツ管理'); |
||
| 24 | $page->tester->see('ページ詳細編集', '#content_page_form > div.c-contentsArea__cols > div > div > div:nth-child(1) > div.card-header > div > div.col-8 > span'); |
||
| 25 | return $page; |
||
| 26 | } |
||
| 27 | |||
| 28 | public function 入力_名称($value) |
||
| 29 | { |
||
| 30 | $this->tester->fillField(['id' => 'main_edit_name'], $value); |
||
| 31 | return $this; |
||
| 32 | } |
||
| 33 | |||
| 34 | public function 入力_URL($value) |
||
| 35 | { |
||
| 36 | $this->tester->fillField(['id' => 'main_edit_url'], $value); |
||
| 37 | return $this; |
||
| 38 | } |
||
| 39 | |||
| 40 | public function 入力_ファイル名($value) |
||
| 41 | { |
||
| 42 | $this->tester->fillField(['id' => 'main_edit_file_name'], $value); |
||
| 43 | return $this; |
||
| 44 | } |
||
| 45 | |||
| 46 | public function 入力_内容($value) |
||
| 47 | { |
||
| 48 | $value = preg_replace("/([^\\\])'/", "$1\\'", $value); |
||
| 49 | $this->tester->executeJS("ace.edit('editor').setValue('$value')"); |
||
| 50 | return $this; |
||
| 51 | } |
||
| 52 | |||
| 53 | public function 入力_PC用レイアウト($layoutName) |
||
| 54 | { |
||
| 55 | $this->tester->selectOption(['id' => 'main_edit_PcLayout'], $layoutName); |
||
| 56 | return $this; |
||
| 57 | } |
||
| 58 | |||
| 59 | public function 登録() |
||
| 60 | { |
||
| 61 | $this->tester->click(['xpath' => '//button/span[text()="登録"]']); |
||
| 62 | } |
||
| 63 | } |