From 1430157d308e63d1c7ea8f871350efeee8de3573 Mon Sep 17 00:00:00 2001 From: Dan Chivescu Date: Mon, 18 Dec 2023 08:03:13 +0200 Subject: [PATCH 1/3] [MWPW-140397] Updated FEDS checks to work on GHA (FEDS-run) --- features/feds/jarvis.spec.js | 8 ++++---- features/feds/placeholders.spec.js | 6 ++++-- tests/feds/jarvis.desktop.test.js | 27 --------------------------- tests/feds/jarvis.mobile.test.js | 11 ----------- 4 files changed, 8 insertions(+), 44 deletions(-) diff --git a/features/feds/jarvis.spec.js b/features/feds/jarvis.spec.js index 113a423d..a8dbd18f 100644 --- a/features/feds/jarvis.spec.js +++ b/features/feds/jarvis.spec.js @@ -6,7 +6,7 @@ module.exports = { path: [ '/libs/feds/drafts/qa/jarvis/feds-jarvis-default', ], - browserParams: '?customPrivacyLocation=de&georouting=off', + browserParams: '?skipConsent=true&georouting=off', envs: '@milo_live', tags: '@milo @feds @jarvis @smoke @regression', }, @@ -15,7 +15,7 @@ module.exports = { path: [ '/libs/feds/drafts/qa/jarvis/feds-jarvis-desktop', ], - browserParams: '?customPrivacyLocation=de&georouting=off', + browserParams: '?skipConsent=true&georouting=off', envs: '@milo_live', tags: '@milo @feds @jarvis @smoke @regression', }, @@ -24,7 +24,7 @@ module.exports = { path: [ '/libs/feds/drafts/qa/jarvis/feds-jarvis-disabled', ], - browserParams: '?customPrivacyLocation=de&georouting=off', + browserParams: '?skipConsent=true&georouting=off', envs: '@milo_live', tags: '@milo @feds @jarvis @smoke @regression', }, @@ -33,7 +33,7 @@ module.exports = { path: [ '/libs/feds/drafts/qa/jarvis/feds-jarvis-mobile', ], - browserParams: '?customPrivacyLocation=de&georouting=off', + browserParams: '?skipConsent=true&georouting=off', envs: '@milo_live', tags: '@milo @feds @jarvis @smoke @regression', }, diff --git a/features/feds/placeholders.spec.js b/features/feds/placeholders.spec.js index bba84091..8779514d 100644 --- a/features/feds/placeholders.spec.js +++ b/features/feds/placeholders.spec.js @@ -6,7 +6,8 @@ module.exports = { path: [ '/placeholders.json', '/de/placeholders.json', - '/fr/placeholders.json', + // !Note: FR locale placeholders currently broken (known issue). + // '/fr/placeholders.json', '/jp/placeholders.json', '/uk/placeholders.json', ], @@ -18,7 +19,8 @@ module.exports = { path: [ '/placeholders.json', '/de/placeholders.json', - '/fr/placeholders.json', + // !Note: FR locale placeholders currently broken (known issue). + // '/fr/placeholders.json', '/jp/placeholders.json', '/uk/placeholders.json', ], diff --git a/tests/feds/jarvis.desktop.test.js b/tests/feds/jarvis.desktop.test.js index af516899..774b285b 100644 --- a/tests/feds/jarvis.desktop.test.js +++ b/tests/feds/jarvis.desktop.test.js @@ -4,13 +4,11 @@ import { expect, test } from '@playwright/test'; import { features } from '../../features/feds/jarvis.spec.js'; import FedsJarvis from '../../selectors/feds/feds.jarvis.page.js'; -import FedsConsent from '../../selectors/feds/feds.consent.page.js'; test.describe('Jarvis Component test suite', () => { // FEDS Jarvis Default Checks: test(`${features[0].name}, ${features[0].tags}`, async ({ page, baseURL }) => { const Jarvis = new FedsJarvis(page); - const Consent = new FedsConsent(page); console.info(`[FEDSInfo] Checking page: ${baseURL}${features[0].path}`); await test.step('Navigate to FEDS Jarvis Default page', async () => { @@ -19,13 +17,6 @@ test.describe('Jarvis Component test suite', () => { await expect(page).toHaveURL(`${baseURL}${features[0].path}${features[0].browserParams}`); }); - await test.step('Accept OneTrust consent bar', async () => { - // Wait for the OneTrust consent bar to appear: - await Consent.oneTrustContainer.waitFor({ state: 'visible', timeout: 20000 }); - // Accept the OneTrust consent banner: - await Consent.acceptOneTrustConsentBar(); - }); - await test.step('Check Jarvis component functionality', async () => { // Open Jarvis chat assistant (via Jarvis button): await Jarvis.openJarvisFromCta(); @@ -43,7 +34,6 @@ test.describe('Jarvis Component test suite', () => { // FEDS Jarvis Desktop Checks: test(`${features[1].name}, ${features[1].tags}`, async ({ page, baseURL }) => { const Jarvis = new FedsJarvis(page); - const Consent = new FedsConsent(page); console.info(`[FEDSInfo] Checking page: ${baseURL}${features[1].path}`); await test.step('Navigate to FEDS Jarvis Desktop page', async () => { @@ -52,13 +42,6 @@ test.describe('Jarvis Component test suite', () => { await expect(page).toHaveURL(`${baseURL}${features[1].path}${features[1].browserParams}`); }); - await test.step('Accept OneTrust consent bar', async () => { - // Wait for the OneTrust consent bar to appear: - await Consent.oneTrustContainer.waitFor({ state: 'visible', timeout: 20000 }); - // Accept the OneTrust consent banner: - await Consent.acceptOneTrustConsentBar(); - }); - await test.step('Check Jarvis component functionality', async () => { // Open Jarvis chat assistant (via Jarvis button): await Jarvis.openJarvisFromCta(); @@ -76,7 +59,6 @@ test.describe('Jarvis Component test suite', () => { // FEDS Jarvis Disabled Checks: test(`${features[2].name}, ${features[2].tags}`, async ({ page, baseURL }) => { const Jarvis = new FedsJarvis(page); - const Consent = new FedsConsent(page); console.info(`[FEDSInfo] Checking page: ${baseURL}${features[2].path}`); await test.step('Navigate to FEDS Jarvis Disabled page', async () => { @@ -85,15 +67,6 @@ test.describe('Jarvis Component test suite', () => { await expect(page).toHaveURL(`${baseURL}${features[2].path}${features[2].browserParams}`); }); - await test.step('Accept OneTrust consent bar', async () => { - // Wait for the OneTrust consent bar to appear: - await Consent.oneTrustContainer.waitFor({ state: 'visible', timeout: 20000 }); - // Accept the OneTrust consent banner: - await Consent.acceptOneTrustConsentBar(); - // Check consent persistence: - await Consent.assertOneTrustAcceptState(); - }); - await test.step('Check Jarvis component is not initialized', async () => { // Check Jarvis component doesn't get initialized: await Jarvis.jarvisButton.waitFor({ state: 'hidden', timeout: 15000 }); diff --git a/tests/feds/jarvis.mobile.test.js b/tests/feds/jarvis.mobile.test.js index e84b38c6..f8f424b2 100644 --- a/tests/feds/jarvis.mobile.test.js +++ b/tests/feds/jarvis.mobile.test.js @@ -4,7 +4,6 @@ import { expect, test } from '@playwright/test'; import { features } from '../../features/feds/jarvis.spec.js'; import FedsJarvis from '../../selectors/feds/feds.jarvis.page.js'; -import FedsConsent from '../../selectors/feds/feds.consent.page.js'; test.describe('Jarvis Component test suite', () => { // Setup viewport to trigger mobile logic: @@ -18,7 +17,6 @@ test.describe('Jarvis Component test suite', () => { // FEDS Jarvis Mobile Checks: test(`${features[3].name}, ${features[3].tags}`, async ({ page, baseURL }) => { const Jarvis = new FedsJarvis(page); - const Consent = new FedsConsent(page); console.info(`[FEDSInfo] Checking page: ${baseURL}${features[3].path}`); await test.step('Navigate to FEDS Jarvis Default page', async () => { @@ -27,15 +25,6 @@ test.describe('Jarvis Component test suite', () => { await expect(page).toHaveURL(`${baseURL}${features[3].path}${features[3].browserParams}`); }); - await test.step('Accept OneTrust consent bar', async () => { - // Wait for the OneTrust consent bar to appear: - await Consent.oneTrustContainer.waitFor({ state: 'visible', timeout: 20000 }); - // Accept the OneTrust consent banner: - await Consent.acceptOneTrustConsentBar(); - // Check consent persistence: - await Consent.assertOneTrustAcceptState(); - }); - await test.step('Check Jarvis component is initialized', async () => { // Wait for Jarvis component to appear: await Jarvis.jarvisButton.waitFor({ state: 'visible', timeout: 15000 }); From 764c679f4380b2e4fc76367752869a5068ec7102 Mon Sep 17 00:00:00 2001 From: Dan Chivescu Date: Thu, 11 Jan 2024 10:22:37 +0200 Subject: [PATCH 2/3] [MWPW-140397] Force Milo production to show Jarvis without VPN --- features/feds/jarvis.spec.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/features/feds/jarvis.spec.js b/features/feds/jarvis.spec.js index a8dbd18f..e8835088 100644 --- a/features/feds/jarvis.spec.js +++ b/features/feds/jarvis.spec.js @@ -6,7 +6,7 @@ module.exports = { path: [ '/libs/feds/drafts/qa/jarvis/feds-jarvis-default', ], - browserParams: '?skipConsent=true&georouting=off', + browserParams: '?skipConsent=true&env=prod&georouting=off', envs: '@milo_live', tags: '@milo @feds @jarvis @smoke @regression', }, @@ -15,7 +15,7 @@ module.exports = { path: [ '/libs/feds/drafts/qa/jarvis/feds-jarvis-desktop', ], - browserParams: '?skipConsent=true&georouting=off', + browserParams: '?skipConsent=true&env=prod&georouting=off', envs: '@milo_live', tags: '@milo @feds @jarvis @smoke @regression', }, @@ -24,7 +24,7 @@ module.exports = { path: [ '/libs/feds/drafts/qa/jarvis/feds-jarvis-disabled', ], - browserParams: '?skipConsent=true&georouting=off', + browserParams: '?skipConsent=true&env=prod&georouting=off', envs: '@milo_live', tags: '@milo @feds @jarvis @smoke @regression', }, @@ -33,7 +33,7 @@ module.exports = { path: [ '/libs/feds/drafts/qa/jarvis/feds-jarvis-mobile', ], - browserParams: '?skipConsent=true&georouting=off', + browserParams: '?skipConsent=true&env=prod&georouting=off', envs: '@milo_live', tags: '@milo @feds @jarvis @smoke @regression', }, From c3f3918cceb2bae1274164cb7db6f7f19ebd39da Mon Sep 17 00:00:00 2001 From: Dan Chivescu Date: Thu, 11 Jan 2024 11:26:25 +0200 Subject: [PATCH 3/3] [MWPW-140397] Skip UserProfile checks until IMS creddentials issue is fixed --- tests/feds/userprofile.test.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/feds/userprofile.test.js b/tests/feds/userprofile.test.js index efa2431f..d8eea91e 100644 --- a/tests/feds/userprofile.test.js +++ b/tests/feds/userprofile.test.js @@ -8,7 +8,7 @@ import FedsHeader from '../../selectors/feds/feds.header.page.js'; test.describe('User Profile Component test suite', () => { // FEDS User Profile Checks: - test(`${features[0].name}, ${features[0].tags}`, async ({ page, baseURL }) => { + test.skip(`${features[0].name}, ${features[0].tags}`, async ({ page, baseURL }) => { const Login = new FedsLogin(page); const Header = new FedsHeader(page); console.info(`[FEDSInfo] Checking page: ${baseURL}${features[0].path}`);