Skip to content

Commit

Permalink
テスト追加
Browse files Browse the repository at this point in the history
  • Loading branch information
chihiro-adachi committed Apr 22, 2024
1 parent b96255f commit b8966cf
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
2 changes: 1 addition & 1 deletion codeception/_support/Page/Admin/ClassNameManagePage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down
21 changes: 21 additions & 0 deletions codeception/acceptance/EA03ProductCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 分類表示順の変更');
Expand Down Expand Up @@ -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) カテゴリ登録/編集/削除');
Expand Down

0 comments on commit b8966cf

Please sign in to comment.