diff --git a/features/feds/prodSanity/ccepagesanity.spec.js b/features/feds/prodSanity/ccepagesanity.spec.js index b4c426bb..fba2f17b 100644 --- a/features/feds/prodSanity/ccepagesanity.spec.js +++ b/features/feds/prodSanity/ccepagesanity.spec.js @@ -19,147 +19,147 @@ module.exports = { tcid: '2', name: '@FranceCCEPageCheck', path: '/fr/creativecloud/business/enterprise.html?georouting=off', - tags: '@CCEPagesanity @CCEFrance', + tags: '@ccepagesanity @CCEFrance', country: 'France', }, { tcid: '3', name: '@ItalyCCEPageCheck', path: '/it/creativecloud/business/enterprise.html?georouting=off', - tags: '@CCEPagesanity @CCEItaly', + tags: '@ccepagesanity @CCEItaly', country: 'Italy', }, { tcid: '4', name: '@UnitedKingdomCCEPageCheck', path: '/uk/creativecloud/business/enterprise.html?georouting=off', - tags: '@CCEPagesanity @CCEUnitedKingdom', + tags: '@ccepagesanity @CCEUnitedKingdom', country: 'United Kingdom', }, { tcid: '5', name: '@MiddleEastAndNorthAfricaCCEPageCheck', path: '/mena_ar/creativecloud/business/enterprise.html?georouting=off', - tags: '@CCEPagesanity @CCEMiddleEastAndNorthAfrica', + tags: '@ccepagesanity @CCEMiddleEastAndNorthAfrica', country: 'Middle East And North Africa', }, { tcid: '6', name: '@JapanCCEPageCheck', path: '/jp/creativecloud/business/enterprise.html?georouting=off', - tags: '@CCEPagesanity @CCEJapan', + tags: '@ccepagesanity @CCEJapan', country: 'Japan', }, { tcid: '7', name: '@IndiaCCEPageCheck', path: '/in/creativecloud/business/enterprise.html?georouting=off', - tags: '@CCEPagesanity @CCEIndia', + tags: '@ccepagesanity @CCEIndia', country: 'India', }, { tcid: '8', name: '@SpainCCEPageCheck', path: '/es/creativecloud/business/enterprise.html?georouting=off', - tags: '@CCEPagesanity @CCESpain', + tags: '@ccepagesanity @CCESpain', country: 'Spain', }, { tcid: '9', name: '@CanadaEnglishCCEPageCheck', path: '/ca/creativecloud/business/enterprise.html?georouting=off', - tags: '@CCEPagesanity @CCECanadaEnglish', + tags: '@ccepagesanity @CCECanadaEnglish', country: 'Canada English', }, { tcid: '10', name: '@KoreaCCEPageCheck', path: '/kr/creativecloud/business/enterprise.html?georouting=off', - tags: '@CCEPagesanity @CCEKorea', + tags: '@ccepagesanity @CCEKorea', country: 'Korea', }, { tcid: '11', name: '@CanadaFrenchCCEPageCheck', path: '/ca_fr/creativecloud/business/enterprise.html?georouting=off', - tags: '@CCEPagesanity @CCECanadaFrench', + tags: '@ccepagesanity @CCECanadaFrench', country: 'Canada French', }, { tcid: '12', name: '@PolandCCEPageCheck', path: '/pl/creativecloud/business/enterprise.html?georouting=off', - tags: '@CCEPagesanity @CCEPoland', + tags: '@ccepagesanity @CCEPoland', country: 'Poland', }, { tcid: '13', name: '@MexicoCCEPageCheck', path: '/mx/creativecloud/business/enterprise.html?georouting=off', - tags: '@CCEPagesanity @CCEMexico', + tags: '@ccepagesanity @CCEMexico', country: 'Mexico', }, { tcid: '14', name: '@AustraliaCCEPageCheck', path: '/au/creativecloud/business/enterprise.html?georouting=off', - tags: '@CCEPagesanity @CCEAustralia', + tags: '@ccepagesanity @CCEAustralia', country: 'Australia', }, { tcid: '15', name: '@IndonesiaCCEPageCheck', path: '/id_id/creativecloud/business/enterprise.html?georouting=off', - tags: '@CCEPagesanity @CCEIndonesia', + tags: '@ccepagesanity @CCEIndonesia', country: 'Indonesia', }, { tcid: '16', name: '@IndonesiaEnglishCCEPageCheck', path: '/id_en/creativecloud/business/enterprise.html?georouting=off', - tags: '@CCEPagesanity @CCEIndonesiaEnglish', + tags: '@ccepagesanity @CCEIndonesiaEnglish', country: 'Indonesia English', }, { tcid: '17', name: '@TurkeyCCEPageCheck', path: '/tr/creativecloud/business/enterprise.html?georouting=off', - tags: '@CCEPagesanity @CCETurkey', + tags: '@ccepagesanity @CCETurkey', country: 'Turkey', }, { tcid: '18', name: '@ThailandEnglishCCEPageCheck', path: '/th_en/creativecloud/business/enterprise.html?georouting=off', - tags: '@CCEPagesanity @CCEThailandEnglish', + tags: '@ccepagesanity @CCEThailandEnglish', country: 'Thailand English', }, { tcid: '19', name: '@ThailandCCEPageCheck', path: '/th_th/creativecloud/business/enterprise.html?georouting=off', - tags: '@CCEPagesanity @CCEThailand', + tags: '@ccepagesanity @CCEThailand', country: 'Thailand', }, { tcid: '20', name: '@SingaporeCCEPageCheck', path: '/sg/creativecloud/business/enterprise.html?georouting=off', - tags: '@CCEPagesanity @CCESingapore', + tags: '@ccepagesanity @CCESingapore', country: 'Singapore', }, { tcid: '21', name: '@PhilippineCCEPageCheck', path: '/ph_fil/creativecloud/business/enterprise.html?georouting=off', - tags: '@CCEPagesanity @CCEPhilippines', + tags: '@ccepagesanity @CCEPhilippines', country: 'Philippines', }, { tcid: '22', name: '@PhilippineEnglishCCEPageCheck', - path: '/ph_fil/creativecloud/business/enterprise.html?georouting=off', - tags: '@CCEPagesanity @CCEPhilippinesEnglish', + path: '/ph_en/creativecloud/business/enterprise.html?georouting=off', + tags: '@ccepagesanity @CCEPhilippinesEnglish', country: 'Philippines English', }, ], diff --git a/features/feds/prodSanity/mobileTesting/mobileCCEPageSanity.spec.js b/features/feds/prodSanity/mobileTesting/mobileCCEPageSanity.spec.js new file mode 100644 index 00000000..65f741e8 --- /dev/null +++ b/features/feds/prodSanity/mobileTesting/mobileCCEPageSanity.spec.js @@ -0,0 +1,166 @@ +module.exports = { + name: 'Creative Cloud Enterprise Page', + features: [ + { + tcid: '0', + name: '@UnitedStatesMobileCCEPageCheck', + path: '/creativecloud/business/enterprise.html?georouting=off', + tags: '@mobileCCEPageSanity @mobileCCEUnitedStatesPage', + country: 'United States', + }, + { + tcid: '1', + name: '@GermanyMobileCCEPageCheck', + path: '/de/creativecloud/business/enterprise.html?georouting=off', + tags: '@mobileCCEPageSanity @mobileCCEGermany', + country: 'Germany', + }, + { + tcid: '2', + name: '@FranceMobileCCEPageCheck', + path: '/fr/creativecloud/business/enterprise.html?georouting=off', + tags: '@mobileCCEPageSanity @mobileCCEFrance', + country: 'France', + }, + { + tcid: '3', + name: '@ItalyMobileCCEPageCheck', + path: '/it/creativecloud/business/enterprise.html?georouting=off', + tags: '@mobileCCEPageSanity @mobileCCEItaly', + country: 'Italy', + }, + { + tcid: '4', + name: '@UnitedKingdomMobileCCEPageCheck', + path: '/uk/creativecloud/business/enterprise.html?georouting=off', + tags: '@mobileCCEPageSanity @mobileCCEUnitedKingdom', + country: 'United Kingdom', + }, + { + tcid: '5', + name: '@MiddleEastAndNorthAfricaMobileCCEPageCheck', + path: '/mena_ar/creativecloud/business/enterprise.html?georouting=off', + tags: '@mobileCCEPageSanity @mobileCCEMiddleEastAndNorthAfrica', + country: 'Middle East And North Africa', + }, + { + tcid: '6', + name: '@JapanMobileCCEPageCheck', + path: '/jp/creativecloud/business/enterprise.html?georouting=off', + tags: '@mobileCCEPageSanity @mobileCCEJapan', + country: 'Japan', + }, + { + tcid: '7', + name: '@IndiaMobileCCEPageCheck', + path: '/in/creativecloud/business/enterprise.html?georouting=off', + tags: '@mobileCCEPageSanity @mobileCCEIndia', + country: 'India', + }, + { + tcid: '8', + name: '@SpainMobileCCEPageCheck', + path: '/es/creativecloud/business/enterprise.html?georouting=off', + tags: '@mobileCCEPageSanity @mobileCCESpain', + country: 'Spain', + }, + { + tcid: '9', + name: '@CanadaEnglishMobileCCEPageCheck', + path: '/ca/creativecloud/business/enterprise.html?georouting=off', + tags: '@mobileCCEPageSanity @mobileCCECanadaEnglish', + country: 'Canada English', + }, + { + tcid: '10', + name: '@KoreaMobileCCEPageCheck', + path: '/kr/creativecloud/business/enterprise.html?georouting=off', + tags: '@mobileCCEPageSanity @mobileCCEKorea', + country: 'Korea', + }, + { + tcid: '11', + name: '@CanadaFrenchMobileCCEPageCheck', + path: '/ca_fr/creativecloud/business/enterprise.html?georouting=off', + tags: '@mobileCCEPageSanity @mobileCCECanadaFrench', + country: 'Canada French', + }, + { + tcid: '12', + name: '@PolandMobileCCEPageCheck', + path: '/pl/creativecloud/business/enterprise.html?georouting=off', + tags: '@mobileCCEPageSanity @mobileCCEPoland', + country: 'Poland', + }, + { + tcid: '13', + name: '@MexicoMobileCCEPageCheck', + path: '/mx/creativecloud/business/enterprise.html?georouting=off', + tags: '@mobileCCEPageSanity @mobileCCEMexico', + country: 'Mexico', + }, + { + tcid: '14', + name: '@AustraliaMobileCCEPageCheck', + path: '/au/creativecloud/business/enterprise.html?georouting=off', + tags: '@mobileCCEPageSanity @mobileCCEAustralia', + country: 'Australia', + }, + { + tcid: '15', + name: '@IndonesiaMobileCCEPageCheck', + path: '/id_id/creativecloud/business/enterprise.html?georouting=off', + tags: '@mobileCCEPageSanity @mobileCCEIndonesia', + country: 'Indonesia', + }, + { + tcid: '16', + name: '@IndonesiaEnglishMobileCCEPageCheck', + path: '/id_en/creativecloud/business/enterprise.html?georouting=off', + tags: '@mobileCCEPageSanity @mobileCCEIndonesiaEnglish', + country: 'Indonesia English', + }, + { + tcid: '17', + name: '@TurkeyMobileCCEPageCheck', + path: '/tr/creativecloud/business/enterprise.html?georouting=off', + tags: '@mobileCCEPageSanity @mobileCCETurkey', + country: 'Turkey', + }, + { + tcid: '18', + name: '@ThailandEnglishMobileCCEPageCheck', + path: '/th_en/creativecloud/business/enterprise.html?georouting=off', + tags: '@mobileCCEPageSanity @mobileCCEThailandEnglish', + country: 'Thailand English', + }, + { + tcid: '19', + name: '@ThailandMobileCCEPageCheck', + path: '/th_th/creativecloud/business/enterprise.html?georouting=off', + tags: '@mobileCCEPageSanity @mobileCCEThailand', + country: 'Thailand', + }, + { + tcid: '20', + name: '@SingaporeMobileCCEPageCheck', + path: '/sg/creativecloud/business/enterprise.html?georouting=off', + tags: '@mobileCCEPageSanity @mobileCCESingapore', + country: 'Singapore', + }, + { + tcid: '21', + name: '@PhilippineMobileCCEPageCheck', + path: '/ph_fil/creativecloud/business/enterprise.html?georouting=off', + tags: '@mobileCCEPageSanity @mobileCCEPhilippines', + country: 'Philippines', + }, + { + tcid: '22', + name: '@PhilippineEnglishMobileCCEPageCheck', + path: '/ph_en/creativecloud/business/enterprise.html?georouting=off', + tags: '@mobileCCEPageSanity @mobileCCEPhilippinesEnglish', + country: 'Philippines English', + }, + ], +}; diff --git a/selectors/feds/feds.ccepagesanity.page.js b/selectors/feds/feds.ccepagesanity.page.js index ec9b23e5..36402c6e 100644 --- a/selectors/feds/feds.ccepagesanity.page.js +++ b/selectors/feds/feds.ccepagesanity.page.js @@ -8,6 +8,7 @@ export default class CreativeCloudEnterpriseSanity { this.adobe = page.locator('.feds-brand'); this.appSwitcher = page.locator('#unav-app-switcher'); this.signInButton = page.locator('#unav-profile div'); + this.hamburgerMenu = page.locator('.feds-toggle'); this.creativityAndDesign = page.locator('.feds-navItem:nth-child(1) button'); this.creativeCloudForBusiness = page.locator('.feds-navItem:nth-child(2) a'); @@ -19,6 +20,23 @@ export default class CreativeCloudEnterpriseSanity { this.contactSales = page.locator('.feds-navItem:nth-child(8)'); this.contactNumber = page.locator('.feds-navItem:nth-child(9) a'); + this.solutions = page.locator('.feds-menu-column').nth(5); + this.featuredProducts = page.locator('.feds-menu-column').nth(6); + this.more = page.locator('.feds-menu-column').nth(7); + + this.learn = page.locator('.feds-menu-column').nth(8); + this.support = page.locator('.feds-menu-column').nth(9); + + this.shopForFooter = page.locator('.feds-menu-section').nth(6); + this.forBusinessFooter = page.locator('.feds-menu-section').nth(7); + this.forEducationFooter = page.locator('.feds-menu-section').nth(8); + this.forMobileFooter = page.locator('.feds-menu-section').nth(9); + this.experienceCloudFooter = page.locator('.feds-menu-section').nth(10); + this.supportFooter = page.locator('.feds-menu-section').nth(11); + this.resourcesFooter = page.locator('.feds-menu-section').nth(12); + this.adobeAcrobatFooter = page.locator('.feds-menu-section').nth(13); + this.adobeFooter = page.locator('.feds-menu-section').nth(14); + // Creativity & Design Elements this.whatIsCC = page.locator('.feds-popup [href*="creativecloud.html"]').nth(0); this.photographers = page.locator('.feds-popup [href*="photography.html"]').nth(0); @@ -48,7 +66,7 @@ export default class CreativeCloudEnterpriseSanity { this.video = page.locator('.feds-popup [href*="video.html"]'); this.illustratorEx = page.locator('.feds-popup [href*="illustration.html"]'); this.socialMedia = page.locator('.feds-popup [href*="social-media.html"]'); - this.threeDAndAR = page.locator('.feds-popup [href*="3d-ar.html"]'); + this.threeDAndAR = page.locator('.feds-popup [href*="3d"]').nth(0); this.pdf = page.locator('.feds-popup [href$="acrobat-pro-cc.html"]'); this.aiOverview = page.locator('.feds-popup [href*="ai/overview.html"]'); @@ -81,6 +99,8 @@ export default class CreativeCloudEnterpriseSanity { this.adobeExpressIn = page.locator('[href*="HCS3XGLY&mv=other"]'); this.seePlansAndPricing = page.locator('.feds-cta-wrapper [href*="WXYGHWCC&mv=other"]'); + this.quickActions = page.locator('.feds-menu-headline').nth(0); + // Product Elements this.creativeCloudForTeamsPro = page.locator('.feds-popup [href*="business/teams.html"]'); this.photoshopPro = page.locator('.feds-popup [href*="teams/photoshop.html"]'); @@ -136,14 +156,12 @@ export default class CreativeCloudEnterpriseSanity { { element: this.comparePlans, conditions: { defaultVisibility: true } }, { element: this.freeTrial, conditions: { defaultVisibility: true } }, { element: this.contactSales, conditions: { defaultVisibility: true } }, - { element: this.contactNumber, conditions: { defaultVisibility: true, excludeCountries: ['Australia'] } }, + { element: this.contactNumber, conditions: { includeCountries: ['United States'] } }, ]; await Promise.all(elementsToCheck.map(async ({ element, conditions }) => { if (conditions.includeCountries && conditions.includeCountries.includes(country)) { await expect(element).toBeVisible(); - } else if (conditions.excludeCountries && conditions.excludeCountries.includes(country)) { - await expect(element).not.toBeVisible(); } else if (conditions.defaultVisibility) { await expect(element).toBeVisible(); } @@ -157,20 +175,11 @@ export default class CreativeCloudEnterpriseSanity { { element: this.whatIsCC, conditions: { defaultVisibility: true, includeCountries: ['Germany'] } }, { element: this.photographers, conditions: { defaultVisibility: true, excludeCountries: ['India'] } }, { element: this.studentsAndTeachers, conditions: { defaultVisibility: true, excludeCountries: ['India'] } }, - { - element: this.individuals, - conditions: { - defaultVisibility: true, - excludeCountries: ['Germany', 'France', 'Thailand', 'Thailand English'], - }, - }, + { element: this.individuals, conditions: { defaultVisibility: true, excludeCountries: ['Germany', 'France'] } }, { element: this.business, conditions: { defaultVisibility: true, excludeCountries: ['India'] } }, { element: this.schoolsAndUniversities, - conditions: { - defaultVisibility: true, - excludeCountries: ['Spain', 'India'], - }, + conditions: { defaultVisibility: true, excludeCountries: ['Spain', 'India'] }, }, { element: this.viewPlansAndPricing, conditions: { defaultVisibility: true } }, { element: this.photoshop, conditions: { defaultVisibility: true, includeCountries: ['India'] } }, @@ -185,57 +194,21 @@ export default class CreativeCloudEnterpriseSanity { { element: this.video, conditions: { defaultVisibility: true, excludeCountries: ['India'] } }, { element: this.illustratorEx, conditions: { defaultVisibility: true, excludeCountries: ['India'] } }, { element: this.socialMedia, conditions: { defaultVisibility: true, excludeCountries: ['India'] } }, - { - element: this.threeDAndAR, - conditions: { - defaultVisibility: true, - excludeCountries: ['United States', 'India'], - }, - }, + { element: this.threeDAndAR, conditions: { defaultVisibility: true, excludeCountries: ['India'] } }, { element: this.pdf, conditions: { defaultVisibility: true, excludeCountries: ['India'] } }, - { - element: this.aiOverview, - conditions: { - defaultVisibility: true, - excludeCountries: ['Germany', 'France', 'Italy', 'Japan', 'United Kingdom', - 'Middle East And North Africa', 'Spain', 'Canada English', 'Korea', 'Canada French', - 'Poland', 'Indonesia', 'Indonesia English', 'Turkey', 'Thailand English', - 'Thailand', 'Singapore', 'Philippines', 'Philippines English', 'India'], - }, - }, - { - element: this.adobeFirefly, - conditions: { - defaultVisibility: true, - excludeCountries: ['Germany', 'France', 'Italy', 'United Kingdom', 'Middle East And North Africa', - 'Japan', 'Canada English', 'Korea', 'Canada French', 'Poland', 'Indonesia', 'Philippines English', - 'Indonesia English', 'Turkey', 'Thailand English', 'Thailand', 'Singapore', 'Philippines', 'India'], - }, - }, - { - element: this.adobeFireFlyTwo, - conditions: { - includeCountries: ['Germany', 'France', 'Italy', 'United Kingdom', 'Middle East And North Africa', - 'Japan', 'Canada English', 'Korea', 'Canada French', 'Poland', 'Indonesia', 'Philippines English', - 'Indonesia English', 'Turkey', 'Thailand English', 'Thailand', 'Singapore', 'Philippines', 'India'], - }, - }, - { element: this.adobecom, conditions: { includeCountries: ['United States'] } }, - { element: this.pdfAndESignature, conditions: { includeCountries: ['United States'] } }, - { element: this.marketingAndCommerce, conditions: { includeCountries: ['United States'] } }, - { element: this.helpAndSupport, conditions: { includeCountries: ['United States'] } }, + { element: this.aiOverview, conditions: { defaultVisibility: true, excludeCountries: ['Japan'] } }, + { element: this.adobeFirefly, conditions: { defaultVisibility: true, excludeCountries: ['Japan'] } }, + { element: this.adobeFireFlyTwo, conditions: { includeCountries: ['Japan'] } }, + { element: this.adobecom, conditions: { defaultVisibility: true } }, + { element: this.pdfAndESignature, conditions: { defaultVisibility: true } }, + { element: this.marketingAndCommerce, conditions: { defaultVisibility: true } }, + { element: this.helpAndSupport, conditions: { defaultVisibility: true } }, { element: this.acrobatPro, conditions: { includeCountries: ['Spain'] } }, { element: this.adobeExpressEs, conditions: { includeCountries: ['Spain'] } }, { element: this.adobeStockEs, conditions: { includeCountries: ['Spain'] } }, { element: this.benifitsForCC, conditions: { includeCountries: ['Japan'] } }, { element: this.corporateInquiries, conditions: { includeCountries: ['Japan'] } }, - { - element: this.goToSpecialOffers, - conditions: { - includeCountries: ['Spain', 'Turkey', 'Thailand English', 'Thailand', 'Philippines', - 'Philippines English'], - }, - }, + { element: this.goToSpecialOffers, conditions: { includeCountries: ['Spain'] } }, { element: this.governmentAgencies, conditions: { includeCountries: ['Japan'] } }, { element: this.seeAllProducts, conditions: { includeCountries: ['Spain'] } }, { element: this.threeDAndARUS, conditions: { includeCountries: ['United States'] } }, @@ -302,4 +275,148 @@ export default class CreativeCloudEnterpriseSanity { await expect(element).toBeVisible(); })); } + + // Mobile, iPad & Tab methods + + // U-Nav + async validatingUnav() { + const elements = [this.hamburgerMenu, this.adobe, this.appSwitcher, this.signInButton]; + await Promise.all(elements.map(async (element) => { + await expect(element).toBeVisible(); + })); + } + + // Creativity & Design + async validatingCreativityAndDesign(country) { + await this.hamburgerMenu.click(); + + const skipCountries = ['United Kingdom', 'India', 'Spain']; + const addCountries = ['United Kingdom', 'India', 'Spain']; + + if (!skipCountries.includes(country)) { + await this.creativityAndDesignElements(country); + } else if (addCountries.includes(country)) { + await this.quickActionsElements(country); + } + + await this.creativityAndDesign.click(); + } + + async creativityAndDesignElements(country) { + await this.creativityAndDesign.click(); + const elementsToCheck = [ + { element: this.whatIsCC, conditions: { defaultVisibility: true } }, + { element: this.photographers, conditions: { defaultVisibility: true, excludeCountries: ['India'] } }, + { element: this.studentsAndTeachers, conditions: { defaultVisibility: true, excludeCountries: ['India'] } }, + { + element: this.individuals, + conditions: { defaultVisibility: true, excludeCountries: ['Germany', 'France', 'Italy'] }, + }, + { element: this.business, conditions: { defaultVisibility: true, excludeCountries: ['India'] } }, + { + element: this.schoolsAndUniversities, + conditions: { defaultVisibility: true, excludeCountries: ['India', 'Spain'] }, + }, + { + element: this.viewPlansAndPricing, + conditions: { defaultVisibility: true, excludeCountries: ['India', 'Spain'] }, + }, + ]; + + await Promise.all(elementsToCheck.map(async ({ element, conditions }) => { + if (conditions.excludeCountries && conditions.excludeCountries.includes(country)) { + await expect(element).not.toBeVisible(); + } else if (conditions.defaultVisibility) { + await expect(element).toBeVisible(); + } + })); + } + + async quickActionsElements(country) { + await this.creativityAndDesign.click(); + await this.quickActions.click(); + const elementsToCheck = [ + { element: this.whatIsCC, conditions: { defaultVisibility: true, excludeCountries: ['India'] } }, + { element: this.photoshop, conditions: { defaultVisibility: true, excludeCountries: ['India'] } }, + { element: this.adobeExpress, conditions: { defaultVisibility: true, excludeCountries: ['India', 'Spain'] } }, + { element: this.lightroom, conditions: { defaultVisibility: true, excludeCountries: ['India', 'Spain'] } }, + { element: this.illustrator, conditions: { defaultVisibility: true, excludeCountries: ['India'] } }, + { element: this.premierePro, conditions: { defaultVisibility: true, excludeCountries: ['India'] } }, + { element: this.adobeStock, conditions: { defaultVisibility: true, excludeCountries: ['India'] } }, + { element: this.viewPlansAndPricing, conditions: { includeCountries: ['United Kingdom'] } }, + { element: this.acrobatPro, conditions: { includeCountries: ['Spain'] } }, + { element: this.adobeStockEs, conditions: { includeCountries: ['Spain'] } }, + { element: this.seeAllProducts, conditions: { includeCountries: ['Spain'] } }, + { element: this.removeBackground, conditions: { includeCountries: ['India'] } }, + { element: this.resizeImage, conditions: { includeCountries: ['India'] } }, + { element: this.covertImageToSVG, conditions: { includeCountries: ['India'] } }, + { element: this.covertVideoToGIF, conditions: { includeCountries: ['India'] } }, + { element: this.createQRCode, conditions: { includeCountries: ['India'] } }, + { element: this.seeAllQuickActions, conditions: { includeCountries: ['India'] } }, + ]; + + await Promise.all(elementsToCheck.map(async ({ element, conditions }) => { + if (conditions.includeCountries && conditions.includeCountries.includes(country)) { + await expect(element).toBeVisible(); + } else if (conditions.excludeCountries && conditions.excludeCountries.includes(country)) { + await expect(element).not.toBeVisible(); + } else if (conditions.defaultVisibility) { + await expect(element).toBeVisible(); + } + })); + } + + // Products + async validatingProduct() { + await this.products.click(); + await this.solutions.click(); + await expect(this.creativeCloudForTeamsPro).toBeVisible(); + await this.featuredProducts.click(); + await expect(this.photoshopPro).toBeVisible(); + await this.more.click(); + await expect(this.substanceThreeDPro).toBeVisible(); + await this.products.click(); + } + + // Resources + async validatingResources() { + await this.resources.click(); + await this.learn.click(); + await expect(this.resourceCenter).toBeVisible(); + await this.support.click(); + await expect(this.helpCenter).toBeVisible(); + await this.hamburgerMenu.click(); + } + + // Footer + async validatingFooter() { + await this.changeRegion.scrollIntoViewIfNeeded(); + + const elements = [this.changeRegion, this.facebookLogo, this.twitterlogo, + this.linkedinLogo, this.copyright, this.privacyPolicy, this.termsOfUse, this.cookies, + this.protectMyPersonalData, this.adChoices, this.instagramLogo]; + + await Promise.all(elements.map(async (element) => { + expect(element).toBeVisible(); + })); + + await this.shopForFooter.click(); + await expect(this.footerCreativeCloud).toBeVisible(); + await this.forBusinessFooter.click(); + await expect(this.footerCreativeCloudForBusiness).toBeVisible(); + await this.forEducationFooter.click(); + await expect(this.footerdiscountForStudentsAndTeachers).toBeVisible(); + await this.forMobileFooter.click(); + await expect(this.footerappsForiOS).toBeVisible(); + await this.experienceCloudFooter.click(); + await expect(this.footerWhatIsExperienceCloud).toBeVisible(); + await this.supportFooter.click(); + await expect(this.footerDownloadAndInstall).toBeVisible(); + await this.resourcesFooter.click(); + await expect(this.footerAdobeBlog).toBeVisible(); + await this.adobeAcrobatFooter.click(); + await expect(this.footerLoginToYourAccount).toBeVisible(); + await this.adobeFooter.click(); + await expect(this.footerAbout).toBeVisible(); + } } diff --git a/tests/feds/ccepagesanity.test.js b/tests/feds/ccepagesanity.test.js index 08c3ca37..85489503 100644 --- a/tests/feds/ccepagesanity.test.js +++ b/tests/feds/ccepagesanity.test.js @@ -1,15 +1,15 @@ -import { expect, test, beforeEach, afterEach } from '@playwright/test'; +import { expect, test } from '@playwright/test'; import { features } from '../../features/feds/prodSanity/ccepagesanity.spec.js'; import CreativeCloudEnterpriseSanity from '../../selectors/feds/feds.ccepagesanity.page.js'; test.describe('Test Suite for Creative Cloud Business Enterprise Page Components', () => { let enterprise; - beforeEach(async ({ page }) => { + test.beforeEach(async ({ page }) => { enterprise = new CreativeCloudEnterpriseSanity(page); }); - afterEach(async ({ page }) => { + test.afterEach(async ({ page }) => { await page.close(); }); diff --git a/tests/feds/mobileCCEPageSanity.test.js b/tests/feds/mobileCCEPageSanity.test.js new file mode 100644 index 00000000..a8df179c --- /dev/null +++ b/tests/feds/mobileCCEPageSanity.test.js @@ -0,0 +1,36 @@ +import { expect, test } from '@playwright/test'; +import { features } from '../../features/feds/prodSanity/mobileTesting/mobileCCEPageSanity.spec.js'; +import CreativeCloudEnterpriseSanity from '../../selectors/feds/feds.ccepagesanity.page.js'; + +test.describe('Test Suite for Creative Cloud Business Enterprise Page Components', () => { + let enterprise; + + test.beforeEach(async ({ page }) => { + enterprise = new CreativeCloudEnterpriseSanity(page); + }); + + test.afterEach(async ({ page }) => { + await page.close(); + }); + + features.forEach((props) => { + test(`${props.name}, ${props.tags}, ${props.country}`, async ({ page, baseURL }) => { + console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[props.tcid].path}`); + + const pageURL = `${baseURL}${features[props.tcid].path}`; + await page.goto(pageURL, { waitUntil: 'networkidle' }); + await expect(page).toHaveURL(pageURL); + + // Verifying the visibility of U-NAV Elements + await enterprise.validatingUnav(); + // Verifying the visibility of Creativity & Design Elements + await enterprise.validatingCreativityAndDesign(props.country); + // Verifying the visibility of Product Elements + await enterprise.validatingProduct(); + // Verifying the visibility of Resource Elements + await enterprise.validatingResources(); + // Verifying the visibility of Footer Elements + await enterprise.validatingFooter(); + }); + }); +});