diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index acb07cc9919..cc642dd9c6b 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -5,7 +5,7 @@ on: jobs: deploy: name: Deploy - runs-on: ubuntu-18.04 + runs-on: ubuntu-22.04 services: postgres: image: postgres:14 diff --git a/codeception/_support/AcceptanceTester.php b/codeception/_support/AcceptanceTester.php index 4c37722f331..291ff8aa428 100644 --- a/codeception/_support/AcceptanceTester.php +++ b/codeception/_support/AcceptanceTester.php @@ -101,6 +101,7 @@ public function logoutAsMember() { $I = $this; $I->amOnPage('/'); + $I->wait(1); $isLogin = $I->grabTextFrom('.ec-headerNaviRole .ec-headerNav .ec-headerNav__item:nth-child(3) a'); if ($isLogin == 'ログアウト') { $I->wait(1); diff --git a/codeception/_support/Page/Admin/AbstractAdminPageStyleGuide.php b/codeception/_support/Page/Admin/AbstractAdminPageStyleGuide.php index 3f8254df010..52eed9e6786 100644 --- a/codeception/_support/Page/Admin/AbstractAdminPageStyleGuide.php +++ b/codeception/_support/Page/Admin/AbstractAdminPageStyleGuide.php @@ -24,6 +24,7 @@ abstract class AbstractAdminPageStyleGuide extends AbstractAdminPage */ protected function atPage($pageTitle) { + $this->tester->wait(1); $this->tester->see($pageTitle, '.c-pageTitle'); return $this; diff --git a/codeception/_support/Page/Front/CartPage.php b/codeception/_support/Page/Front/CartPage.php index 056765a8f05..c09ece9a03f 100644 --- a/codeception/_support/Page/Front/CartPage.php +++ b/codeception/_support/Page/Front/CartPage.php @@ -38,11 +38,13 @@ public static function at($I) public function 商品名($index) { + $this->tester->waitForElementVisible(['xpath' => "//div[@class='ec-cartRole']//ul[@class='ec-cartRow'][position()=${index}]//div[@class='ec-cartRow__name']"]); return $this->tester->grabTextFrom(['xpath' => "//div[@class='ec-cartRole']//ul[@class='ec-cartRow'][position()=${index}]//div[@class='ec-cartRow__name']"]); } public function 商品数量($index) { + $this->tester->waitForElementVisible(['xpath' => "//div[@class='ec-cartRole']//ul[@class='ec-cartRow'][position()=${index}]//div[@class='ec-cartRow__amount']"]); return $this->tester->grabTextFrom(['xpath' => "//div[@class='ec-cartRole']//ul[@class='ec-cartRow'][position()=${index}]//div[@class='ec-cartRow__amount']"]); } @@ -53,6 +55,7 @@ public function 明細数() public function 商品数量増やす($index) { + $this->tester->waitForElementVisible(['xpath' => "//div[@class='ec-cartRole']//ul[@class='ec-cartRow'][position()=${index}]//div[@class='ec-cartRow__amountUpDown']/a[contains(@class, 'ec-cartRow__amountUpButton')]"]); $this->tester->click(['xpath' => "//div[@class='ec-cartRole']//ul[@class='ec-cartRow'][position()=${index}]//div[@class='ec-cartRow__amountUpDown']/a[contains(@class, 'ec-cartRow__amountUpButton')]"]); return $this; @@ -60,6 +63,7 @@ public function 商品数量増やす($index) public function 商品数量減らす($index) { + $this->tester->waitForElementVisible(['xpath' => "//div[@class='ec-cartRole']//ul[@class='ec-cartRow'][position()=${index}]//div[@class='ec-cartRow__amountUpDown']/a[contains(@class, 'ec-cartRow__amountDownButton')]"]); $this->tester->click(['xpath' => "//div[@class='ec-cartRole']//ul[@class='ec-cartRow'][position()=${index}]//div[@class='ec-cartRow__amountUpDown']/a[contains(@class, 'ec-cartRow__amountDownButton')]"]); return $this; @@ -67,6 +71,7 @@ public function 商品数量減らす($index) public function 商品削除($index) { + $this->tester->waitForElementVisible(['xpath' => "//div[@class='ec-cartRole']//ul[@class='ec-cartRow'][position()=${index}]//li[@class='ec-cartRow__delColumn']/a"]); $this->tester->click(['xpath' => "//div[@class='ec-cartRole']//ul[@class='ec-cartRow'][position()=${index}]//li[@class='ec-cartRow__delColumn']/a"]); $this->tester->acceptPopup(); diff --git a/codeception/_support/Page/Front/ProductListPage.php b/codeception/_support/Page/Front/ProductListPage.php index 233d76d6a78..c9dd89b0405 100644 --- a/codeception/_support/Page/Front/ProductListPage.php +++ b/codeception/_support/Page/Front/ProductListPage.php @@ -30,6 +30,7 @@ public function __construct(\AcceptanceTester $I) public function 表示件数設定($num) { + $this->tester->waitForElementVisible(['css' => "select[name = 'disp_number']"]); $this->tester->selectOption(['css' => "select[name = 'disp_number']"], "${num}件"); return $this; @@ -37,6 +38,7 @@ public function 表示件数設定($num) public function 表示順設定($sort) { + $this->tester->waitForElementVisible(['css' => "select[name = 'orderby']"]); $this->tester->selectOption(['css' => "select[name = 'orderby']"], $sort); return $this; diff --git a/codeception/acceptance/EF02ProductCest.php b/codeception/acceptance/EF02ProductCest.php index 84b3a16b329..51fe914b188 100644 --- a/codeception/acceptance/EF02ProductCest.php +++ b/codeception/acceptance/EF02ProductCest.php @@ -100,6 +100,7 @@ public function product_商品一覧表示件数(AcceptanceTester $I) // 表示件数の選択リストを変更する $listPage->表示件数設定(40); + $I->wait(1); // 変更された表示件数分が1画面に表示される $expected = ($productNum >= 40) ? 40 : $productNum;