From 3ac72c187b83746b6aaffd60e64acacffc07042e Mon Sep 17 00:00:00 2001 From: perco12 Date: Thu, 5 Sep 2024 15:17:20 -0500 Subject: [PATCH] added more countries for short term --- .github/workflows/playwright.yml | 16 +++- .../tests/sdk/messages/longTerm.spec.js | 4 +- .../tests/sdk/messages/shortTerm.spec.js | 76 ++++++++++++++++++- 3 files changed, 92 insertions(+), 4 deletions(-) diff --git a/.github/workflows/playwright.yml b/.github/workflows/playwright.yml index de0da82ad9..8c44d2acda 100644 --- a/.github/workflows/playwright.yml +++ b/.github/workflows/playwright.yml @@ -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: diff --git a/tests/playwright/tests/sdk/messages/longTerm.spec.js b/tests/playwright/tests/sdk/messages/longTerm.spec.js index 654a04d338..a3383a9416 100644 --- a/tests/playwright/tests/sdk/messages/longTerm.spec.js +++ b/tests/playwright/tests/sdk/messages/longTerm.spec.js @@ -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(); @@ -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(); diff --git a/tests/playwright/tests/sdk/messages/shortTerm.spec.js b/tests/playwright/tests/sdk/messages/shortTerm.spec.js index 76eae64f1c..986dc7bd0c 100644 --- a/tests/playwright/tests/sdk/messages/shortTerm.spec.js +++ b/tests/playwright/tests/sdk/messages/shortTerm.spec.js @@ -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();