diff --git a/codeception/_support/Page/Admin/ClassCategoryManagePage.php b/codeception/_support/Page/Admin/ClassCategoryManagePage.php index bf80f1c63a..829d9631d9 100644 --- a/codeception/_support/Page/Admin/ClassCategoryManagePage.php +++ b/codeception/_support/Page/Admin/ClassCategoryManagePage.php @@ -87,7 +87,7 @@ public function acceptModal() public function CSVダウンロード実行() { - $this->tester->click('body > div > div.c-contentsArea > div.c-outsideBlock > div > div > div.col-6.text-end > div > a:nth-child(1)'); + $this->tester->click('div > div.c-contentsArea > div.c-contentsArea__cols > div.c-contentsArea__primaryCol > div > div.c-outsideBlock > div > div > div > div > a:nth-child(1)'); return $this; } diff --git a/codeception/_support/Page/Admin/ClassNameManagePage.php b/codeception/_support/Page/Admin/ClassNameManagePage.php index 29660603cc..99d60c5807 100644 --- a/codeception/_support/Page/Admin/ClassNameManagePage.php +++ b/codeception/_support/Page/Admin/ClassNameManagePage.php @@ -112,7 +112,7 @@ public function acceptModal() public function CSVダウンロード実行() { - $this->tester->click('body > div > div.c-contentsArea > div.c-outsideBlock > div > div > div.col-6.text-end > div > a:nth-child(1)'); + $this->tester->click('div > div.c-contentsArea > div.c-outsideBlock > div > div > div > div > a:nth-child(1)'); return $this; } diff --git a/codeception/acceptance/EA03ProductCest.php b/codeception/acceptance/EA03ProductCest.php index 5db3e4562a..fbd2435fee 100644 --- a/codeception/acceptance/EA03ProductCest.php +++ b/codeception/acceptance/EA03ProductCest.php @@ -637,6 +637,16 @@ public function product_規格表示順の変更(AcceptanceTester $I) $I->see('フレーバー', $ProductClassPage->一覧_名称(4)); } + public function product_規格CSVダウンロード(AcceptanceTester $I) + { + $I->wantTo('EA0303-UC05-T01 規格CSVダウンロード'); + + ClassNameManagePage::go($I)->CSVダウンロード実行(); + + $file = $I->getLastDownloadFile('/^class_name_\d{14}\.csv$/'); + $I->assertTrue(file_exists($file)); + } + public function product_分類表示順の変更(AcceptanceTester $I) { $I->wantTo('EA0311-UC01-T01 分類表示順の変更'); @@ -707,6 +717,17 @@ public function product_分類登録(AcceptanceTester $I) $I->see('削除しました', ClassCategoryManagePage::$登録完了メッセージ); } + public function product_分類CSVダウンロード(AcceptanceTester $I) + { + $I->wantTo('EA0304-UC04-T01 分類CSVダウンロード'); + + ClassNameManagePage::go($I)->一覧_分類登録(3); + ClassCategoryManagePage::at($I)->CSVダウンロード実行(); + + $file = $I->getLastDownloadFile('/^class_category_\d{14}\.csv$/'); + $I->assertTrue(file_exists($file)); + } + public function product_カテゴリ登録(AcceptanceTester $I) { $I->wantTo('EA0305-UC01-T01(& UC01-T02/UC02-T01/UC02-T02/UC04-T01/UC04-T02) カテゴリ登録/編集/削除');