Skip to content

Commit

Permalink
add DE messages
Browse files Browse the repository at this point in the history
  • Loading branch information
perco12 committed Sep 3, 2024
1 parent a40a76c commit bb029a6
Show file tree
Hide file tree
Showing 3 changed files with 46 additions and 9 deletions.
7 changes: 6 additions & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,11 @@ jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest

strategy:
matrix:
countries: [US,DE]

steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -25,7 +30,7 @@ jobs:
- name: Run Playwright Modals
run: npx playwright test tests/playwright/tests/sdk/modals
- name: Run Playwright Messages
run: npx playwright test tests/playwright/tests/sdk/messages
run: npx playwright test tests/playwright/tests/sdk/messages -- --grep @${{matrix.countries}}
- uses: actions/upload-artifact@v4
if: always()
with:
Expand Down
16 changes: 13 additions & 3 deletions tests/playwright/tests/sdk/messages/longTerm.spec.js
Original file line number Diff line number Diff line change
@@ -1,19 +1,29 @@
import { messageTest } from '../../../pages/messages_fixture';

messageTest.describe('Long Term', () => {
messageTest('US Message long term non qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
messageTest('@US Message long term non qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
await navigatePage({ account: 'DEV_US_LONG_TERM', amount: 29, offer: 'PAY_LATER_LONG_TERM' });
const messageIFrame = await loadMessage();
await runAxeCoreScan(messageIFrame, ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']);
});
messageTest('US Message long term qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
messageTest('@US Message long term qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
await navigatePage({ account: 'DEV_US_LONG_TERM', amount: 100, offer: 'PAY_LATER_LONG_TERM' });
const messageIFrame = await loadMessage();
await runAxeCoreScan(messageIFrame, ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']);
});
messageTest('US Message long term checkout', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
messageTest('@US Message long term checkout', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
await navigatePage({ account: 'DEV_US_LONG_TERM_CHECKOUT', amount: 100, offer: 'PAY_LATER_LONG_TERM' });
const messageIFrame = await loadMessage();
await runAxeCoreScan(messageIFrame, ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']);
});
messageTest('@DE Message long term qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
await navigatePage({ account: 'DEV_DE_LONG_TERM', amount: 100, offer: 'PAY_LATER_LONG_TERM' });
const messageIFrame = await loadMessage();
await runAxeCoreScan(messageIFrame, ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']);
});
messageTest('@DE Message long term non qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
await navigatePage({ account: 'DEV_DE_LONG_TERM', amount: 29, offer: 'PAY_LATER_LONG_TERM' });
const messageIFrame = await loadMessage();
await runAxeCoreScan(messageIFrame, ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']);
});
});
32 changes: 27 additions & 5 deletions tests/playwright/tests/sdk/messages/multi.spec.js
Original file line number Diff line number Diff line change
@@ -1,33 +1,55 @@
import { messageTest } from '../../../pages/messages_fixture';

messageTest.describe('Multi Messages', () => {
messageTest('US long term non qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
messageTest('@US long term non qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
await navigatePage({ account: 'DEV_US_MULTI', amount: 20001, offer: 'PAY_LATER_LONG_TERM' });
const messageIframe = await loadMessage();
await runAxeCoreScan(messageIframe, ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']);
});

messageTest('US long term qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
messageTest('@US long term qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
await navigatePage({ account: 'DEV_US_MULTI', amount: 1501, offer: 'PAY_LATER_LONG_TERM' });
const messageIframe = await loadMessage();
await runAxeCoreScan(messageIframe, ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']);
});

messageTest('US product list', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
messageTest('@US product list', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
await navigatePage({ account: 'DEV_US_MULTI', amount: 200, offer: '' });
const messageIframe = await loadMessage();
await runAxeCoreScan(messageIframe, ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']);
});

messageTest('US short term non qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
messageTest('@US short term non qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
await navigatePage({ account: 'DEV_US_MULTI', amount: 29, offer: 'PAY_LATER_SHORT_TERM' });
const messageIframe = await loadMessage();
await runAxeCoreScan(messageIframe, ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']);
});

messageTest('US short term qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
messageTest('@US short term qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
await navigatePage({ account: 'DEV_US_MULTI', amount: 200, offer: 'PAY_LATER_SHORT_TERM' });
const messageIframe = await loadMessage();
await runAxeCoreScan(messageIframe, ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']);
});
// DE
messageTest('@DE multi qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
await navigatePage({ account: 'DEV_DE_MULTI', amount: 200, offer: 'PAY_LATER_SHORT_TERM' });
const messageIframe = await loadMessage();
await runAxeCoreScan(messageIframe, ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']);
});

messageTest('@DE multi non qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
await navigatePage({ account: 'DEV_DE_MULTI', amount: 29, offer: 'PAY_LATER_SHORT_TERM' });
const messageIframe = await loadMessage();
await runAxeCoreScan(messageIframe, ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']);
});
messageTest('@DE pay in 1 qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
await navigatePage({ account: 'DEV_DE_MULTI', amount: 200, offer: 'PAY_LATER_PAY_IN_1' });
const messageIframe = await loadMessage();
await runAxeCoreScan(messageIframe, ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']);
});
messageTest('@DE pay in 1 non qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
await navigatePage({ account: 'DEV_DE_MULTI', amount: 1001.1, offer: 'PAY_LATER_PAY_IN_1' });
const messageIframe = await loadMessage();
await runAxeCoreScan(messageIframe, ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']);
});
});

0 comments on commit bb029a6

Please sign in to comment.