Skip to content

Commit

Permalink
E2Eテストを追加
Browse files Browse the repository at this point in the history
  • Loading branch information
matsuoshi committed Feb 19, 2021
1 parent 5d27b22 commit b381e9e
Showing 1 changed file with 30 additions and 0 deletions.
30 changes: 30 additions & 0 deletions codeception/acceptance/EF01TopCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
*/

use Codeception\Util\Fixtures;
use Page\Front\ProductDetailPage;
use Page\Front\TopPage;

/**
Expand Down Expand Up @@ -179,4 +180,33 @@ public function topページ_キーワード絞込検索(\AcceptanceTester $I)
$I->dontSee('チェリーアイスサンド', '.ec-topicpath');
$I->see('彩のジェラートCUBE', '.ec-shelfGrid');
}

public function topページ_最近チェックした商品(\AcceptanceTester $I)
{
$I->wantTo('EF0101-UC04-T01 TOPページ 最近チェックした商品ブロック');

// 商品1 にアクセス
// 初期状態では、最近チェックした商品ブロックは表示されない
ProductDetailPage::go($I, 1);
$I->dontsee('最近チェックしたアイテム', '.ec-layoutRole__contentBottom');

// 商品2 にアクセス
// 商品1 が、最近チェックした商品として表示されていることを確認
ProductDetailPage::go($I, 2);
$I->see('最近チェックしたアイテム', '.ec-layoutRole__contentBottom');
$I->see('彩のジェラートCUBE', '#ex-block-browsingHistory');

// 商品1 にアクセス
// 商品2 が、最近チェックした商品として表示されていることを確認
// 商品1 は表示されないことを確認 (閲覧中ページと同じ商品は表示しない)
ProductDetailPage::go($I, 1);
$I->see('チェリーアイスサンド', '#ex-block-browsingHistory');
$I->dontsee('彩のジェラートCUBE', '#ex-block-browsingHistory');

// TOP にアクセス
// 商品1と2 が、最近チェックした商品として表示されていることを確認
TopPage::go($I);
$I->see('彩のジェラートCUBE', '#ex-block-browsingHistory');
$I->see('チェリーアイスサンド', '#ex-block-browsingHistory');
}
}

0 comments on commit b381e9e

Please sign in to comment.