Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MWPW-136595] Move critical FEDS block checks to Milo #180

Merged
merged 12 commits into from
Oct 9, 2023
Merged
Show file tree
Hide file tree
Changes from 8 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 0 additions & 25 deletions features/feds/consent.spec.js

This file was deleted.

25 changes: 0 additions & 25 deletions features/feds/header.spec.js

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
],
browserParams: '?georouting=off',
envs: '@milo_live',
tags: '@feds @breadcrumbs @feds-breadcrumbs',
tags: '@milo @feds @breadcrumbs @smoke @regression',
},
{
name: '@FEDS-Breadcrumbs-From-Document',
Expand All @@ -17,7 +17,7 @@ module.exports = {
],
browserParams: '?georouting=off',
envs: '@milo_live',
tags: '@feds @breadcrumbs @feds-breadcrumbs',
tags: '@milo @feds @breadcrumbs @smoke @regression',
},
{
name: '@FEDS-Breadcrumbs-Hidden-Links',
Expand All @@ -26,7 +26,7 @@ module.exports = {
],
browserParams: '?georouting=off',
envs: '@milo_live',
tags: '@feds @breadcrumbs @feds-breadcrumbs',
tags: '@milo @feds @breadcrumbs @smoke @regression',
},
{
name: '@FEDS-Breadcrumbs-No-Hidden-Links',
Expand All @@ -35,7 +35,7 @@ module.exports = {
],
browserParams: '?georouting=off',
envs: '@milo_live',
tags: '@feds @breadcrumbs @feds-breadcrumbs',
tags: '@milo @feds @breadcrumbs @smoke @regression',
},
],
};
26 changes: 26 additions & 0 deletions features/milo/consent.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module.exports = {
name: 'Consent Component',
features: [
{
name: '@FEDS-Consent-Checks',
path: [
'/libs/feds/drafts/qa/consent/feds-consent-page',
],
wcagTags: ['wcag2a', 'wcag2aa', 'wwcag21a', 'wcag21aa'],
browserParams: '?customPrivacyLocation=de&georouting=off',
envs: '@milo_live',
tags: '@milo @feds @consent @smoke @regression',
},
// !Note: To be moved/repurposed in @adobe_prod configured project!
// {
// name: '@DC-Consent-Checks',
// path: [
// '/acrobat/online/sign-pdf.html',
// ],
// wcagTags: ['wcag2a', 'wcag2aa', 'wwcag21a', 'wcag21aa'],
// browserParams: '?customPrivacyLocation=de&georouting=off',
// envs: '@adobe_prod',
// tags: '@milo @feds @consent @smoke @regression',
// },
],
};
22 changes: 6 additions & 16 deletions features/feds/footer.spec.js → features/milo/footer.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,39 +7,29 @@ module.exports = {
'/libs/feds/drafts/qa/footer/feds-default-footer',
],
wcagTags: ['wcag2a', 'wcag2aa', 'wwcag21a', 'wcag21aa'],
browserParams: '?georouting=off',
browserParams: '?customPrivacyLocation=de&georouting=off',
envs: '@milo_live',
tags: '@feds @footer @feds-footer',
tags: '@milo @feds @footer @smoke @regression',
},
{
name: '@FEDS-Skinny-Footer',
path: [
'/libs/feds/drafts/qa/footer/feds-skinny-footer',
],
wcagTags: ['wcag2a', 'wcag2aa', 'wwcag21a', 'wcag21aa'],
browserParams: '?georouting=off',
browserParams: '?customPrivacyLocation=de&georouting=off',
envs: '@milo_live',
tags: '@feds @footer @feds-footer',
tags: '@milo @feds @footer @smoke @regression',
},
{
name: '@FEDS-Privacy-Footer',
path: [
'/libs/feds/drafts/qa/footer/feds-privacy-footer',
],
wcagTags: ['wcag2a', 'wcag2aa', 'wwcag21a', 'wcag21aa'],
browserParams: '?georouting=off',
browserParams: '?customPrivacyLocation=de&georouting=off',
envs: '@milo_live',
tags: '@feds @footer @feds-footer',
},
{
name: '@DC-Footer-Checks',
path: [
'/acrobat/online/sign-pdf.html',
],
wcagTags: ['wcag2a', 'wcag2aa', 'wwcag21a', 'wcag21aa'],
browserParams: '?georouting=off',
envs: '@adobe_prod',
tags: '@dc @footer @dc-footer',
tags: '@milo @feds @footer @smoke @regression',
},
],
};
26 changes: 26 additions & 0 deletions features/milo/header.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
module.exports = {
name: 'Header Block',
features: [
{
name: '@FEDS-Header-Checks',
path: [
'/libs/feds/drafts/qa/header/feds-header-page',
],
wcagTags: ['wcag2a', 'wcag2aa', 'wwcag21a', 'wcag21aa'],
browserParams: '?georouting=off',
envs: '@milo_live',
tags: '@milo @feds @header @smoke @regression',
},
// !Note: To be moved/repurposed in @adobe_prod configured project!
// {
// name: '@DC-Header-Checks',
// path: [
// '/acrobat/online/sign-pdf.html',
// ],
// wcagTags: ['wcag2a', 'wcag2aa', 'wwcag21a', 'wcag21aa'],
// browserParams: '?georouting=off',
// envs: '@adobe_prod',
// tags: '@dc @header @dc-header',
// },
],
};
16 changes: 8 additions & 8 deletions features/feds/jarvis.spec.js → features/milo/jarvis.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,36 +6,36 @@ module.exports = {
path: [
'/libs/feds/drafts/qa/jarvis/feds-jarvis-default',
],
browserParams: '?georouting=off',
browserParams: '?customPrivacyLocation=de&georouting=off',
envs: '@milo_live',
tags: '@feds @jarvis @feds-jarvis',
tags: '@milo @feds @jarvis @smoke @regression',
},
{
name: '@FEDS-Jarvis-Desktop',
path: [
'/libs/feds/drafts/qa/jarvis/feds-jarvis-desktop',
],
browserParams: '?georouting=off',
browserParams: '?customPrivacyLocation=de&georouting=off',
envs: '@milo_live',
tags: '@feds @jarvis @feds-jarvis',
tags: '@milo @feds @jarvis @smoke @regression',
},
{
name: '@FEDS-Jarvis-Disabled',
path: [
'/libs/feds/drafts/qa/jarvis/feds-jarvis-disabled',
],
browserParams: '?georouting=off',
browserParams: '?customPrivacyLocation=de&georouting=off',
envs: '@milo_live',
tags: '@feds @jarvis @feds-jarvis',
tags: '@milo @feds @jarvis @smoke @regression',
},
{
name: '@FEDS-Jarvis-Mobile',
path: [
'/libs/feds/drafts/qa/jarvis/feds-jarvis-mobile',
],
browserParams: '?georouting=off',
browserParams: '?customPrivacyLocation=de&georouting=off',
envs: '@milo_live',
tags: '@feds @jarvis @feds-jarvis',
tags: '@milo @feds @jarvis @smoke @regression',
},
],
};
18 changes: 9 additions & 9 deletions selectors/blog/404.page.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
export default class PageNotFound {
constructor(page) {
this.page = page;
// 404 fragment
this.fragment = this.page.locator('.fragment').nth(0);
this.header1Text = this.fragment.locator('#these-are-uncharted-waters');
}
}
export default class PageNotFound {
constructor(page) {
this.page = page;

// 404 fragment
this.fragment = this.page.locator('.fragment').nth(0);
this.header1Text = this.fragment.locator('#these-are-uncharted-waters');
}
}
117 changes: 58 additions & 59 deletions selectors/blog/home.page.js
Original file line number Diff line number Diff line change
@@ -1,59 +1,58 @@
export default class BlogHomePage {
constructor(page) {
this.page = page;

// Blog and Adobe Logo
this.adobeLogo = this.page.locator('.gnav-logo');
this.blogLogo = this.page.locator('.gnav-brand.no-logo');

// Gnav menu locators
this.gnavMain = this.page.locator('.gnav-mainnav');

this.newsMenu = this.gnavMain.locator('.gnav-navitem.has-menu').nth(0);
this.newsMenuList = this.newsMenu.locator('#navmenu-0 ul li');

this.insightInspirationMenu = this.gnavMain.locator('.gnav-navitem.has-menu').nth(1);
this.insightInspirationMenuList = this.insightInspirationMenu.locator('#navmenu-1 ul li');
this.gnavPromoCard = this.insightInspirationMenu.locator('gnav-promo.card');

this.responsibilityMenu = this.gnavMain.locator('.gnav-navitem.has-menu').nth(2);
this.responsibilityMenuList = this.responsibilityMenu.locator('#navmenu-2 ul li');

this.adobeLifeMenu = this.gnavMain.locator('.gnav-navitem.has-menu').nth(3);
this.responsibilityMenuList = this.adobeLifeMenu.locator('#navmenu-3 ul li');

// Contextual search and Sign-in profile locators
this.gnavSearch = this.page.locator('.gnav-search.contextual');
this.searchIcon = this.gnavSearch.locator('.gnav-search-button');

this.gnavProfile = this.page.locator('.gnav-profile');
this.signIn = this.gnavProfile.locator('.gnav-signin');

// Featured article block locators
this.featuredArticleBlock = this.page.locator('.featured-article');
this.featuredArticleCard = this.featuredArticleBlock.locator('.featured-article-card');
this.featuredArticleImage = this.featuredArticleBlock.locator('.featured-article-card-image');

// Text block locators
this.textBlock = this.page.locator('.text.text-block.con-block');
this.textBlockHeader = this.textBlock.locator('#the-latest-news');
this.readMoreNewsButton = this.textBlock.locator('.con-button.outline');

// Article feed block locators
this.articleFeedBlock = this.page.locator('.article-feed.appear');
this.loadMoreArticlesButton = this.articleFeedBlock.locator('.load-more.con-button.outline');

// Footer locators
this.globalFooter = this.page.locator('.global-footer');
this.changeLanguageText = this.globalFooter.locator('.feds-regionPicker-text');
this.changeLanguageButton = this.globalFooter.locator('.feds-regionPicker');
this.changeLanguageList = this.globalFooter.locator('.fragment p');
this.copywright = this.globalFooter.locator('.feds-footer-privacySection');
this.privacyLink = this.globalFooter.locator('a.feds-footer-privacyLink').nth(0);
this.termsOfUseLink = this.globalFooter.locator('a.feds-footer-privacyLink').nth(1);
this.cookiePreferencesLink = this.globalFooter.locator('a.feds-footer-privacyLink').nth(2);
this.doNotSellInformationLink = this.globalFooter.locator('a.feds-footer-privacyLink').nth(3);
this.adChoicesLink = this.globalFooter.locator('a.feds-footer-privacyLink').nth(4);
}
}

