Skip to content

Commit

Permalink
added more countries for short term
Browse files Browse the repository at this point in the history
  • Loading branch information
perco12 committed Sep 5, 2024
1 parent a45a1f1 commit 3ac72c1
Show file tree
Hide file tree
Showing 3 changed files with 92 additions and 4 deletions.
16 changes: 14 additions & 2 deletions .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,24 @@ jobs:
./.github/scripts/runServerV2.sh
- name: Run Playwright Modals
run: npx playwright test tests/playwright/tests/sdk/modals
- name: Run Playwright Messages (US)
- name: Run Playwright Messages (AU)
run: |
npx playwright test tests/playwright/tests/sdk/messages --grep @US
npx playwright test tests/playwright/tests/sdk/messages --grep @AU
- name: Run Playwright Messages (DE)
run: |
npx playwright test tests/playwright/tests/sdk/messages --grep @DE
- name: Run Playwright Messages (ES)
run: |
npx playwright test tests/playwright/tests/sdk/messages --grep @ES
- name: Run Playwright Messages (FR)
run: |
npx playwright test tests/playwright/tests/sdk/messages --grep @FR
- name: Run Playwright Messages (IT)
run: |
npx playwright test tests/playwright/tests/sdk/messages --grep @IT
- name: Run Playwright Messages (US)
run: |
npx playwright test tests/playwright/tests/sdk/messages --grep @US
- uses: actions/upload-artifact@v4
if: always()
with:
Expand Down
4 changes: 3 additions & 1 deletion tests/playwright/tests/sdk/messages/longTerm.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { messageTest } from '../../../pages/messages_fixture';

messageTest.describe('Long Term', () => {
messageTest.describe('@US Long Term', () => {
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();
Expand All @@ -16,6 +16,8 @@ messageTest.describe('Long Term', () => {
const messageIFrame = await loadMessage();
await runAxeCoreScan(messageIFrame, ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']);
});
});
messageTest.describe('@DE Long Term', () => {
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();
Expand Down
76 changes: 75 additions & 1 deletion tests/playwright/tests/sdk/messages/shortTerm.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,80 @@
import { messageTest } from '../../../pages/messages_fixture';

messageTest.describe('Short Term', () => {
messageTest.describe('@AU Short Term', () => {
messageTest('AU Message short term non qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
await navigatePage({ account: 'DEV_AU_SHORT_TERM', amount: 29, offer: 'PAY_LATER_SHORT_TERM' });
const messageIFrame = await loadMessage();
await runAxeCoreScan(messageIFrame, ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']);
});
messageTest('AU Message short term qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
await navigatePage({ account: 'DEV_AU_SHORT_TERM', amount: 100, offer: 'PAY_LATER_SHORT_TERM' });
const messageIFrame = await loadMessage();
await runAxeCoreScan(messageIFrame, ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']);
});
});
messageTest.describe('@ES Short Term', () => {
messageTest('ES Message short term non qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
await navigatePage({ account: 'DEV_ES_SHORT_TERM', amount: 29, offer: 'PAY_LATER_SHORT_TERM' });
const messageIFrame = await loadMessage();
await runAxeCoreScan(messageIFrame, ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']);
});
messageTest('ES Message short term qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
await navigatePage({ account: 'DEV_ES_SHORT_TERM', amount: 100, offer: 'PAY_LATER_SHORT_TERM' });
const messageIFrame = await loadMessage();
await runAxeCoreScan(messageIFrame, ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']);
});
});
messageTest.describe('@FR Short Term', () => {
messageTest('FR Message short term non qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
await navigatePage({ account: 'DEV_FR_SHORT_TERM', amount: 29, offer: 'PAY_LATER_SHORT_TERM' });
const messageIFrame = await loadMessage();
await runAxeCoreScan(messageIFrame, ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']);
});
messageTest('FR Message short term qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
await navigatePage({ account: 'DEV_FR_SHORT_TERM', amount: 100, offer: 'PAY_LATER_SHORT_TERM' });
const messageIFrame = await loadMessage();
await runAxeCoreScan(messageIFrame, ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']);
});
});
messageTest.describe('@GB Short Term', () => {
messageTest('GB Message short term non qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
await navigatePage({ account: 'DEV_GB_SHORT_TERM', amount: 29, offer: 'PAY_LATER_SHORT_TERM' });
const messageIFrame = await loadMessage();
await runAxeCoreScan(messageIFrame, ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']);
});
messageTest('GB Message short term qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
await navigatePage({ account: 'DEV_GB_SHORT_TERM', amount: 100, offer: 'PAY_LATER_SHORT_TERM' });
const messageIFrame = await loadMessage();
await runAxeCoreScan(messageIFrame, ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']);
});
messageTest('GB Message short term checkout qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
await navigatePage({ account: 'DEV_GB_SHORT_TERM_CHECKOUT', amount: 100, offer: 'PAY_LATER_SHORT_TERM' });
const messageIFrame = await loadMessage();
await runAxeCoreScan(messageIFrame, ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']);
});

messageTest(
'GB Message short term checkout non qualifying',
async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
await navigatePage({ account: 'DEV_GB_SHORT_TERM_CHECKOUT', amount: 29, offer: 'PAY_LATER_SHORT_TERM' });
const messageIFrame = await loadMessage();
await runAxeCoreScan(messageIFrame, ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']);
}
);
});
messageTest.describe('@IT Short Term', () => {
messageTest('IT Message short term non qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
await navigatePage({ account: 'DEV_IT_SHORT_TERM', amount: 29, offer: 'PAY_LATER_SHORT_TERM' });
const messageIFrame = await loadMessage();
await runAxeCoreScan(messageIFrame, ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']);
});
messageTest('IT Message short term qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
await navigatePage({ account: 'DEV_IT_SHORT_TERM', amount: 100, offer: 'PAY_LATER_SHORT_TERM' });
const messageIFrame = await loadMessage();
await runAxeCoreScan(messageIFrame, ['wcag2a', 'wcag2aa', 'wcag21a', 'wcag21aa']);
});
});
messageTest.describe('@US Short Term', () => {
messageTest('US Message short term non qualifying', async ({ navigatePage, loadMessage, runAxeCoreScan }) => {
await navigatePage({ account: 'DEV_US_SHORT_TERM', amount: 29, offer: 'PAY_LATER_SHORT_TERM' });
const messageIFrame = await loadMessage();
Expand Down

0 comments on commit 3ac72c1

Please sign in to comment.