Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add E2E test for GA tag. #6191

Merged
merged 3 commits into from
May 15, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions codeception/_support/Page/Admin/ShopSettingPage.php
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,12 @@ public function 設定_在庫切れ商品の非表示($value)
}
$checked = $this->tester->grabAttributeFrom('#shop_master_option_nostock_hidden', 'checked');

return $this;
}
public function 入力_GAタグ($value)
{
$this->tester->fillField(['id' => 'shop_master_ga_id'], $value);

return $this;
}
}
22 changes: 22 additions & 0 deletions codeception/acceptance/EA07BasicinfoCest.php
Original file line number Diff line number Diff line change
Expand Up @@ -1017,4 +1017,26 @@ public function basicinfo_税設定_適格請求書発行事業者登録番号(A

$I->getScenario()->incomplete('SJISの納品書を確認することが困難なため未実装');
}

/**
* @group vaddy
* @group basicsetting
*/
public function basicinfo_GAタグ設定(AcceptanceTester $I)
{
$I->wantTo('EA0714-UC01-T01 GAタグ設定');

// GAタグ設定
$page = ShopSettingPage::go($I)
->入力_GAタグ('UA-12345678-1');
$I->wait(1);
$page->登録();

$I->waitForText('保存しました', 10, ShopSettingPage::$登録完了メッセージ);

// GAタグが設定されているか
$I->amOnPage('/');
$I->seeInPageSource('https://www.googletagmanager.com/gtag/js?id=UA-12345678-1');

}
}
Loading