export default class BlogHomePage {
constructor(page) {
this.page = page;

// Blog and Adobe Logo
this.adobeLogo = this.page.locator('.gnav-logo');
this.blogLogo = this.page.locator('.gnav-brand.no-logo');

// Gnav menu locators
this.gnavMain = this.page.locator('.gnav-mainnav');

this.newsMenu = this.gnavMain.locator('.gnav-navitem.has-menu').nth(0);
this.newsMenuList = this.newsMenu.locator('#navmenu-0 ul li');

this.insightInspirationMenu = this.gnavMain.locator('.gnav-navitem.has-menu').nth(1);
this.insightInspirationMenuList = this.insightInspirationMenu.locator('#navmenu-1 ul li');
this.gnavPromoCard = this.insightInspirationMenu.locator('gnav-promo.card');

this.responsibilityMenu = this.gnavMain.locator('.gnav-navitem.has-menu').nth(2);
this.responsibilityMenuList = this.responsibilityMenu.locator('#navmenu-2 ul li');

this.adobeLifeMenu = this.gnavMain.locator('.gnav-navitem.has-menu').nth(3);
this.responsibilityMenuList = this.adobeLifeMenu.locator('#navmenu-3 ul li');

// Contextual search and Sign-in profile locators
this.gnavSearch = this.page.locator('.gnav-search.contextual');
this.searchIcon = this.gnavSearch.locator('.gnav-search-button');

this.gnavProfile = this.page.locator('.gnav-profile');
this.signIn = this.gnavProfile.locator('.gnav-signin');

// Featured article block locators
this.featuredArticleBlock = this.page.locator('.featured-article');
this.featuredArticleCard = this.featuredArticleBlock.locator('.featured-article-card');
this.featuredArticleImage = this.featuredArticleBlock.locator('.featured-article-card-image');

// Text block locators
this.textBlock = this.page.locator('.text.text-block.con-block');
this.textBlockHeader = this.textBlock.locator('#the-latest-news');
this.readMoreNewsButton = this.textBlock.locator('.con-button.outline');

// Article feed block locators
this.articleFeedBlock = this.page.locator('.article-feed.appear');
this.loadMoreArticlesButton = this.articleFeedBlock.locator('.load-more.con-button.outline');

// Footer locators
this.globalFooter = this.page.locator('.global-footer');
this.changeLanguageText = this.globalFooter.locator('.feds-regionPicker-text');
this.changeLanguageButton = this.globalFooter.locator('.feds-regionPicker');
this.changeLanguageList = this.globalFooter.locator('.fragment p');
this.copywright = this.globalFooter.locator('.feds-footer-privacySection');
this.privacyLink = this.globalFooter.locator('a.feds-footer-privacyLink').nth(0);
this.termsOfUseLink = this.globalFooter.locator('a.feds-footer-privacyLink').nth(1);
this.cookiePreferencesLink = this.globalFooter.locator('a.feds-footer-privacyLink').nth(2);
this.doNotSellInformationLink = this.globalFooter.locator('a.feds-footer-privacyLink').nth(3);
this.adChoicesLink = this.globalFooter.locator('a.feds-footer-privacyLink').nth(4);
}
}
2 changes: 1 addition & 1 deletion selectors/feds/feds.jarvis.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export default class FedsJarvis {
*/
async openJarvisFromCta() {
// Wait for Jarvis CTA button to appear:
await this.jarvisButton.waitFor({ state: 'visible', timeout: 15000 });
await this.jarvisButton.waitFor({ state: 'visible', timeout: 30000 });
// Click Jarvis CTA button:
await this.jarvisButton.click();
// Assert Jarvis CTA button click:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/* eslint-disable no-await-in-loop */
/* eslint-disable import/extensions */
import { expect, test } from '@playwright/test';
import { features } from '../../features/feds/breadcrumbs.spec.js';
import { features } from '../../features/milo/breadcrumbs.spec.js';
import FedsHeader from '../../selectors/feds/feds.header.page.js';

test.describe('Breadcrumbs Component test suite', () => {
Expand Down
Loading