diff --git a/codeception/_support/Page/Admin/ShopSettingPage.php b/codeception/_support/Page/Admin/ShopSettingPage.php index 292e2f0912..9ed7a72423 100644 --- a/codeception/_support/Page/Admin/ShopSettingPage.php +++ b/codeception/_support/Page/Admin/ShopSettingPage.php @@ -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; } } diff --git a/codeception/acceptance/EA07BasicinfoCest.php b/codeception/acceptance/EA07BasicinfoCest.php index 9637200b36..7435cfb1a2 100644 --- a/codeception/acceptance/EA07BasicinfoCest.php +++ b/codeception/acceptance/EA07BasicinfoCest.php @@ -1065,4 +1065,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'); + + } }