Skip to content

Commit

Permalink
エラーハンドリングのE2Eテスト追加
Browse files Browse the repository at this point in the history
see #536
  • Loading branch information
nanasess committed Mar 29, 2022
1 parent 50b108b commit 3ff4360
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions e2e-tests/test/front_login/contact.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,4 +134,16 @@ test.describe.serial('お問い合わせページのテストをします', () =
.then(alerts => expect(alerts).toEqual([]));
});
});

/**
* https://github.com/EC-CUBE/ec-cube2/pull/536 のE2Eテスト
*/
test('ラーメッセージの表示を確認します', async () => {
await page.goto(PlaywrightConfig.use.baseURL); // ログアウトしてしまう場合があるので一旦トップへ遷移する
await page.goto(url);
await page.click('input[name=confirm]');
await page.pause();
await expect(page.locator('span.attention >> nth=13')).toContainText('※ お問い合わせ内容が入力されていません。');
await expect(page.locator('textarea[name=contents]')).toHaveAttribute('style', 'background-color:#ffe8e8; ime-mode: active;');
});
});

0 comments on commit 3ff4360

Please sign in to comment.