| 1 | <?php |
||
| 7 | class PageManagePage extends AbstractAdminPageStyleGuide |
||
| 8 | { |
||
| 9 | |||
| 10 | /** |
||
| 11 | * PageManagePage constructor. |
||
| 12 | */ |
||
| 13 | public function __construct(\AcceptanceTester $I) |
||
| 14 | { |
||
| 15 | parent::__construct($I); |
||
| 16 | } |
||
| 17 | |||
| 18 | public static function go($I) |
||
| 19 | { |
||
| 20 | $page = new self($I); |
||
| 21 | return $page->goPage('/content/page', 'ページ管理コンテンツ管理'); |
||
| 22 | } |
||
| 23 | |||
| 24 | public function 新規入力() |
||
| 25 | { |
||
| 26 | $this->tester->click(['xpath' => '//a[text()="新規追加"]']); |
||
| 27 | } |
||
| 28 | |||
| 29 | public function ページ編集($pageName) |
||
| 30 | { |
||
| 31 | $this->tester->click(['xpath' => sprintf('//a[text()="%s"]', $pageName)]); |
||
| 32 | } |
||
| 33 | |||
| 34 | public function 削除($pageName) |
||
| 35 | { |
||
| 36 | $this->tester->click(['xpath'=> "//*[@id='list_page_tbl']/tbody/tr/td/a[contains(text(), '${pageName}')]/parent::node()/parent::node()/td[@class='align-middle pr-3']/div/div/a"]); |
||
| 37 | $this->accept_削除($pageName); |
||
| 38 | } |
||
| 39 | |||
| 40 | public function accept_削除($pageName) { |
||
| 41 | $this->tester->waitForElementVisible(['xpath' => "//*[@id='list_page_tbl']/tbody/tr/td/a[contains(text(), '${pageName}')]/parent::node()/parent::node()/td[@class='align-middle pr-3']/div/div/div[contains(@class, 'modal')]"]); |
||
| 42 | $this->tester->click(['xpath' => "//*[@id='list_page_tbl']/tbody/tr/td/a[contains(text(), '${pageName}')]/parent::node()/parent::node()/td[@class='align-middle pr-3']/div/div/div[contains(@class, 'modal')]/div/div/div/a[contains(@class, 'btn-ec-delete')]"]); |
||
| 43 | } |
||
| 44 | } |