diff --git a/features/feds/prodSanity/dcpagessanity.spec.js b/features/feds/prodSanity/dcpagessanity.spec.js new file mode 100644 index 00000000..b14baf5c --- /dev/null +++ b/features/feds/prodSanity/dcpagessanity.spec.js @@ -0,0 +1,166 @@ +module.exports = { + name: 'documentcloud pages', + features: [ + { + tcid: '0', + name: '@USDCAcrobat', + path: '/acrobat.html', + tags: '@DCSanity @USDCAcrobat-sanity', + country: 'United States', + }, + { + tcid: '1', + name: '@USDCSign', + path: '/sign.html', + tags: '@DCSanity @USDCSign-sanity', + country: 'United States', + }, + { + tcid: '2', + name: '@UKDCAcrobat', + path: '/uk/acrobat.html', + tags: '@DCSanity @UKDCAcrobat-sanity', + country: 'United kingdom', + }, + { + tcid: '3', + name: '@FRDCActobat', + path: '/fr/acrobat.html', + tags: '@DCSanity @FRDCAcrobat-sanity', + country: 'France', + }, + { + tcid: '4', + name: '@DEDCSanity', + path: '/de/acrobat.html', + tags: '@DCSanity @DEDCAcrobat-sanity', + country: 'German', + }, + { + tcid: '5', + name: '@JPDCSanity', + path: '/jp/acrobat.html', + tags: '@DCSanity @JPDCAcrobat-sanity', + country: 'Japanese', + }, + { + tcid: '6', + name: '@SGDCSanity', + path: '/sg/acrobat.html', + tags: '@DCSanity @SGDCAcrobat-sanity', + country: 'Singapore', + }, + { + tcid: '7', + name: '@AUDCSanity', + path: '/au/acrobat.html', + tags: '@DCSanity @AUDCAcrobat-sanity', + country: 'Australia', + }, + { + tcid: '8', + name: '@IEDCSanity', + path: '/ie/acrobat.html', + tags: '@DCSanity @IEDCAcrobat-sanity', + country: 'Ireland', + }, + { + tcid: '9', + name: '@ESDCSanity', + path: '/es/acrobat.html', + tags: '@DCSanity @ESDCAcrobat-sanity', + country: 'Espana', + }, + { + tcid: '10', + name: '@DKDCSanity', + path: '/dk/acrobat.html', + tags: '@DCSanity @DKAcrobat-sanity', + country: 'Denmark', + }, + { + tcid: '11', + name: '@BEENDCSanity', + path: '/be_en/acrobat.html', + tags: '@DCSanity @BEENDCAcrobat-sanity', + country: 'Belgium', + }, + { + tcid: '12', + name: '@AFRICADCSanity', + path: '/africa/acrobat.html', + tags: '@DCSanity @AFRICADCAcrobat-sanity', + country: 'Africa', + }, + { + tcid: '13', + name: '@MXDCSanity', + path: '/mx/acrobat.html', + tags: '@DCSanity @MXDCAcrobat-sanity', + country: 'Mexico', + }, + { + tcid: '14', + name: '@LADCSanity', + path: '/la/acrobat.html', + tags: '@DCSanity @LADCAcrobat-sanity', + country: 'Latinamerica', + }, + { + tcid: '15', + name: '@CADCSanity', + path: '/ca/acrobat.html', + tags: '@DCSanity @CADCAcrobat-sanity', + country: 'Canada', + }, + { + tcid: '16', + name: '@HUDCSanity', + path: '/hu/acrobat.html', + tags: '@DCSanity @HUDCAcrobat-sanity', + country: 'Hungary', + }, + { + tcid: '17', + name: '@NLDCSanity', + path: '/nl/acrobat.html', + tags: '@DCSanity @NLDCAcrobat-sanity', + country: 'Netherlands', + }, + { + tcid: '18', + name: '@FIDCSanity', + path: '/fi/acrobat.html', + tags: '@DCSanity @FIDCAcrobat-sanity', + country: 'Finland', + }, + { + tcid: '19', + name: '@SEDCSanity', + path: '/se/acrobat.html', + tags: '@DCSanity @SEDCAcrobat-sanity', + country: 'Sweden', + }, + { + tcid: '20', + name: '@INDCSanity', + path: '/in/acrobat.html', + tags: '@DCSanity @INDCAcrobat-sanity', + country: 'India', + }, + { + tcid: '21', + name: '@NZDCSanity', + path: '/nz/acrobat.html', + tags: '@DCSanity @NZDCAcrobat-sanity', + country: 'Newzeland', + }, + { + tcid: '22', + name: '@KRDCSanity', + path: '/kr/acrobat.html', + tags: '@DCSanity @KRDCAcrobat-sanity', + country: 'Korea', + }, + ], +}; diff --git a/selectors/feds/feds.documentcloudsanity.page.js b/selectors/feds/feds.documentcloudsanity.page.js new file mode 100644 index 00000000..173eba99 --- /dev/null +++ b/selectors/feds/feds.documentcloudsanity.page.js @@ -0,0 +1,54 @@ +// import { expect, test } from '@playwright/test'; +import { expect } from '@playwright/test'; + +export default class doccloudpagessanity { + constructor(page) { + this.page = page; + + // Geo model close element + this.geoRoutingClose = page.locator('.dexter-CloseButton').last(); + + // Acrobat MagaManu, Locale Nav elements + this.adobeBranding = page.locator('.feds-logo').first(); + this.gnavComplete = page.locator('.gnavTopnav'); + this.fedsNav = this.gnavComplete.locator('#feds-topnav').first(); + this.localNav = this.fedsNav.locator('//ul[@daa-lh="localnav"]'); + this.localNavDefaultHeading = page.locator('.feds-navLink-text--default').first(); + this.localnavDefaultDisablFocusNavElement = page.locator('//a[@daa-ll="Adobe_Acrobat-1"]').first(); + this.featuresNavLink = page.locator('feds-navLink-text--default').nth(29); + this.comparePlansNavLink = page.locator('feds-navLink-text--default').nth(37); + this.reourcesNavLink = page.locator('feds-navLink-text--default').nth(38); + this.learnAndHelpNavLink = page.locator('feds-navLink-text--default').nth(39); + this.freeTrialNavLink = page.locator('feds-navLink-text--default').nth(40); + + // Unav Elements + this.appSwithcer = page.locator('#unav-app-switcher'); + this.userSignin = page.locator('#unav-profile'); + + // Footer links + this.footerProductsColumn = page.locator('//a[@daa-ll="Products-1" and @role="heading"]'); + this.footerBusinessColumn = page.locator('//a[@daa-ll="For_business-1" and @role="heading"]'); + this.footerECCommunity = page.locator('//a[@daa-ll="Blogs_Community-1" and @role="heading"]'); + this.footerSupportColumn = page.locator('//a[@daa-ll="Support-1" and @tabindex="-1"]'); + this.footerAdobeColumn = page.locator('//a[@daa-ll="Adobe-1" and @tabindex="-1"]'); + this.footerCCLink = page.locator('//a[@class="feds-navLink" and @daa-ll="Creative_Cloud-1"]'); + this.footerECLink = page.locator('//a[@class="feds-navLink" and @daa-ll="What_is_Experience_Cloud-1"]'); + this.footerHelpxLink = page.locator('//a[@class="feds-navLink" and @daa-ll="Help_Center-2"]'); + } + + async CloseGeoModel() { + console.log('close geo model popup'); + await this.page.waitForTimeout(3000); + await this.geoRoutingClose.click(); + } + + async ValidateGnav() { + console.log('validate Gnav Elements'); + await this.page.waitForLoadState('networkidle'); + const elements = [this.adobeBranding, this.gnavComplete, this.fedsNav, this.localNav, + this.localNavDefaultHeading, this.localnavDefaultDisablFocusNavElement, this.featuresNavLink, + this.comparePlansNavLink]; + const promises = elements.map(async (element) => { expect(element).toBeTruthy(); }); + await Promise.all(promises); + } +} diff --git a/tests/feds/documentcloudsanity.test.js b/tests/feds/documentcloudsanity.test.js new file mode 100644 index 00000000..a1c33a61 --- /dev/null +++ b/tests/feds/documentcloudsanity.test.js @@ -0,0 +1,217 @@ +import { test, expect } from '@playwright/test'; +import { features } from '../../features/feds/prodSanity/dcpagessanity.spec.js'; +import DCSanity from '../../selectors/feds/feds.documentcloudsanity.page.js'; + +let dcsanity; +test.describe('DC production pages Gnav sanity', () => { + test.beforeEach(async ({ page }) => { + dcsanity = new DCSanity(page); + }); + + test(`${features[0].name}, ${features[0].tags}, ${features[0].country}`, async ({ page, baseURL }) => { + console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[0].path}`); + const pageURL = `${baseURL}${features[0].path}`; + await page.goto(pageURL, { waitUntil: 'domcontentloaded' }); + await expect(page).toHaveURL(pageURL); + await dcsanity.CloseGeoModel(); + await dcsanity.ValidateGnav(); + }); + + test(`${features[1].name}, ${features[1].tags}, ${features[1].country}`, async ({ page, baseURL }) => { + console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[1].path}`); + const pageURL = `${baseURL}${features[1].path}`; + await page.goto(pageURL, { waitUntil: 'domcontentloaded' }); + await expect(page).toHaveURL(pageURL); + await dcsanity.CloseGeoModel(); + await dcsanity.ValidateGnav(); + }); + + test(`${features[2].name}, ${features[2].tags}, ${features[2].country}`, async ({ page, baseURL }) => { + console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[2].path}`); + const pageURL = `${baseURL}${features[2].path}`; + await page.goto(pageURL, { waitUntil: 'domcontentloaded' }); + await expect(page).toHaveURL(pageURL); + await dcsanity.CloseGeoModel(); + await dcsanity.ValidateGnav(); + }); + + test(`${features[3].name}, ${features[3].tags}, ${features[3].country}`, async ({ page, baseURL }) => { + console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[3].path}`); + const pageURL = `${baseURL}${features[3].path}`; + await page.goto(pageURL, { waitUntil: 'domcontentloaded' }); + await expect(page).toHaveURL(pageURL); + await dcsanity.CloseGeoModel(); + await dcsanity.ValidateGnav(); + }); + + test(`${features[4].name}, ${features[4].tags}, ${features[4].country}`, async ({ page, baseURL }) => { + console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[4].path}`); + const pageURL = `${baseURL}${features[4].path}`; + await page.goto(pageURL, { waitUntil: 'domcontentloaded' }); + await expect(page).toHaveURL(pageURL); + await dcsanity.CloseGeoModel(); + await dcsanity.ValidateGnav(); + }); + + test(`${features[5].name}, ${features[5].tags}, ${features[5].country}`, async ({ page, baseURL }) => { + console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[5].path}`); + const pageURL = `${baseURL}${features[5].path}`; + await page.goto(pageURL, { waitUntil: 'domcontentloaded' }); + await expect(page).toHaveURL(pageURL); + await dcsanity.CloseGeoModel(); + await dcsanity.ValidateGnav(); + }); + + test(`${features[6].name}, ${features[6].tags}, ${features[6].country}`, async ({ page, baseURL }) => { + console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[6].path}`); + const pageURL = `${baseURL}${features[6].path}`; + await page.goto(pageURL, { waitUntil: 'domcontentloaded' }); + await expect(page).toHaveURL(pageURL); + await dcsanity.CloseGeoModel(); + await dcsanity.ValidateGnav(); + }); + + test(`${features[7].name}, ${features[7].tags}, ${features[7].country}`, async ({ page, baseURL }) => { + console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[7].path}`); + const pageURL = `${baseURL}${features[7].path}`; + await page.goto(pageURL, { waitUntil: 'domcontentloaded' }); + await expect(page).toHaveURL(pageURL); + await dcsanity.CloseGeoModel(); + await dcsanity.ValidateGnav(); + }); + + test(`${features[8].name}, ${features[8].tags}, ${features[8].country}`, async ({ page, baseURL }) => { + console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[8].path}`); + const pageURL = `${baseURL}${features[8].path}`; + await page.goto(pageURL, { waitUntil: 'domcontentloaded' }); + await expect(page).toHaveURL(pageURL); + await dcsanity.CloseGeoModel(); + await dcsanity.ValidateGnav(); + }); + + test(`${features[9].name}, ${features[9].tags}, ${features[9].country}`, async ({ page, baseURL }) => { + console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[9].path}`); + const pageURL = `${baseURL}${features[9].path}`; + await page.goto(pageURL, { waitUntil: 'domcontentloaded' }); + await expect(page).toHaveURL(pageURL); + await dcsanity.CloseGeoModel(); + await dcsanity.ValidateGnav(); + }); + + test(`${features[10].name}, ${features[10].tags}, ${features[10].country}`, async ({ page, baseURL }) => { + console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[10].path}`); + const pageURL = `${baseURL}${features[10].path}`; + await page.goto(pageURL, { waitUntil: 'domcontentloaded' }); + await expect(page).toHaveURL(pageURL); + await dcsanity.CloseGeoModel(); + await dcsanity.ValidateGnav(); + }); + + test(`${features[11].name}, ${features[11].tags}, ${features[11].country}`, async ({ page, baseURL }) => { + console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[11].path}`); + const pageURL = `${baseURL}${features[11].path}`; + await page.goto(pageURL, { waitUntil: 'domcontentloaded' }); + await expect(page).toHaveURL(pageURL); + await dcsanity.CloseGeoModel(); + await dcsanity.ValidateGnav(); + }); + + test(`${features[12].name}, ${features[12].tags}, ${features[12].country}`, async ({ page, baseURL }) => { + console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[12].path}`); + const pageURL = `${baseURL}${features[12].path}`; + await page.goto(pageURL, { waitUntil: 'domcontentloaded' }); + await expect(page).toHaveURL(pageURL); + await dcsanity.CloseGeoModel(); + await dcsanity.ValidateGnav(); + }); + + test(`${features[13].name}, ${features[13].tags}, ${features[13].country}`, async ({ page, baseURL }) => { + console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[13].path}`); + const pageURL = `${baseURL}${features[13].path}`; + await page.goto(pageURL, { waitUntil: 'domcontentloaded' }); + await expect(page).toHaveURL(pageURL); + await dcsanity.CloseGeoModel(); + await dcsanity.ValidateGnav(); + }); + + test(`${features[14].name}, ${features[14].tags}, ${features[14].country}`, async ({ page, baseURL }) => { + console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[14].path}`); + const pageURL = `${baseURL}${features[14].path}`; + await page.goto(pageURL, { waitUntil: 'domcontentloaded' }); + await expect(page).toHaveURL(pageURL); + await dcsanity.CloseGeoModel(); + await dcsanity.ValidateGnav(); + }); + + test(`${features[15].name}, ${features[15].tags}, ${features[15].country}`, async ({ page, baseURL }) => { + console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[15].path}`); + const pageURL = `${baseURL}${features[15].path}`; + await page.goto(pageURL, { waitUntil: 'domcontentloaded' }); + await expect(page).toHaveURL(pageURL); + await dcsanity.CloseGeoModel(); + await dcsanity.ValidateGnav(); + }); + + test(`${features[16].name}, ${features[16].tags}, ${features[16].country}`, async ({ page, baseURL }) => { + console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[16].path}`); + const pageURL = `${baseURL}${features[16].path}`; + await page.goto(pageURL, { waitUntil: 'domcontentloaded' }); + await expect(page).toHaveURL(pageURL); + await dcsanity.CloseGeoModel(); + await dcsanity.ValidateGnav(); + }); + + test(`${features[17].name}, ${features[17].tags}, ${features[17].country}`, async ({ page, baseURL }) => { + console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[17].path}`); + const pageURL = `${baseURL}${features[17].path}`; + await page.goto(pageURL, { waitUntil: 'domcontentloaded' }); + await expect(page).toHaveURL(pageURL); + await dcsanity.CloseGeoModel(); + await dcsanity.ValidateGnav(); + }); + + test(`${features[18].name}, ${features[18].tags}, ${features[18].country}`, async ({ page, baseURL }) => { + console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[18].path}`); + const pageURL = `${baseURL}${features[18].path}`; + await page.goto(pageURL, { waitUntil: 'domcontentloaded' }); + await expect(page).toHaveURL(pageURL); + await dcsanity.CloseGeoModel(); + await dcsanity.ValidateGnav(); + }); + + test(`${features[19].name}, ${features[19].tags}, ${features[19].country}`, async ({ page, baseURL }) => { + console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[19].path}`); + const pageURL = `${baseURL}${features[19].path}`; + await page.goto(pageURL, { waitUntil: 'domcontentloaded' }); + await expect(page).toHaveURL(pageURL); + await dcsanity.CloseGeoModel(); + await dcsanity.ValidateGnav(); + }); + + test(`${features[20].name}, ${features[20].tags}, ${features[20].country}`, async ({ page, baseURL }) => { + console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[20].path}`); + const pageURL = `${baseURL}${features[20].path}`; + await page.goto(pageURL, { waitUntil: 'domcontentloaded' }); + await expect(page).toHaveURL(pageURL); + await dcsanity.CloseGeoModel(); + await dcsanity.ValidateGnav(); + }); + + test(`${features[21].name}, ${features[21].tags}, ${features[21].country}`, async ({ page, baseURL }) => { + console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[21].path}`); + const pageURL = `${baseURL}${features[21].path}`; + await page.goto(pageURL, { waitUntil: 'domcontentloaded' }); + await expect(page).toHaveURL(pageURL); + await dcsanity.CloseGeoModel(); + await dcsanity.ValidateGnav(); + }); + + test(`${features[22].name}, ${features[22].tags}, ${features[22].country}`, async ({ page, baseURL }) => { + console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[22].path}`); + const pageURL = `${baseURL}${features[22].path}`; + await page.goto(pageURL, { waitUntil: 'domcontentloaded' }); + await expect(page).toHaveURL(pageURL); + await dcsanity.CloseGeoModel(); + await dcsanity.ValidateGnav(); + }); +});