From 72efdaf6289d8acddc0e7e69d4b65e2e87b38de9 Mon Sep 17 00:00:00 2001 From: Pavan Kumar Date: Mon, 3 Jun 2024 11:03:06 +0530 Subject: [PATCH 1/5] Creative Cloud Test Scripts added --- features/feds/locales/creativeCloudUnav.json | 173 +++++++ .../creativeCloudUnavSanity.spec.js | 166 +++++++ .../feds/feds.creativeCloudUnavSanity.page.js | 442 ++++++++++++++++++ tests/feds/creativeCloudUnavSanity.test.js | 14 + 4 files changed, 795 insertions(+) create mode 100644 features/feds/locales/creativeCloudUnav.json create mode 100644 features/feds/prodSanity/creativeCloudUnavSanity.spec.js create mode 100644 selectors/feds/feds.creativeCloudUnavSanity.page.js create mode 100644 tests/feds/creativeCloudUnavSanity.test.js diff --git a/features/feds/locales/creativeCloudUnav.json b/features/feds/locales/creativeCloudUnav.json new file mode 100644 index 00000000..4dc80895 --- /dev/null +++ b/features/feds/locales/creativeCloudUnav.json @@ -0,0 +1,173 @@ +{ + "locales": { + "United States": { + "unavElements": "validatingUnavElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Germany": { + "unavElements": "validatingUnavSecondSetOfElements", + "photoVideoAndDesignElements": "validatingPhotoVideoAndDesignElements", + "programElements": "validatingProgramElements", + "subjectAreaElements": "validatingSubjectAreaElements", + "trainingAndSupportElements": "validatingTrainingAndSupportElements", + "footerElements": "validatingFooterElementsSecondSet" + }, + "France": { + "unavElements": "validatingUnavElements", + "photoVideoAndDesignElements": "validatingPhotoVideoAndDesignElements", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElementsSecondSet" + }, + "Italy": { + "unavElements": "validatingUnavSecondSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "programElements": "validatingProgramElements", + "subjectAreaElements": "validatingSubjectAreaElements", + "trainingAndSupportElements": "validatingTrainingAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "United Kingdom": { + "unavElements": "validatingUnavThirdSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElementsSecondSet", + "programElements": "validatingProgramElements", + "subjectAreaElements": "validatingSubjectAreaElements", + "trainingAndSupportElements": "validatingTrainingAndSupportElements", + "footerElements": "validatingFooterElementsThirdSet" + }, + "Middle East And North Africa": { + "unavElements": "validatingUnavFourthSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Japan": { + "unavElements": "validatingUnavSecondSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElementsThirdSet", + "programElements": "validatingProgramElements", + "subjectAreaElements": "validatingSubjectAreaElements", + "trainingAndSupportElements": "validatingTrainingAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "India": { + "unavElements": "validatingUnavFourthSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElementsSeventhSet", + "exploreElements": "validatingExploreElementsSecondSet", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Spain": { + "unavElements": "validatingUnavSecondSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElementsFourthSet", + "programElements": "validatingProgramSecondSetOfElements", + "subjectAreaElements": "validatingSubjectAreaSecondSetOfElements", + "trainingAndSupportElements": "validatingTrainingAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Canada English": { + "unavElements": "validatingUnavFourthSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Korea": { + "unavElements": "validatingUnavElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElementsFifthSet", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Canada French": { + "unavElements": "validatingUnavFourthSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Poland": { + "unavElements": "validatingUnavElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElementsSixthSet", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Mexico": { + "unavElements": "validatingUnavThirdSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "programElements": "validatingProgramElements", + "subjectAreaElements": "validatingSubjectAreaElements", + "trainingAndSupportElements": "validatingTrainingAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Australia": { + "unavElements": "validatingUnavFourthSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Indonesia": { + "unavElements": "validatingUnavFourthSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Indonesia English": { + "unavElements": "validatingUnavFourthSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Turkey": { + "unavElements": "validatingUnavSecondSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "programElements": "validatingProgramElements", + "subjectAreaElements": "validatingSubjectAreaElements", + "trainingAndSupportElements": "validatingTrainingAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Thailand English": { + "unavElements": "validatingUnavFourthSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Thailand": { + "unavElements": "validatingUnavThirdSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "programElements": "validatingProgramElements", + "subjectAreaElements": "validatingSubjectAreaElements", + "trainingAndSupportElements": "validatingTrainingAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Singapore": { + "unavElements": "validatingUnavFourthSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Philippines": { + "unavElements": "validatingUnavFourthSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Philippines English": { + "unavElements": "validatingUnavFourthSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + } + } +} \ No newline at end of file diff --git a/features/feds/prodSanity/creativeCloudUnavSanity.spec.js b/features/feds/prodSanity/creativeCloudUnavSanity.spec.js new file mode 100644 index 00000000..5654bbbe --- /dev/null +++ b/features/feds/prodSanity/creativeCloudUnavSanity.spec.js @@ -0,0 +1,166 @@ +module.exports = { + name: 'Creative Cloud UNAV Page', + features: [ + { + tcid: '0', + name: '@UnitedStatesCCUnavPageCheck', + path: '/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavUnitedStates', + country: 'United States', + }, + { + tcid: '1', + name: '@GermanyCCUnavPageCheck', + path: '/de/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavGermany', + country: 'Germany', + }, + { + tcid: '2', + name: '@FranceCCUnavPageCheck', + path: '/fr/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavFrance', + country: 'France', + }, + { + tcid: '3', + name: '@ItalyCCUnavPageCheck', + path: '/it/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavItaly', + country: 'Italy', + }, + { + tcid: '4', + name: '@UnitedKingdomCCUnavPageCheck', + path: '/uk/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavUnitedKingdom', + country: 'United Kingdom', + }, + { + tcid: '5', + name: '@MiddleEastAndNorthAfricaCCUnavPageCheck', + path: '/mena_ar/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavMiddleEastAndNorthAfrica', + country: 'Middle East And North Africa', + }, + { + tcid: '6', + name: '@JapanCCUnavPageCheck', + path: '/jp/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavJapan', + country: 'Japan', + }, + { + tcid: '7', + name: '@IndiaCCUnavPageCheck', + path: '/in/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavIndia', + country: 'India', + }, + { + tcid: '8', + name: '@SpainCCUnavPageCheck', + path: '/es/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavSpain', + country: 'Spain', + }, + { + tcid: '9', + name: '@CanadaEnglishCCUnavPageCheck', + path: '/ca/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavCanadaEnglish', + country: 'Canada English', + }, + { + tcid: '10', + name: '@KoreaCCUnavPageCheck', + path: '/kr/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavKorea', + country: 'Korea', + }, + { + tcid: '11', + name: '@CanadaFrenchCCUnavPageCheck', + path: '/ca_fr/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavCanadaFrench', + country: 'Canada French', + }, + { + tcid: '12', + name: '@PolandCCUnavPageCheck', + path: '/pl/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavPoland', + country: 'Poland', + }, + { + tcid: '13', + name: '@MexicoCCUnavPageCheck', + path: '/mx/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavMexico', + country: 'Mexico', + }, + { + tcid: '14', + name: '@AustraliaCCUnavPageCheck', + path: '/au/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavAustralia', + country: 'Australia', + }, + { + tcid: '15', + name: '@IndonesiaCCUnavPageCheck', + path: '/id_id/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavIndonesia', + country: 'Indonesia', + }, + { + tcid: '16', + name: '@IndonesiaEnglishCCUnavPageCheck', + path: '/id_en/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavIndonesiaEnglish', + country: 'Indonesia English', + }, + { + tcid: '17', + name: '@TurkeyCCUnavPageCheck', + path: '/tr/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavTurkey', + country: 'Turkey', + }, + { + tcid: '18', + name: '@ThailandEnglishCCUnavPageCheck', + path: '/th_en/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavThailandEnglish', + country: 'Thailand English', + }, + { + tcid: '19', + name: '@ThailandCCUnavPageCheck', + path: '/th_th/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavThailand', + country: 'Thailand', + }, + { + tcid: '20', + name: '@SingaporeCCUnavPageCheck', + path: '/sg/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavSingapore', + country: 'Singapore', + }, + { + tcid: '21', + name: '@PhilippinesCCUnavPageCheck', + path: '/ph_fil/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavPhilippines', + country: 'Philippines', + }, + { + tcid: '22', + name: '@PhilippinesEnglishCCUnavPageCheck', + path: '/ph_fil/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavPhilippinesEnglish', + country: 'Philippines English', + } + ] +} \ No newline at end of file diff --git a/selectors/feds/feds.creativeCloudUnavSanity.page.js b/selectors/feds/feds.creativeCloudUnavSanity.page.js new file mode 100644 index 00000000..1e209556 --- /dev/null +++ b/selectors/feds/feds.creativeCloudUnavSanity.page.js @@ -0,0 +1,442 @@ +import { expect, test } from "@playwright/test"; +import { features } from "../../features/feds/prodSanity/creativeCloudUnavSanity.spec"; + +export default class CreativeCloudUnavSanity { + constructor(page) { + this.page = page; + + // Adobe Brand Logo, appswitcher and signIn button + this.adobeLogo = page.locator('a.feds-brand'); + this.appSwitcher = page.locator('#unav-app-switcher'); + this.signInButton = page.locator('#unav-profile'); + this.signInButtonTwo = page.locator('.feds-signIn'); + + // Promo button + this.closePromoButton = page.locator('.foreground.container button'); + + // U-Nav Elements + this.creativityAndDesign = page.locator('.feds-navItem:nth-child(1) button'); + this.adobeCreativeCloud = page.locator('.feds-navItem:nth-child(2) a'); + this.explore = page.locator('.feds-navItem:nth-child(3) button'); + this.features = page.locator('.feds-navItem:nth-child(4) a'); + this.forBusiness = page.locator('.feds-navItem:nth-child(5) a'); + this.comparePlans = page.locator('.feds-navItem:nth-child(6) a'); + this.learnAndSupport = page.locator('.feds-navItem:nth-child(7) button'); + + this.photoVideoAndDesign = page.locator('.feds-navItem:nth-child(1) button'); + this.creativeCloud = page.locator('.feds-navItem:nth-child(2) a'); + this.program = page.locator('.feds-navItem:nth-child(3) button'); + this.subjectArea = page.locator('.feds-navItem:nth-child(4) button'); + this.trainingAndSupport = page.locator('.feds-navItem:nth-child(5) button'); + this.pricesAndSubscriptions = page.locator('.feds-navItem:nth-child(6) a'); + this.aboInfo = page.locator('.feds-navItem:nth-child(7) a'); + this.appRecomendation = page.locator('.feds-navItem:nth-child(8) a'); + + this.buyNowButton = page.locator('.feds-cta-wrapper [href*="plans.html"]').nth(1); + this.buyNowButtonTwo = page.locator('.feds-cta-wrapper [href*="plans.html?filter=acrobat"]'); + + // Creativity & Design + this.whatIsCC = page.locator('.feds-popup [href*="creativecloud.html"]').nth(0); + this.photographers = page.locator('.feds-popup [href*="photography.html"]').nth(0); + this.studentsAndTeachers = page.locator('.feds-popup [href*="students.html"]'); + this.individuals = page.locator('.feds-popup [href*="all-apps.html"]').nth(0); + this.educationInstitutions = page.locator('.feds-popup [href*="education.html"]'); + this.business = page.locator('.feds-popup [href*="business.html"]'); + this.schoolsAndUniversities = page.locator('.feds-popup [href*="education.html"]'); + this.forGovernmentAgencies = page.locator('.feds-popup [href*="government.html"]'); + this.benifitsForCreativeCloudPaidMembers = page.locator('.feds-popup [href*="cc-paid-member-benefits.html"]'); + this.viewPlansAndPricing = page.locator('.feds-cta--primary[href$="plans.html"]').nth(0); + this.seeAllProducts = page.locator('.feds-cta--primary[href*="products/catalog.html"]'); + + this.photoshop = page.locator('.feds-popup [href*="products/photoshop.html"]').nth(0); + this.adobeExpress = page.locator('.feds-popup [href*="express"]').nth(0); + this.adobePro = page.locator('.feds-popup [href*="products/acrobat-pro-cc.html"]').nth(0); + this.lightroom = page.locator('.feds-popup [href*="photoshop-lightroom.html"]').nth(0); + this.illustrator = page.locator('.feds-popup [href*="products/illustrator.html"]').nth(0); + this.premierePro = page.locator('.feds-popup [href*="products/premiere.html"]').nth(0); + this.adobeStock = page.locator('.feds-popup [href*="globalnav"]'); + this.adobeStockTwo = page.locator('.feds-popup [href*="?promoid=JQVGW2DZ&mv=other"]'); + this.adobeFireflyPro = page.locator('.feds-popup a[href$="generative-ai/firefly.html"]').nth(0); + this.viewAllProducts = page.locator('.feds-popup [href*="category=creativity-design"]').nth(0); + this.seePlansAndPricing = page.locator('.feds-popup [href*="creativecloud/plans.html"]'); + + this.removeBackground = page.locator('[href*="KCJMVG5Q&mv=other"]'); + this.resizeImage = page.locator('[href*="GVTYXXVD&mv=other"]'); + this.covertImageToSVG = page.locator('[href*="K42KVPMS&mv=other"]'); + this.covertVideoToGIF = page.locator('[href*="JZBJVTCT&mv=other"]'); + this.createQRCode = page.locator('[href*="KH8NVBFP&mv=other"]'); + this.seeAllQuickActions = page.locator('[href*="H822XKN9&mv=other"]'); + + this.resume = page.locator('[href*="GMCWY715&mv=other"]'); + this.posters = page.locator('[href*="FZPQYTPB&mv=other"]'); + this.card = page.locator('[href*="GVTYXYK3&mv=other"]'); + this.instagramPost = page.locator('[href*="7DRZ6CYM&mv=other"]'); + this.youTubeVideo = page.locator('[href*="7JJ1687L&mv=other"]'); + this.createNow = page.locator('[href*="J7XBWKS1&mv=other"]'); + + this.adobeExpressIn = page.locator('[href*="HCS3XGLY&mv=other"]'); + + this.photo = page.locator('.feds-popup [href*="?promoid=D8F91JW4&mv=other"]'); + this.graphicDesign = page.locator('.feds-menu-items a[href$="/design.html"]'); + this.Video = page.locator('.feds-menu-items a[href$="/video.html"]'); + this.illustration = page.locator('.feds-menu-items a[href$="/illustration.html"]'); + this.socialMedia = page.locator('.feds-menu-items a[href$="/social-media.html"]'); + this.threeDAndAR = page.locator('.feds-popup a[href$="/3d-ar.html"]').nth(0); + this.pdf = page.locator('.feds-menu-items a[href$="acrobat-pro-cc.html"]'); + + this.aiOverviewCC = page.locator('.feds-popup a[href$="ai/overview.html"]'); + this.adobeFirefly = page.locator('.feds-popup a[href$="products/firefly.html"]'); + this.adobeFireflyCC = page.locator('.feds-popup a[href*="firefly.html"]'); + + this.adobecom = page.locator('.feds-popup a[href$="/index.html"]'); + this.pdfAndESignatures = page.locator('.feds-popup a[href$="/acrobat.html"]'); + this.marketingAndCommerce = page.locator('.feds-popup a[href*="business.adobe.com"]'); + this.helpAndSupport = page.locator('.feds-popup a[href$="support.html"]'); + + // Explore + this.graphicDesignExplore = page.locator('.feds-popup a[href$="design.html"]').nth(1); + this.graphicDesignExploreIn = page.locator('.feds-popup a[href$="design.html"]'); + + // Learn & Support + this.home = page.locator('.feds-popup a[href$="support/creative-cloud.html"]'); + + // Program + this.photoshopPr = page.locator('.feds-popup a[href$="products/photoshop.html"]').nth(1); + this.photoshopAp = page.locator('.feds-popup a[href$="products/photoshop.html"]'); + + // Subject Areas + this.photoSa = page.locator('.feds-popup a[href$="creativecloud/photography.html"]').nth(1); + this.photoCa = page.locator('.feds-popup a[href$="creativecloud/photography.html"]'); + + // Training & Support + this.innovations = page.locator('.feds-popup a[href$="creativecloud/features.html"]'); + + // Footer + this.footerCreativeCloud = page.locator('.feds-footer-wrapper a[href*="creativecloud.html"]'); + this.footerCreativeCloudForBusiness = page.locator('.feds-footer-wrapper a[href*="creativecloud/business.html"]'); + this.footerdiscountForStudentsAndTeachers = page.locator('.feds-footer-wrapper a[href*="students.html"]'); + this.footerappsForiOS = page.locator('.feds-footer-wrapper a[href*="id852473028"]'); + this.footerWhatIsExperienceCloud = page.locator('.feds-menu-items a[href*="business.adobe.com"]').nth(0); + this.footerWhatIsExperienceCloudTwo = page.locator('.feds-menu-items a[href*="experience-cloud.html"]'); + this.footerDownloadAndInstall = page.locator('.feds-footer-wrapper a[href$="download-install.html"]'); + this.footerAdobeBlog = page.locator('.feds-footer-wrapper a[href*="blog.adobe.com/"]'); + this.footerLoginToYourAccount = page.locator('a[href$="account.adobe.com/"]').nth(0); + this.footerAbout = page.locator('.feds-footer-wrapper a[href$="about-adobe.html"]'); + + // Featured Products + this.footerAdobeAcrobatReaderlogo = page.locator('a[href$="reader/"]'); + this.footerAdobeExpresslogo = page.locator('a[href$="Z2G1FSYV&mv=other"]:nth-of-type(2)'); + this.footerPhotoshoplogo = page.locator('a[href$="photoshop/free-trial-download.html"]'); + this.footerIllustratorlogo = page.locator('a[href$="illustrator/free-trial-download.html"]'); + + // Change Region and social media + this.changeRegion = page.locator('.feds-regionPicker-wrapper'); + this.facebookLogo = page.locator('a[href*="facebook"]'); + this.instagramLogo = page.locator('a[href*="instagram.com"]'); + this.twitterlogo = page.locator('a[href*="twitter"]'); + this.linkedinLogo = page.locator('a[href*="linkedin"]'); + this.copyright = page.locator('.feds-footer-legalWrapper>p>span'); + this.privacyPolicy = page.locator('.feds-footer-legalWrapper a:nth-of-type(1)'); + this.termsOfUse = page.locator('.feds-footer-legalWrapper a:nth-of-type(2)'); + this.cookies = page.locator('.feds-footer-legalWrapper a:nth-of-type(3)'); + this.protectMyPersonalData = page.locator('.feds-footer-legalWrapper a:nth-of-type(4)'); + this.adChoices = page.locator('.feds-footer-legalWrapper a:nth-of-type(5)'); + } + + // UNAV + async validatingUnavElements() { + await this.page.waitForLoadState("networkidle"); + const elements = [this.adobeLogo, this.creativityAndDesign, this.adobeCreativeCloud, this.explore, this.features, this.forBusiness, this.comparePlans, + this.learnAndSupport, this.buyNowButton, this.appSwitcher, this.signInButton]; + const promises = elements.map(async element => { await expect(element).toBeVisible() }) + await Promise.all(promises); + }; + + async validatingUnavSecondSetOfElements() { + await this.page.waitForLoadState("networkidle"); + const elements = [this.adobeLogo, this.photoVideoAndDesign, this.creativeCloud, this.program, this.subjectArea, this.trainingAndSupport, + this.pricesAndSubscriptions, this.aboInfo, this.appRecomendation, this.buyNowButton, this.appSwitcher, this.signInButton]; + const promises = elements.map(async element => { await expect(element).toBeVisible() }) + await Promise.all(promises); + }; + + async validatingUnavThirdSetOfElements() { + await this.page.waitForLoadState("networkidle"); + const elements = [this.adobeLogo, this.creativityAndDesign, this.creativeCloud, this.program, this.subjectArea, this.trainingAndSupport, + this.pricesAndSubscriptions, this.aboInfo, this.appRecomendation, this.buyNowButton, this.signInButtonTwo]; + const promises = elements.map(async element => { await expect(element).toBeVisible() }) + await Promise.all(promises); + }; + + async validatingUnavFourthSetOfElements() { + await this.page.waitForLoadState("networkidle"); + const elements = [this.adobeLogo, this.creativityAndDesign, this.adobeCreativeCloud, this.explore, this.features, this.forBusiness, this.comparePlans, + this.learnAndSupport, this.buyNowButton, this.signInButtonTwo]; + const promises = elements.map(async element => { await expect(element).toBeVisible() }); + await Promise.all(promises); + }; + + // Creativity & Design + async validatingCreativityAndDesignElements() { + await this.creativityAndDesign.click({ timeout: 5000 }); + await this.page.waitForLoadState("networkidle"); + const elements = [this.whatIsCC, this.photographers, this.studentsAndTeachers, this.individuals, this.business, this.schoolsAndUniversities, + this.viewPlansAndPricing, this.photoshop, this.adobeExpress, this.lightroom, this.illustrator, this.premierePro, this.adobeStock, this.viewAllProducts, + this.photo, this.graphicDesign, this.Video, this.illustration, this.socialMedia, this.threeDAndAR, this.pdf, this.aiOverviewCC, this.adobeFirefly, + this.adobecom, this.pdfAndESignatures, this.marketingAndCommerce, this.helpAndSupport]; + + const promises = elements.map(async element => { await expect(element).toBeVisible() }) + await Promise.all(promises); + await this.creativityAndDesign.click({ timeout: 5000 }); + }; + + async validatingCreativityAndDesignElementsSecondSet() { + await this.creativityAndDesign.click({ timeout: 5000 }); + await this.page.waitForLoadState('networkidle'); + const elements = [this.whatIsCC, this.photoshop, this.adobeExpress, this.lightroom, this.illustrator, this.premierePro, this.adobeStock, this.viewPlansAndPricing, + this.individuals, this.business, this.photographers, this.studentsAndTeachers, this.schoolsAndUniversities, this.viewAllProducts, this.photo, this.graphicDesign, + this.Video, this.illustration, this.socialMedia, this.threeDAndAR, this.pdf, this.aiOverviewCC, this.adobeFirefly, this.adobecom, this.pdfAndESignatures, + this.marketingAndCommerce, this.helpAndSupport]; + + const promises = elements.map(async element => { await expect(element).toBeVisible() }) + await Promise.all(promises); + await this.creativityAndDesign.click({ timeout: 5000 }); + }; + + async validatingCreativityAndDesignElementsThirdSet() { + await this.creativityAndDesign.click({ timeout: 5000 }); + await this.page.waitForLoadState("networkidle"); + const elements = [this.whatIsCC, this.photographers, this.studentsAndTeachers, this.individuals, this.business, this.schoolsAndUniversities, + this.forGovernmentAgencies, this.benifitsForCreativeCloudPaidMembers, this.viewPlansAndPricing, this.photoshop, this.adobeExpress, this.lightroom, + this.illustrator, this.premierePro, this.adobeStock, this.adobeFireflyPro, this.viewAllProducts, this.photo, this.graphicDesign, this.Video, this.illustration, + this.socialMedia, this.threeDAndAR, this.pdf, this.adobeFirefly, this.adobecom, this.pdfAndESignatures, this.marketingAndCommerce, this.helpAndSupport]; + + const promises = elements.map(async element => { await expect(element).toBeVisible() }) + await Promise.all(promises); + await this.creativityAndDesign.click({ timeout: 5000 }); + }; + + async validatingCreativityAndDesignElementsFourthSet() { + await this.creativityAndDesign.click({ timeout: 5000 }); + await this.page.waitForLoadState("networkidle"); + const elements = [this.whatIsCC, this.photoshop, this.adobeExpress, this.adobePro, this.illustrator, this.premierePro, this.adobeStockTwo, this.seeAllProducts, + this.individuals, this.photographers, this.studentsAndTeachers, this.business, this.seePlansAndPricing, this.photo, this.graphicDesign, this.Video, this.illustration, + this.socialMedia, this.threeDAndAR, this.pdf, this.aiOverviewCC, this.adobeFirefly, this.adobecom, this.pdfAndESignatures, this.marketingAndCommerce, this.helpAndSupport]; + + const promises = elements.map(async element => { await expect(element).toBeVisible() }) + await Promise.all(promises); + await this.creativityAndDesign.click({ timeout: 5000 }); + }; + + async validatingCreativityAndDesignElementsFifthSet() { + await this.creativityAndDesign.click({ timeout: 5000 }); + await this.page.waitForLoadState("networkidle"); + const elements = [this.whatIsCC, this.photographers, this.studentsAndTeachers, this.individuals, this.business, this.schoolsAndUniversities, + this.viewPlansAndPricing, this.photoshop, this.adobeExpress, this.lightroom, this.illustrator, this.premierePro, this.adobeStock, this.viewAllProducts, + this.photo, this.graphicDesign, this.Video, this.illustration, this.socialMedia, this.threeDAndAR, this.pdf, this.adobeFirefly, + this.adobecom, this.pdfAndESignatures, this.marketingAndCommerce, this.helpAndSupport]; + + const promises = elements.map(async element => { await expect(element).toBeVisible() }) + await Promise.all(promises); + await this.creativityAndDesign.click({ timeout: 5000 }); + }; + + async validatingCreativityAndDesignElementsSixthSet() { + await this.creativityAndDesign.click({ timeout: 5000 }); + await this.page.waitForLoadState("networkidle"); + const elements = [this.whatIsCC, this.photographers, this.studentsAndTeachers, this.individuals, this.business, this.schoolsAndUniversities, + this.viewPlansAndPricing, this.photoshop, this.adobeExpress, this.lightroom, this.illustrator, this.premierePro, this.adobeStock, this.viewAllProducts, + this.photo, this.graphicDesign, this.Video, this.illustration, this.socialMedia, this.threeDAndAR, this.pdf, this.aiOverviewCC, this.adobeFireflyCC, + this.adobecom, this.pdfAndESignatures, this.marketingAndCommerce, this.helpAndSupport]; + + const promises = elements.map(async element => { await expect(element).toBeVisible() }); + await Promise.all(promises); + await this.creativityAndDesign.click({ timeout: 5000 }); + }; + + async validatingCreativityAndDesignElementsSeventhSet() { + await this.creativityAndDesign.click({ timeout: 5000 }); + await this.page.waitForLoadState("networkidle"); + const elements = [this.removeBackground, this.resizeImage, this.covertImageToSVG, this.covertVideoToGIF, this.createQRCode, this.seeAllQuickActions, this.resume, + this.posters, this.card, this.instagramPost, this.youTubeVideo, this.createNow, this.whatIsCC, this.adobeExpressIn, this.photoshop, this.premierePro, + this.illustrator, this.seePlansAndPricing, this.adobeFireflyCC, this.adobecom, this.pdfAndESignatures, this.marketingAndCommerce, this.helpAndSupport]; + + const promises = elements.map(async element => { await expect(element).toBeVisible() }); + await Promise.all(promises); + await this.creativityAndDesign.click({ timeout: 5000 }); + }; + + // Photo Video & Design + async validatingPhotoVideoAndDesignElements() { + this.photoVideoAndDesign.click({ timeout: 5000 }); + await this.page.waitForLoadState("networkidle"); + const elements = [this.whatIsCC, this.photographers, this.studentsAndTeachers, this.educationInstitutions, this.business, this.schoolsAndUniversities, + this.viewPlansAndPricing, this.photoshop, this.adobeExpress, this.premierePro, this.illustrator, this.lightroom, this.adobeStock, this.viewAllProducts, + this.photo, this.graphicDesign, this.Video, this.illustration, this.socialMedia, this.threeDAndAR, this.pdf, this.aiOverviewCC, this.adobeFirefly, + this.adobecom, this.pdfAndESignatures, this.marketingAndCommerce, this.helpAndSupport]; + + const promises = elements.map(async element => { await expect(element).toBeVisible() }) + await Promise.all(promises); + this.photoVideoAndDesign.click({ timeout: 5000 }); + }; + + // Explore + async validatingExploreElements() { + this.explore.click({ timeout: 5000 }); + const elements = [this.graphicDesignExplore]; + const promises = elements.map(async element => { await expect(element).toBeVisible() }) + await Promise.all(promises); + this.explore.click({ timeout: 5000 }); + }; + + async validatingExploreElementsSecondSet() { + this.explore.click({ timeout: 5000 }); + const elements = [this.graphicDesignExploreIn]; + const promises = elements.map(async element => { await expect(element).toBeVisible() }) + await Promise.all(promises); + this.explore.click({ timeout: 5000 }); + }; + + // Learn & Support + async validatingLearnAndSupportElements() { + this.learnAndSupport.click({ timeout: 5000 }); + const elements = [this.home]; + const promises = elements.map(async element => { await expect(element).toBeVisible() }); + await Promise.all(promises); + this.learnAndSupport.click({ timeout: 5000 }); + }; + + // Program + async validatingProgramElements() { + this.program.click({ timeout: 5000 }); + const elements = [this.photoshopPr]; + const promises = elements.map(async element => { await expect(element).toBeVisible() }) + await Promise.all(promises); + this.program.click({ timeout: 5000 }); + } + + async validatingProgramSecondSetOfElements() { + this.program.click({ timeout: 5000 }); + const elements = [this.photoshopAp]; + const promises = elements.map(async element => { await expect(element).toBeVisible() }) + await Promise.all(promises); + this.program.click({ timeout: 5000 }); + } + + // Subject Area + async validatingSubjectAreaElements() { + this.subjectArea.click({ timeout: 5000 }); + const elements = [this.photoSa]; + const promises = elements.map(async element => { await expect(element).toBeVisible() }) + await Promise.all(promises); + this.subjectArea.click({ timeout: 5000 }); + } + + async validatingSubjectAreaSecondSetOfElements() { + this.subjectArea.click({ timeout: 5000 }); + const elements = [this.photoCa]; + const promises = elements.map(async element => { await expect(element).toBeVisible() }) + await Promise.all(promises); + this.subjectArea.click({ timeout: 5000 }); + } + + // Training & Support + async validatingTrainingAndSupportElements() { + this.trainingAndSupport.click({ timeout: 5000 }); + const elements = [this.innovations]; + const promises = elements.map(async element => { await expect(element).toBeVisible() }) + await Promise.all(promises); + this.trainingAndSupport.click({ timeout: 5000 }); + } + + // Footer + async validatingFooterElements() { + const elements = [this.footerCreativeCloud, this.footerCreativeCloudForBusiness, this.footerdiscountForStudentsAndTeachers, this.footerappsForiOS, + this.footerWhatIsExperienceCloud, this.footerDownloadAndInstall, this.footerAdobeBlog, this.footerLoginToYourAccount, this.footerAbout, + this.footerAdobeAcrobatReaderlogo, this.footerAdobeExpresslogo, this.footerPhotoshoplogo, this.footerIllustratorlogo, this.changeRegion, this.facebookLogo, + this.instagramLogo, this.twitterlogo, this.linkedinLogo, this.copyright, this.privacyPolicy, this.termsOfUse, this.cookies, this.protectMyPersonalData, + this.adChoices]; + const promises = elements.map(async element => { await expect(element).toBeVisible() }) + await Promise.all(promises); + }; + + async validatingFooterElementsSecondSet() { + const elements = [this.footerCreativeCloud, this.footerCreativeCloudForBusiness, this.footerdiscountForStudentsAndTeachers, this.footerappsForiOS, + this.footerWhatIsExperienceCloudTwo, this.footerDownloadAndInstall, this.footerAdobeBlog, this.footerLoginToYourAccount, this.footerAbout, + this.footerAdobeAcrobatReaderlogo, this.footerAdobeExpresslogo, this.footerPhotoshoplogo, this.footerIllustratorlogo, this.changeRegion, this.facebookLogo, + this.instagramLogo, this.twitterlogo, this.linkedinLogo, this.copyright, this.privacyPolicy, this.termsOfUse, this.cookies, this.protectMyPersonalData, + this.adChoices]; + const promises = elements.map(async element => { await expect(element).toBeVisible() }) + await Promise.all(promises); + }; + + async validatingFooterElementsThirdSet() { + const elements = [this.footerCreativeCloud, this.footerWhatIsExperienceCloudTwo, this.footerDownloadAndInstall, this.footerAdobeBlog, + this.footerLoginToYourAccount, this.footerAbout, this.footerAdobeAcrobatReaderlogo, this.footerAdobeExpresslogo, this.footerPhotoshoplogo, + this.footerIllustratorlogo, this.changeRegion, this.facebookLogo, this.instagramLogo, this.twitterlogo, this.linkedinLogo, this.copyright, + this.privacyPolicy, this.termsOfUse, this.cookies, this.protectMyPersonalData, this.adChoices]; + const promises = elements.map(async element => { await expect(element).toBeVisible() }) + await Promise.all(promises); + }; + + // Promo Button + async closingPromoButton() { + try { + await this.closePromoButton.click({ timeout: 5000 }); + } catch (error) { + console.error("Error occurred while clicking the closing the Promo button"); + } + }; + + // Test Script + async validatingCreativeCloudUnavPages(page, baseURL, featureIndex, locale, creativeCloudUnav, creativeCloud) { + + console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[featureIndex].path}`); + + const validateElementVisibility = async (element) => { + await Promise.all(element.map(elem => expect(creativeCloud[elem]).toBeVisible())); + }; + + await test.step(`Validating ${locale} Locale Page`, async () => { + const pageURL = `${baseURL}${features[featureIndex].path}`; + await page.goto(pageURL, { waitUntil: 'domcontentloaded' }); + await expect(page).toHaveURL(pageURL); + + // Verifying the visibility of UNAV Elements + await page.waitForLoadState('domcontentloaded'); + const { unavElements } = creativeCloudUnav.locales[locale]; + if (unavElements) await this[unavElements](); + + // Verifying the visibility of Elements for each Section + const elementsToVerify = ["creativityAndDesignElements", "photoVideoAndDesignElements", "exploreElements", "learnAndSupportElements", + "programElements", "subjectAreaElements", "trainingAndSupportElements"]; + + for (const element of elementsToVerify) { + const { [element]: elementVisibility } = creativeCloudUnav.locales[locale]; + if (elementVisibility) { + await this[elementVisibility](); + } + } + + // closing the Promo button + await this.closingPromoButton(); + + // Verifiying the visibility of footer Elements + await this.changeRegion.scrollIntoViewIfNeeded(); + const { footerElements } = creativeCloudUnav.locales[locale]; + if (footerElements) await this[footerElements](); + + // Verifying and clicking the "Buy Now" button + try { + await this.buyNowButton.click({ timeout: 5000 }); + } catch (error) { + await this.buyNowButtonTwo.click({ timeout: 5000 }); + } + await page.waitForLoadState('domcontentloaded'); + const url = await page.url(); + console.info("[Validation] URL of Buy Now Page:", url); + await expect.soft(page).toHaveURL(url); + }); + }; + +}; \ No newline at end of file diff --git a/tests/feds/creativeCloudUnavSanity.test.js b/tests/feds/creativeCloudUnavSanity.test.js new file mode 100644 index 00000000..bba03f44 --- /dev/null +++ b/tests/feds/creativeCloudUnavSanity.test.js @@ -0,0 +1,14 @@ +import { expect, test } from "@playwright/test"; +import { features } from "../../features/feds/prodSanity/creativeCloudUnavSanity.spec"; +import CreativeCloudUnavSanity from "../../selectors/feds/feds.creativeCloudUnavSanity.page"; +import creativeCloudUnav from "../../features/feds/locales/creativeCloudUnav.json"; + +test.describe('Test Suite for Creative Cloud Page Components', () => { + + features.forEach((props) => { + test(`${props.name}, ${props.tags}`, async ({ page, baseURL }) => { + const creativeCloud = new CreativeCloudUnavSanity(page); + await creativeCloud.validatingCreativeCloudUnavPages(page, baseURL, props.tcid, props.country, creativeCloudUnav, creativeCloud); + }); + }); +}); \ No newline at end of file From 0504b2647752952c10ec10d9dccd43c54efd25b2 Mon Sep 17 00:00:00 2001 From: Pavan Kumar Date: Thu, 6 Jun 2024 14:52:19 +0530 Subject: [PATCH 2/5] Fixed eslint errors and optimized the code --- features/feds/locales/creativeCloudUnav.json | 340 ++++---- .../creativeCloudUnavSanity.spec.js | 328 +++---- .../feds/feds.creativeCloudUnavSanity.page.js | 816 +++++++++--------- tests/feds/creativeCloudUnavSanity.test.js | 21 +- 4 files changed, 732 insertions(+), 773 deletions(-) diff --git a/features/feds/locales/creativeCloudUnav.json b/features/feds/locales/creativeCloudUnav.json index 4dc80895..c3207363 100644 --- a/features/feds/locales/creativeCloudUnav.json +++ b/features/feds/locales/creativeCloudUnav.json @@ -1,173 +1,173 @@ { - "locales": { - "United States": { - "unavElements": "validatingUnavElements", - "creativityAndDesignElements": "validatingCreativityAndDesignElements", - "exploreElements": "validatingExploreElements", - "learnAndSupportElements": "validatingLearnAndSupportElements", - "footerElements": "validatingFooterElements" - }, - "Germany": { - "unavElements": "validatingUnavSecondSetOfElements", - "photoVideoAndDesignElements": "validatingPhotoVideoAndDesignElements", - "programElements": "validatingProgramElements", - "subjectAreaElements": "validatingSubjectAreaElements", - "trainingAndSupportElements": "validatingTrainingAndSupportElements", - "footerElements": "validatingFooterElementsSecondSet" - }, - "France": { - "unavElements": "validatingUnavElements", - "photoVideoAndDesignElements": "validatingPhotoVideoAndDesignElements", - "exploreElements": "validatingExploreElements", - "learnAndSupportElements": "validatingLearnAndSupportElements", - "footerElements": "validatingFooterElementsSecondSet" - }, - "Italy": { - "unavElements": "validatingUnavSecondSetOfElements", - "creativityAndDesignElements": "validatingCreativityAndDesignElements", - "programElements": "validatingProgramElements", - "subjectAreaElements": "validatingSubjectAreaElements", - "trainingAndSupportElements": "validatingTrainingAndSupportElements", - "footerElements": "validatingFooterElements" - }, - "United Kingdom": { - "unavElements": "validatingUnavThirdSetOfElements", - "creativityAndDesignElements": "validatingCreativityAndDesignElementsSecondSet", - "programElements": "validatingProgramElements", - "subjectAreaElements": "validatingSubjectAreaElements", - "trainingAndSupportElements": "validatingTrainingAndSupportElements", - "footerElements": "validatingFooterElementsThirdSet" - }, - "Middle East And North Africa": { - "unavElements": "validatingUnavFourthSetOfElements", - "creativityAndDesignElements": "validatingCreativityAndDesignElements", - "exploreElements": "validatingExploreElements", - "learnAndSupportElements": "validatingLearnAndSupportElements", - "footerElements": "validatingFooterElements" - }, - "Japan": { - "unavElements": "validatingUnavSecondSetOfElements", - "creativityAndDesignElements": "validatingCreativityAndDesignElementsThirdSet", - "programElements": "validatingProgramElements", - "subjectAreaElements": "validatingSubjectAreaElements", - "trainingAndSupportElements": "validatingTrainingAndSupportElements", - "footerElements": "validatingFooterElements" - }, - "India": { - "unavElements": "validatingUnavFourthSetOfElements", - "creativityAndDesignElements": "validatingCreativityAndDesignElementsSeventhSet", - "exploreElements": "validatingExploreElementsSecondSet", - "learnAndSupportElements": "validatingLearnAndSupportElements", - "footerElements": "validatingFooterElements" - }, - "Spain": { - "unavElements": "validatingUnavSecondSetOfElements", - "creativityAndDesignElements": "validatingCreativityAndDesignElementsFourthSet", - "programElements": "validatingProgramSecondSetOfElements", - "subjectAreaElements": "validatingSubjectAreaSecondSetOfElements", - "trainingAndSupportElements": "validatingTrainingAndSupportElements", - "footerElements": "validatingFooterElements" - }, - "Canada English": { - "unavElements": "validatingUnavFourthSetOfElements", - "creativityAndDesignElements": "validatingCreativityAndDesignElements", - "exploreElements": "validatingExploreElements", - "learnAndSupportElements": "validatingLearnAndSupportElements", - "footerElements": "validatingFooterElements" - }, - "Korea": { - "unavElements": "validatingUnavElements", - "creativityAndDesignElements": "validatingCreativityAndDesignElementsFifthSet", - "exploreElements": "validatingExploreElements", - "learnAndSupportElements": "validatingLearnAndSupportElements", - "footerElements": "validatingFooterElements" - }, - "Canada French": { - "unavElements": "validatingUnavFourthSetOfElements", - "creativityAndDesignElements": "validatingCreativityAndDesignElements", - "exploreElements": "validatingExploreElements", - "learnAndSupportElements": "validatingLearnAndSupportElements", - "footerElements": "validatingFooterElements" - }, - "Poland": { - "unavElements": "validatingUnavElements", - "creativityAndDesignElements": "validatingCreativityAndDesignElementsSixthSet", - "exploreElements": "validatingExploreElements", - "learnAndSupportElements": "validatingLearnAndSupportElements", - "footerElements": "validatingFooterElements" - }, - "Mexico": { - "unavElements": "validatingUnavThirdSetOfElements", - "creativityAndDesignElements": "validatingCreativityAndDesignElements", - "programElements": "validatingProgramElements", - "subjectAreaElements": "validatingSubjectAreaElements", - "trainingAndSupportElements": "validatingTrainingAndSupportElements", - "footerElements": "validatingFooterElements" - }, - "Australia": { - "unavElements": "validatingUnavFourthSetOfElements", - "creativityAndDesignElements": "validatingCreativityAndDesignElements", - "exploreElements": "validatingExploreElements", - "learnAndSupportElements": "validatingLearnAndSupportElements", - "footerElements": "validatingFooterElements" - }, - "Indonesia": { - "unavElements": "validatingUnavFourthSetOfElements", - "creativityAndDesignElements": "validatingCreativityAndDesignElements", - "exploreElements": "validatingExploreElements", - "learnAndSupportElements": "validatingLearnAndSupportElements", - "footerElements": "validatingFooterElements" - }, - "Indonesia English": { - "unavElements": "validatingUnavFourthSetOfElements", - "creativityAndDesignElements": "validatingCreativityAndDesignElements", - "exploreElements": "validatingExploreElements", - "learnAndSupportElements": "validatingLearnAndSupportElements", - "footerElements": "validatingFooterElements" - }, - "Turkey": { - "unavElements": "validatingUnavSecondSetOfElements", - "creativityAndDesignElements": "validatingCreativityAndDesignElements", - "programElements": "validatingProgramElements", - "subjectAreaElements": "validatingSubjectAreaElements", - "trainingAndSupportElements": "validatingTrainingAndSupportElements", - "footerElements": "validatingFooterElements" - }, - "Thailand English": { - "unavElements": "validatingUnavFourthSetOfElements", - "creativityAndDesignElements": "validatingCreativityAndDesignElements", - "exploreElements": "validatingExploreElements", - "learnAndSupportElements": "validatingLearnAndSupportElements", - "footerElements": "validatingFooterElements" - }, - "Thailand": { - "unavElements": "validatingUnavThirdSetOfElements", - "creativityAndDesignElements": "validatingCreativityAndDesignElements", - "programElements": "validatingProgramElements", - "subjectAreaElements": "validatingSubjectAreaElements", - "trainingAndSupportElements": "validatingTrainingAndSupportElements", - "footerElements": "validatingFooterElements" - }, - "Singapore": { - "unavElements": "validatingUnavFourthSetOfElements", - "creativityAndDesignElements": "validatingCreativityAndDesignElements", - "exploreElements": "validatingExploreElements", - "learnAndSupportElements": "validatingLearnAndSupportElements", - "footerElements": "validatingFooterElements" - }, - "Philippines": { - "unavElements": "validatingUnavFourthSetOfElements", - "creativityAndDesignElements": "validatingCreativityAndDesignElements", - "exploreElements": "validatingExploreElements", - "learnAndSupportElements": "validatingLearnAndSupportElements", - "footerElements": "validatingFooterElements" - }, - "Philippines English": { - "unavElements": "validatingUnavFourthSetOfElements", - "creativityAndDesignElements": "validatingCreativityAndDesignElements", - "exploreElements": "validatingExploreElements", - "learnAndSupportElements": "validatingLearnAndSupportElements", - "footerElements": "validatingFooterElements" - } + "locales": { + "United States": { + "unavElements": "validatingUnavElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Germany": { + "unavElements": "validatingUnavSecondSetOfElements", + "photoVideoAndDesignElements": "validatingPhotoVideoAndDesignElements", + "programElements": "validatingProgramElements", + "subjectAreaElements": "validatingSubjectAreaElements", + "trainingAndSupportElements": "validatingTrainingAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "France": { + "unavElements": "validatingUnavElements", + "photoVideoAndDesignElements": "validatingPhotoVideoAndDesignElements", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Italy": { + "unavElements": "validatingUnavSecondSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "programElements": "validatingProgramElements", + "subjectAreaElements": "validatingSubjectAreaElements", + "trainingAndSupportElements": "validatingTrainingAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "United Kingdom": { + "unavElements": "validatingUnavThirdSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "programElements": "validatingProgramElements", + "subjectAreaElements": "validatingSubjectAreaElements", + "trainingAndSupportElements": "validatingTrainingAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Middle East And North Africa": { + "unavElements": "validatingUnavFourthSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Japan": { + "unavElements": "validatingUnavSecondSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElementsSecondSet", + "programElements": "validatingProgramElements", + "subjectAreaElements": "validatingSubjectAreaElements", + "trainingAndSupportElements": "validatingTrainingAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "India": { + "unavElements": "validatingUnavFourthSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElementsFourthSet", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Spain": { + "unavElements": "validatingUnavSecondSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElementsThirdSet", + "programElements": "validatingProgramElements", + "subjectAreaElements": "validatingSubjectAreaElements", + "trainingAndSupportElements": "validatingTrainingAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Canada English": { + "unavElements": "validatingUnavFourthSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Korea": { + "unavElements": "validatingUnavElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Canada French": { + "unavElements": "validatingUnavFourthSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Poland": { + "unavElements": "validatingUnavElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Mexico": { + "unavElements": "validatingUnavThirdSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "programElements": "validatingProgramElements", + "subjectAreaElements": "validatingSubjectAreaElements", + "trainingAndSupportElements": "validatingTrainingAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Australia": { + "unavElements": "validatingUnavFourthSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Indonesia": { + "unavElements": "validatingUnavFourthSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Indonesia English": { + "unavElements": "validatingUnavFourthSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Turkey": { + "unavElements": "validatingUnavSecondSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "programElements": "validatingProgramElements", + "subjectAreaElements": "validatingSubjectAreaElements", + "trainingAndSupportElements": "validatingTrainingAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Thailand English": { + "unavElements": "validatingUnavFourthSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Thailand": { + "unavElements": "validatingUnavThirdSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "programElements": "validatingProgramElements", + "subjectAreaElements": "validatingSubjectAreaElements", + "trainingAndSupportElements": "validatingTrainingAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Singapore": { + "unavElements": "validatingUnavFourthSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Philippines": { + "unavElements": "validatingUnavFourthSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" + }, + "Philippines English": { + "unavElements": "validatingUnavFourthSetOfElements", + "creativityAndDesignElements": "validatingCreativityAndDesignElements", + "exploreElements": "validatingExploreElements", + "learnAndSupportElements": "validatingLearnAndSupportElements", + "footerElements": "validatingFooterElements" } + } } \ No newline at end of file diff --git a/features/feds/prodSanity/creativeCloudUnavSanity.spec.js b/features/feds/prodSanity/creativeCloudUnavSanity.spec.js index 5654bbbe..895f7475 100644 --- a/features/feds/prodSanity/creativeCloudUnavSanity.spec.js +++ b/features/feds/prodSanity/creativeCloudUnavSanity.spec.js @@ -1,166 +1,166 @@ module.exports = { - name: 'Creative Cloud UNAV Page', - features: [ - { - tcid: '0', - name: '@UnitedStatesCCUnavPageCheck', - path: '/creativecloud.html?georouting=off', - tags: '@ccounavpagesanity @ccunavUnitedStates', - country: 'United States', - }, - { - tcid: '1', - name: '@GermanyCCUnavPageCheck', - path: '/de/creativecloud.html?georouting=off', - tags: '@ccounavpagesanity @ccunavGermany', - country: 'Germany', - }, - { - tcid: '2', - name: '@FranceCCUnavPageCheck', - path: '/fr/creativecloud.html?georouting=off', - tags: '@ccounavpagesanity @ccunavFrance', - country: 'France', - }, - { - tcid: '3', - name: '@ItalyCCUnavPageCheck', - path: '/it/creativecloud.html?georouting=off', - tags: '@ccounavpagesanity @ccunavItaly', - country: 'Italy', - }, - { - tcid: '4', - name: '@UnitedKingdomCCUnavPageCheck', - path: '/uk/creativecloud.html?georouting=off', - tags: '@ccounavpagesanity @ccunavUnitedKingdom', - country: 'United Kingdom', - }, - { - tcid: '5', - name: '@MiddleEastAndNorthAfricaCCUnavPageCheck', - path: '/mena_ar/creativecloud.html?georouting=off', - tags: '@ccounavpagesanity @ccunavMiddleEastAndNorthAfrica', - country: 'Middle East And North Africa', - }, - { - tcid: '6', - name: '@JapanCCUnavPageCheck', - path: '/jp/creativecloud.html?georouting=off', - tags: '@ccounavpagesanity @ccunavJapan', - country: 'Japan', - }, - { - tcid: '7', - name: '@IndiaCCUnavPageCheck', - path: '/in/creativecloud.html?georouting=off', - tags: '@ccounavpagesanity @ccunavIndia', - country: 'India', - }, - { - tcid: '8', - name: '@SpainCCUnavPageCheck', - path: '/es/creativecloud.html?georouting=off', - tags: '@ccounavpagesanity @ccunavSpain', - country: 'Spain', - }, - { - tcid: '9', - name: '@CanadaEnglishCCUnavPageCheck', - path: '/ca/creativecloud.html?georouting=off', - tags: '@ccounavpagesanity @ccunavCanadaEnglish', - country: 'Canada English', - }, - { - tcid: '10', - name: '@KoreaCCUnavPageCheck', - path: '/kr/creativecloud.html?georouting=off', - tags: '@ccounavpagesanity @ccunavKorea', - country: 'Korea', - }, - { - tcid: '11', - name: '@CanadaFrenchCCUnavPageCheck', - path: '/ca_fr/creativecloud.html?georouting=off', - tags: '@ccounavpagesanity @ccunavCanadaFrench', - country: 'Canada French', - }, - { - tcid: '12', - name: '@PolandCCUnavPageCheck', - path: '/pl/creativecloud.html?georouting=off', - tags: '@ccounavpagesanity @ccunavPoland', - country: 'Poland', - }, - { - tcid: '13', - name: '@MexicoCCUnavPageCheck', - path: '/mx/creativecloud.html?georouting=off', - tags: '@ccounavpagesanity @ccunavMexico', - country: 'Mexico', - }, - { - tcid: '14', - name: '@AustraliaCCUnavPageCheck', - path: '/au/creativecloud.html?georouting=off', - tags: '@ccounavpagesanity @ccunavAustralia', - country: 'Australia', - }, - { - tcid: '15', - name: '@IndonesiaCCUnavPageCheck', - path: '/id_id/creativecloud.html?georouting=off', - tags: '@ccounavpagesanity @ccunavIndonesia', - country: 'Indonesia', - }, - { - tcid: '16', - name: '@IndonesiaEnglishCCUnavPageCheck', - path: '/id_en/creativecloud.html?georouting=off', - tags: '@ccounavpagesanity @ccunavIndonesiaEnglish', - country: 'Indonesia English', - }, - { - tcid: '17', - name: '@TurkeyCCUnavPageCheck', - path: '/tr/creativecloud.html?georouting=off', - tags: '@ccounavpagesanity @ccunavTurkey', - country: 'Turkey', - }, - { - tcid: '18', - name: '@ThailandEnglishCCUnavPageCheck', - path: '/th_en/creativecloud.html?georouting=off', - tags: '@ccounavpagesanity @ccunavThailandEnglish', - country: 'Thailand English', - }, - { - tcid: '19', - name: '@ThailandCCUnavPageCheck', - path: '/th_th/creativecloud.html?georouting=off', - tags: '@ccounavpagesanity @ccunavThailand', - country: 'Thailand', - }, - { - tcid: '20', - name: '@SingaporeCCUnavPageCheck', - path: '/sg/creativecloud.html?georouting=off', - tags: '@ccounavpagesanity @ccunavSingapore', - country: 'Singapore', - }, - { - tcid: '21', - name: '@PhilippinesCCUnavPageCheck', - path: '/ph_fil/creativecloud.html?georouting=off', - tags: '@ccounavpagesanity @ccunavPhilippines', - country: 'Philippines', - }, - { - tcid: '22', - name: '@PhilippinesEnglishCCUnavPageCheck', - path: '/ph_fil/creativecloud.html?georouting=off', - tags: '@ccounavpagesanity @ccunavPhilippinesEnglish', - country: 'Philippines English', - } - ] + name: 'Creative Cloud UNAV Page', + features: [ + { + tcid: '0', + name: '@UnitedStatesCCUnavPageCheck', + path: '/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavUnitedStates', + country: 'United States', + }, + { + tcid: '1', + name: '@GermanyCCUnavPageCheck', + path: '/de/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavGermany', + country: 'Germany', + }, + { + tcid: '2', + name: '@FranceCCUnavPageCheck', + path: '/fr/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavFrance', + country: 'France', + }, + { + tcid: '3', + name: '@ItalyCCUnavPageCheck', + path: '/it/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavItaly', + country: 'Italy', + }, + { + tcid: '4', + name: '@UnitedKingdomCCUnavPageCheck', + path: '/uk/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavUnitedKingdom', + country: 'United Kingdom', + }, + { + tcid: '5', + name: '@MiddleEastAndNorthAfricaCCUnavPageCheck', + path: '/mena_ar/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavMiddleEastAndNorthAfrica', + country: 'Middle East And North Africa', + }, + { + tcid: '6', + name: '@JapanCCUnavPageCheck', + path: '/jp/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavJapan', + country: 'Japan', + }, + { + tcid: '7', + name: '@IndiaCCUnavPageCheck', + path: '/in/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavIndia', + country: 'India', + }, + { + tcid: '8', + name: '@SpainCCUnavPageCheck', + path: '/es/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavSpain', + country: 'Spain', + }, + { + tcid: '9', + name: '@CanadaEnglishCCUnavPageCheck', + path: '/ca/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavCanadaEnglish', + country: 'Canada English', + }, + { + tcid: '10', + name: '@KoreaCCUnavPageCheck', + path: '/kr/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavKorea', + country: 'Korea', + }, + { + tcid: '11', + name: '@CanadaFrenchCCUnavPageCheck', + path: '/ca_fr/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavCanadaFrench', + country: 'Canada French', + }, + { + tcid: '12', + name: '@PolandCCUnavPageCheck', + path: '/pl/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavPoland', + country: 'Poland', + }, + { + tcid: '13', + name: '@MexicoCCUnavPageCheck', + path: '/mx/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavMexico', + country: 'Mexico', + }, + { + tcid: '14', + name: '@AustraliaCCUnavPageCheck', + path: '/au/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavAustralia', + country: 'Australia', + }, + { + tcid: '15', + name: '@IndonesiaCCUnavPageCheck', + path: '/id_id/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavIndonesia', + country: 'Indonesia', + }, + { + tcid: '16', + name: '@IndonesiaEnglishCCUnavPageCheck', + path: '/id_en/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavIndonesiaEnglish', + country: 'Indonesia English', + }, + { + tcid: '17', + name: '@TurkeyCCUnavPageCheck', + path: '/tr/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavTurkey', + country: 'Turkey', + }, + { + tcid: '18', + name: '@ThailandEnglishCCUnavPageCheck', + path: '/th_en/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavThailandEnglish', + country: 'Thailand English', + }, + { + tcid: '19', + name: '@ThailandCCUnavPageCheck', + path: '/th_th/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavThailand', + country: 'Thailand', + }, + { + tcid: '20', + name: '@SingaporeCCUnavPageCheck', + path: '/sg/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavSingapore', + country: 'Singapore', + }, + { + tcid: '21', + name: '@PhilippinesCCUnavPageCheck', + path: '/ph_fil/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavPhilippines', + country: 'Philippines', + }, + { + tcid: '22', + name: '@PhilippinesEnglishCCUnavPageCheck', + path: '/ph_fil/creativecloud.html?georouting=off', + tags: '@ccounavpagesanity @ccunavPhilippinesEnglish', + country: 'Philippines English', + } + ] } \ No newline at end of file diff --git a/selectors/feds/feds.creativeCloudUnavSanity.page.js b/selectors/feds/feds.creativeCloudUnavSanity.page.js index 1e209556..dc5e84bd 100644 --- a/selectors/feds/feds.creativeCloudUnavSanity.page.js +++ b/selectors/feds/feds.creativeCloudUnavSanity.page.js @@ -1,442 +1,402 @@ -import { expect, test } from "@playwright/test"; -import { features } from "../../features/feds/prodSanity/creativeCloudUnavSanity.spec"; +import { expect, test } from '@playwright/test'; +import { features } from '../../features/feds/prodSanity/creativeCloudUnavSanity.spec.js'; export default class CreativeCloudUnavSanity { - constructor(page) { - this.page = page; - - // Adobe Brand Logo, appswitcher and signIn button - this.adobeLogo = page.locator('a.feds-brand'); - this.appSwitcher = page.locator('#unav-app-switcher'); - this.signInButton = page.locator('#unav-profile'); - this.signInButtonTwo = page.locator('.feds-signIn'); - - // Promo button - this.closePromoButton = page.locator('.foreground.container button'); - - // U-Nav Elements - this.creativityAndDesign = page.locator('.feds-navItem:nth-child(1) button'); - this.adobeCreativeCloud = page.locator('.feds-navItem:nth-child(2) a'); - this.explore = page.locator('.feds-navItem:nth-child(3) button'); - this.features = page.locator('.feds-navItem:nth-child(4) a'); - this.forBusiness = page.locator('.feds-navItem:nth-child(5) a'); - this.comparePlans = page.locator('.feds-navItem:nth-child(6) a'); - this.learnAndSupport = page.locator('.feds-navItem:nth-child(7) button'); - - this.photoVideoAndDesign = page.locator('.feds-navItem:nth-child(1) button'); - this.creativeCloud = page.locator('.feds-navItem:nth-child(2) a'); - this.program = page.locator('.feds-navItem:nth-child(3) button'); - this.subjectArea = page.locator('.feds-navItem:nth-child(4) button'); - this.trainingAndSupport = page.locator('.feds-navItem:nth-child(5) button'); - this.pricesAndSubscriptions = page.locator('.feds-navItem:nth-child(6) a'); - this.aboInfo = page.locator('.feds-navItem:nth-child(7) a'); - this.appRecomendation = page.locator('.feds-navItem:nth-child(8) a'); - - this.buyNowButton = page.locator('.feds-cta-wrapper [href*="plans.html"]').nth(1); - this.buyNowButtonTwo = page.locator('.feds-cta-wrapper [href*="plans.html?filter=acrobat"]'); - - // Creativity & Design - this.whatIsCC = page.locator('.feds-popup [href*="creativecloud.html"]').nth(0); - this.photographers = page.locator('.feds-popup [href*="photography.html"]').nth(0); - this.studentsAndTeachers = page.locator('.feds-popup [href*="students.html"]'); - this.individuals = page.locator('.feds-popup [href*="all-apps.html"]').nth(0); - this.educationInstitutions = page.locator('.feds-popup [href*="education.html"]'); - this.business = page.locator('.feds-popup [href*="business.html"]'); - this.schoolsAndUniversities = page.locator('.feds-popup [href*="education.html"]'); - this.forGovernmentAgencies = page.locator('.feds-popup [href*="government.html"]'); - this.benifitsForCreativeCloudPaidMembers = page.locator('.feds-popup [href*="cc-paid-member-benefits.html"]'); - this.viewPlansAndPricing = page.locator('.feds-cta--primary[href$="plans.html"]').nth(0); - this.seeAllProducts = page.locator('.feds-cta--primary[href*="products/catalog.html"]'); - - this.photoshop = page.locator('.feds-popup [href*="products/photoshop.html"]').nth(0); - this.adobeExpress = page.locator('.feds-popup [href*="express"]').nth(0); - this.adobePro = page.locator('.feds-popup [href*="products/acrobat-pro-cc.html"]').nth(0); - this.lightroom = page.locator('.feds-popup [href*="photoshop-lightroom.html"]').nth(0); - this.illustrator = page.locator('.feds-popup [href*="products/illustrator.html"]').nth(0); - this.premierePro = page.locator('.feds-popup [href*="products/premiere.html"]').nth(0); - this.adobeStock = page.locator('.feds-popup [href*="globalnav"]'); - this.adobeStockTwo = page.locator('.feds-popup [href*="?promoid=JQVGW2DZ&mv=other"]'); - this.adobeFireflyPro = page.locator('.feds-popup a[href$="generative-ai/firefly.html"]').nth(0); - this.viewAllProducts = page.locator('.feds-popup [href*="category=creativity-design"]').nth(0); - this.seePlansAndPricing = page.locator('.feds-popup [href*="creativecloud/plans.html"]'); - - this.removeBackground = page.locator('[href*="KCJMVG5Q&mv=other"]'); - this.resizeImage = page.locator('[href*="GVTYXXVD&mv=other"]'); - this.covertImageToSVG = page.locator('[href*="K42KVPMS&mv=other"]'); - this.covertVideoToGIF = page.locator('[href*="JZBJVTCT&mv=other"]'); - this.createQRCode = page.locator('[href*="KH8NVBFP&mv=other"]'); - this.seeAllQuickActions = page.locator('[href*="H822XKN9&mv=other"]'); - - this.resume = page.locator('[href*="GMCWY715&mv=other"]'); - this.posters = page.locator('[href*="FZPQYTPB&mv=other"]'); - this.card = page.locator('[href*="GVTYXYK3&mv=other"]'); - this.instagramPost = page.locator('[href*="7DRZ6CYM&mv=other"]'); - this.youTubeVideo = page.locator('[href*="7JJ1687L&mv=other"]'); - this.createNow = page.locator('[href*="J7XBWKS1&mv=other"]'); - - this.adobeExpressIn = page.locator('[href*="HCS3XGLY&mv=other"]'); - - this.photo = page.locator('.feds-popup [href*="?promoid=D8F91JW4&mv=other"]'); - this.graphicDesign = page.locator('.feds-menu-items a[href$="/design.html"]'); - this.Video = page.locator('.feds-menu-items a[href$="/video.html"]'); - this.illustration = page.locator('.feds-menu-items a[href$="/illustration.html"]'); - this.socialMedia = page.locator('.feds-menu-items a[href$="/social-media.html"]'); - this.threeDAndAR = page.locator('.feds-popup a[href$="/3d-ar.html"]').nth(0); - this.pdf = page.locator('.feds-menu-items a[href$="acrobat-pro-cc.html"]'); - - this.aiOverviewCC = page.locator('.feds-popup a[href$="ai/overview.html"]'); - this.adobeFirefly = page.locator('.feds-popup a[href$="products/firefly.html"]'); - this.adobeFireflyCC = page.locator('.feds-popup a[href*="firefly.html"]'); - - this.adobecom = page.locator('.feds-popup a[href$="/index.html"]'); - this.pdfAndESignatures = page.locator('.feds-popup a[href$="/acrobat.html"]'); - this.marketingAndCommerce = page.locator('.feds-popup a[href*="business.adobe.com"]'); - this.helpAndSupport = page.locator('.feds-popup a[href$="support.html"]'); - - // Explore - this.graphicDesignExplore = page.locator('.feds-popup a[href$="design.html"]').nth(1); - this.graphicDesignExploreIn = page.locator('.feds-popup a[href$="design.html"]'); - - // Learn & Support - this.home = page.locator('.feds-popup a[href$="support/creative-cloud.html"]'); - - // Program - this.photoshopPr = page.locator('.feds-popup a[href$="products/photoshop.html"]').nth(1); - this.photoshopAp = page.locator('.feds-popup a[href$="products/photoshop.html"]'); - - // Subject Areas - this.photoSa = page.locator('.feds-popup a[href$="creativecloud/photography.html"]').nth(1); - this.photoCa = page.locator('.feds-popup a[href$="creativecloud/photography.html"]'); - - // Training & Support - this.innovations = page.locator('.feds-popup a[href$="creativecloud/features.html"]'); - - // Footer - this.footerCreativeCloud = page.locator('.feds-footer-wrapper a[href*="creativecloud.html"]'); - this.footerCreativeCloudForBusiness = page.locator('.feds-footer-wrapper a[href*="creativecloud/business.html"]'); - this.footerdiscountForStudentsAndTeachers = page.locator('.feds-footer-wrapper a[href*="students.html"]'); - this.footerappsForiOS = page.locator('.feds-footer-wrapper a[href*="id852473028"]'); - this.footerWhatIsExperienceCloud = page.locator('.feds-menu-items a[href*="business.adobe.com"]').nth(0); - this.footerWhatIsExperienceCloudTwo = page.locator('.feds-menu-items a[href*="experience-cloud.html"]'); - this.footerDownloadAndInstall = page.locator('.feds-footer-wrapper a[href$="download-install.html"]'); - this.footerAdobeBlog = page.locator('.feds-footer-wrapper a[href*="blog.adobe.com/"]'); - this.footerLoginToYourAccount = page.locator('a[href$="account.adobe.com/"]').nth(0); - this.footerAbout = page.locator('.feds-footer-wrapper a[href$="about-adobe.html"]'); - - // Featured Products - this.footerAdobeAcrobatReaderlogo = page.locator('a[href$="reader/"]'); - this.footerAdobeExpresslogo = page.locator('a[href$="Z2G1FSYV&mv=other"]:nth-of-type(2)'); - this.footerPhotoshoplogo = page.locator('a[href$="photoshop/free-trial-download.html"]'); - this.footerIllustratorlogo = page.locator('a[href$="illustrator/free-trial-download.html"]'); - - // Change Region and social media - this.changeRegion = page.locator('.feds-regionPicker-wrapper'); - this.facebookLogo = page.locator('a[href*="facebook"]'); - this.instagramLogo = page.locator('a[href*="instagram.com"]'); - this.twitterlogo = page.locator('a[href*="twitter"]'); - this.linkedinLogo = page.locator('a[href*="linkedin"]'); - this.copyright = page.locator('.feds-footer-legalWrapper>p>span'); - this.privacyPolicy = page.locator('.feds-footer-legalWrapper a:nth-of-type(1)'); - this.termsOfUse = page.locator('.feds-footer-legalWrapper a:nth-of-type(2)'); - this.cookies = page.locator('.feds-footer-legalWrapper a:nth-of-type(3)'); - this.protectMyPersonalData = page.locator('.feds-footer-legalWrapper a:nth-of-type(4)'); - this.adChoices = page.locator('.feds-footer-legalWrapper a:nth-of-type(5)'); - } - - // UNAV - async validatingUnavElements() { - await this.page.waitForLoadState("networkidle"); - const elements = [this.adobeLogo, this.creativityAndDesign, this.adobeCreativeCloud, this.explore, this.features, this.forBusiness, this.comparePlans, - this.learnAndSupport, this.buyNowButton, this.appSwitcher, this.signInButton]; - const promises = elements.map(async element => { await expect(element).toBeVisible() }) - await Promise.all(promises); - }; - - async validatingUnavSecondSetOfElements() { - await this.page.waitForLoadState("networkidle"); - const elements = [this.adobeLogo, this.photoVideoAndDesign, this.creativeCloud, this.program, this.subjectArea, this.trainingAndSupport, - this.pricesAndSubscriptions, this.aboInfo, this.appRecomendation, this.buyNowButton, this.appSwitcher, this.signInButton]; - const promises = elements.map(async element => { await expect(element).toBeVisible() }) - await Promise.all(promises); - }; - - async validatingUnavThirdSetOfElements() { - await this.page.waitForLoadState("networkidle"); - const elements = [this.adobeLogo, this.creativityAndDesign, this.creativeCloud, this.program, this.subjectArea, this.trainingAndSupport, - this.pricesAndSubscriptions, this.aboInfo, this.appRecomendation, this.buyNowButton, this.signInButtonTwo]; - const promises = elements.map(async element => { await expect(element).toBeVisible() }) - await Promise.all(promises); - }; - - async validatingUnavFourthSetOfElements() { - await this.page.waitForLoadState("networkidle"); - const elements = [this.adobeLogo, this.creativityAndDesign, this.adobeCreativeCloud, this.explore, this.features, this.forBusiness, this.comparePlans, - this.learnAndSupport, this.buyNowButton, this.signInButtonTwo]; - const promises = elements.map(async element => { await expect(element).toBeVisible() }); - await Promise.all(promises); - }; - - // Creativity & Design - async validatingCreativityAndDesignElements() { - await this.creativityAndDesign.click({ timeout: 5000 }); - await this.page.waitForLoadState("networkidle"); - const elements = [this.whatIsCC, this.photographers, this.studentsAndTeachers, this.individuals, this.business, this.schoolsAndUniversities, - this.viewPlansAndPricing, this.photoshop, this.adobeExpress, this.lightroom, this.illustrator, this.premierePro, this.adobeStock, this.viewAllProducts, - this.photo, this.graphicDesign, this.Video, this.illustration, this.socialMedia, this.threeDAndAR, this.pdf, this.aiOverviewCC, this.adobeFirefly, - this.adobecom, this.pdfAndESignatures, this.marketingAndCommerce, this.helpAndSupport]; - - const promises = elements.map(async element => { await expect(element).toBeVisible() }) - await Promise.all(promises); - await this.creativityAndDesign.click({ timeout: 5000 }); - }; - - async validatingCreativityAndDesignElementsSecondSet() { - await this.creativityAndDesign.click({ timeout: 5000 }); - await this.page.waitForLoadState('networkidle'); - const elements = [this.whatIsCC, this.photoshop, this.adobeExpress, this.lightroom, this.illustrator, this.premierePro, this.adobeStock, this.viewPlansAndPricing, - this.individuals, this.business, this.photographers, this.studentsAndTeachers, this.schoolsAndUniversities, this.viewAllProducts, this.photo, this.graphicDesign, - this.Video, this.illustration, this.socialMedia, this.threeDAndAR, this.pdf, this.aiOverviewCC, this.adobeFirefly, this.adobecom, this.pdfAndESignatures, - this.marketingAndCommerce, this.helpAndSupport]; - - const promises = elements.map(async element => { await expect(element).toBeVisible() }) - await Promise.all(promises); - await this.creativityAndDesign.click({ timeout: 5000 }); - }; - - async validatingCreativityAndDesignElementsThirdSet() { - await this.creativityAndDesign.click({ timeout: 5000 }); - await this.page.waitForLoadState("networkidle"); - const elements = [this.whatIsCC, this.photographers, this.studentsAndTeachers, this.individuals, this.business, this.schoolsAndUniversities, - this.forGovernmentAgencies, this.benifitsForCreativeCloudPaidMembers, this.viewPlansAndPricing, this.photoshop, this.adobeExpress, this.lightroom, - this.illustrator, this.premierePro, this.adobeStock, this.adobeFireflyPro, this.viewAllProducts, this.photo, this.graphicDesign, this.Video, this.illustration, - this.socialMedia, this.threeDAndAR, this.pdf, this.adobeFirefly, this.adobecom, this.pdfAndESignatures, this.marketingAndCommerce, this.helpAndSupport]; - - const promises = elements.map(async element => { await expect(element).toBeVisible() }) - await Promise.all(promises); - await this.creativityAndDesign.click({ timeout: 5000 }); - }; - - async validatingCreativityAndDesignElementsFourthSet() { - await this.creativityAndDesign.click({ timeout: 5000 }); - await this.page.waitForLoadState("networkidle"); - const elements = [this.whatIsCC, this.photoshop, this.adobeExpress, this.adobePro, this.illustrator, this.premierePro, this.adobeStockTwo, this.seeAllProducts, - this.individuals, this.photographers, this.studentsAndTeachers, this.business, this.seePlansAndPricing, this.photo, this.graphicDesign, this.Video, this.illustration, - this.socialMedia, this.threeDAndAR, this.pdf, this.aiOverviewCC, this.adobeFirefly, this.adobecom, this.pdfAndESignatures, this.marketingAndCommerce, this.helpAndSupport]; - - const promises = elements.map(async element => { await expect(element).toBeVisible() }) - await Promise.all(promises); - await this.creativityAndDesign.click({ timeout: 5000 }); - }; - - async validatingCreativityAndDesignElementsFifthSet() { - await this.creativityAndDesign.click({ timeout: 5000 }); - await this.page.waitForLoadState("networkidle"); - const elements = [this.whatIsCC, this.photographers, this.studentsAndTeachers, this.individuals, this.business, this.schoolsAndUniversities, - this.viewPlansAndPricing, this.photoshop, this.adobeExpress, this.lightroom, this.illustrator, this.premierePro, this.adobeStock, this.viewAllProducts, - this.photo, this.graphicDesign, this.Video, this.illustration, this.socialMedia, this.threeDAndAR, this.pdf, this.adobeFirefly, - this.adobecom, this.pdfAndESignatures, this.marketingAndCommerce, this.helpAndSupport]; - - const promises = elements.map(async element => { await expect(element).toBeVisible() }) - await Promise.all(promises); - await this.creativityAndDesign.click({ timeout: 5000 }); - }; - - async validatingCreativityAndDesignElementsSixthSet() { - await this.creativityAndDesign.click({ timeout: 5000 }); - await this.page.waitForLoadState("networkidle"); - const elements = [this.whatIsCC, this.photographers, this.studentsAndTeachers, this.individuals, this.business, this.schoolsAndUniversities, - this.viewPlansAndPricing, this.photoshop, this.adobeExpress, this.lightroom, this.illustrator, this.premierePro, this.adobeStock, this.viewAllProducts, - this.photo, this.graphicDesign, this.Video, this.illustration, this.socialMedia, this.threeDAndAR, this.pdf, this.aiOverviewCC, this.adobeFireflyCC, - this.adobecom, this.pdfAndESignatures, this.marketingAndCommerce, this.helpAndSupport]; - - const promises = elements.map(async element => { await expect(element).toBeVisible() }); - await Promise.all(promises); - await this.creativityAndDesign.click({ timeout: 5000 }); - }; - - async validatingCreativityAndDesignElementsSeventhSet() { - await this.creativityAndDesign.click({ timeout: 5000 }); - await this.page.waitForLoadState("networkidle"); - const elements = [this.removeBackground, this.resizeImage, this.covertImageToSVG, this.covertVideoToGIF, this.createQRCode, this.seeAllQuickActions, this.resume, - this.posters, this.card, this.instagramPost, this.youTubeVideo, this.createNow, this.whatIsCC, this.adobeExpressIn, this.photoshop, this.premierePro, - this.illustrator, this.seePlansAndPricing, this.adobeFireflyCC, this.adobecom, this.pdfAndESignatures, this.marketingAndCommerce, this.helpAndSupport]; - - const promises = elements.map(async element => { await expect(element).toBeVisible() }); - await Promise.all(promises); - await this.creativityAndDesign.click({ timeout: 5000 }); - }; - - // Photo Video & Design - async validatingPhotoVideoAndDesignElements() { - this.photoVideoAndDesign.click({ timeout: 5000 }); - await this.page.waitForLoadState("networkidle"); - const elements = [this.whatIsCC, this.photographers, this.studentsAndTeachers, this.educationInstitutions, this.business, this.schoolsAndUniversities, - this.viewPlansAndPricing, this.photoshop, this.adobeExpress, this.premierePro, this.illustrator, this.lightroom, this.adobeStock, this.viewAllProducts, - this.photo, this.graphicDesign, this.Video, this.illustration, this.socialMedia, this.threeDAndAR, this.pdf, this.aiOverviewCC, this.adobeFirefly, - this.adobecom, this.pdfAndESignatures, this.marketingAndCommerce, this.helpAndSupport]; - - const promises = elements.map(async element => { await expect(element).toBeVisible() }) - await Promise.all(promises); - this.photoVideoAndDesign.click({ timeout: 5000 }); - }; + constructor(page) { + this.page = page; + + // Adobe Brand Logo, appswitcher and signIn button + this.adobeLogo = page.locator('a.feds-brand'); + this.appSwitcher = page.locator('#unav-app-switcher'); + this.signInButton = page.locator('#unav-profile'); + this.signInButtonTwo = page.locator('.feds-signIn'); + + // Promo button + this.closePromoButton = page.locator('.foreground.container button'); + + // U-Nav Elements + this.creativityAndDesign = page.locator('.feds-navItem:nth-child(1) button'); + this.adobeCreativeCloud = page.locator('.feds-navItem:nth-child(2) a'); + this.explore = page.locator('.feds-navItem:nth-child(3) button'); + this.features = page.locator('.feds-navItem:nth-child(4) a'); + this.forBusiness = page.locator('.feds-navItem:nth-child(5) a'); + this.comparePlans = page.locator('.feds-navItem:nth-child(6) a'); + this.learnAndSupport = page.locator('.feds-navItem:nth-child(7) button'); + + this.photoVideoAndDesign = page.locator('.feds-navItem:nth-child(1) button'); + this.creativeCloud = page.locator('.feds-navItem:nth-child(2) a'); + this.program = page.locator('.feds-navItem:nth-child(3) button'); + this.subjectArea = page.locator('.feds-navItem:nth-child(4) button'); + this.trainingAndSupport = page.locator('.feds-navItem:nth-child(5) button'); + this.pricesAndSubscriptions = page.locator('.feds-navItem:nth-child(6) a'); + this.aboInfo = page.locator('.feds-navItem:nth-child(7) a'); + this.appRecomendation = page.locator('.feds-navItem:nth-child(8) a'); + + this.buyNowButton = page.locator('.feds-cta-wrapper [href*="plans.html"]').nth(1); + this.buyNowButtonTwo = page.locator('.feds-cta-wrapper [href*="plans.html?filter=acrobat"]'); + + // Creativity & Design + this.whatIsCC = page.locator('.feds-popup [href*="creativecloud.html"]').nth(0); + this.photographers = page.locator('.feds-popup [href*="photography.html"]').nth(0); + this.studentsAndTeachers = page.locator('.feds-popup [href*="students.html"]'); + this.individuals = page.locator('.feds-popup [href*="all-apps.html"]').nth(0); + this.educationInstitutions = page.locator('.feds-popup [href*="education.html"]'); + this.business = page.locator('.feds-popup [href*="business.html"]'); + this.schoolsAndUniversities = page.locator('.feds-popup [href*="education.html"]'); + this.forGovernmentAgencies = page.locator('.feds-popup [href*="government.html"]'); + this.benifitsForCreativeCloudPaidMembers = page.locator('.feds-popup [href*="cc-paid-member-benefits.html"]'); + this.viewPlansAndPricing = page.locator('.feds-cta--primary[href$="plans.html"]').nth(0); + this.seeAllProducts = page.locator('.feds-cta--primary[href*="products/catalog.html"]'); + + this.photoshop = page.locator('.feds-popup [href*="products/photoshop.html"]').nth(0); + this.adobeExpress = page.locator('.feds-popup [href*="express"]').nth(0); + this.adobePro = page.locator('.feds-popup [href*="products/acrobat-pro-cc.html"]').nth(0); + this.lightroom = page.locator('.feds-popup [href*="photoshop-lightroom.html"]').nth(0); + this.illustrator = page.locator('.feds-popup [href*="products/illustrator.html"]').nth(0); + this.premierePro = page.locator('.feds-popup [href*="products/premiere.html"]').nth(0); + this.adobeStock = page.locator('.feds-popup [href*="globalnav"]'); + this.adobeStockTwo = page.locator('.feds-popup [href*="?promoid=JQVGW2DZ&mv=other"]'); + this.adobeFireflyPro = page.locator('.feds-popup a[href$="generative-ai/firefly.html"]').nth(0); + this.viewAllProducts = page.locator('.feds-popup [href*="category=creativity-design"]').nth(0); + this.seePlansAndPricing = page.locator('.feds-popup [href*="creativecloud/plans.html"]'); + + this.removeBackground = page.locator('[href*="KCJMVG5Q&mv=other"]'); + this.resizeImage = page.locator('[href*="GVTYXXVD&mv=other"]'); + this.covertImageToSVG = page.locator('[href*="K42KVPMS&mv=other"]'); + this.covertVideoToGIF = page.locator('[href*="JZBJVTCT&mv=other"]'); + this.createQRCode = page.locator('[href*="KH8NVBFP&mv=other"]'); + this.seeAllQuickActions = page.locator('[href*="H822XKN9&mv=other"]'); + + this.resume = page.locator('[href*="GMCWY715&mv=other"]'); + this.posters = page.locator('[href*="FZPQYTPB&mv=other"]'); + this.card = page.locator('[href*="GVTYXYK3&mv=other"]'); + this.instagramPost = page.locator('[href*="7DRZ6CYM&mv=other"]'); + this.youTubeVideo = page.locator('[href*="7JJ1687L&mv=other"]'); + this.createNow = page.locator('[href*="J7XBWKS1&mv=other"]'); + + this.adobeExpressIn = page.locator('[href*="HCS3XGLY&mv=other"]'); + + this.photo = page.locator('.feds-popup [href*="?promoid=D8F91JW4&mv=other"]'); + this.graphicDesign = page.locator('.feds-menu-items a[href$="/design.html"]'); + this.Video = page.locator('.feds-menu-items a[href$="/video.html"]'); + this.illustration = page.locator('.feds-menu-items a[href$="/illustration.html"]'); + this.socialMedia = page.locator('.feds-menu-items a[href$="/social-media.html"]'); + this.threeDAndAR = page.locator('.feds-popup a[href$="/3d-ar.html"]').nth(0); + this.pdf = page.locator('.feds-menu-items a[href$="acrobat-pro-cc.html"]'); + + this.aiOverviewCC = page.locator('.feds-popup a[href$="ai/overview.html"]'); + this.adobeFirefly = page.locator('.feds-popup a[href$="products/firefly.html"]'); + this.adobeFireflyCC = page.locator('.feds-popup a[href*="firefly.html"]'); + + this.adobecom = page.locator('.feds-popup a[href$="/index.html"]'); + this.pdfAndESignatures = page.locator('.feds-popup a[href$="/acrobat.html"]'); + this.marketingAndCommerce = page.locator('.feds-popup a[href*="business.adobe.com"]'); + this.helpAndSupport = page.locator('.feds-popup a[href$="support.html"]'); // Explore - async validatingExploreElements() { - this.explore.click({ timeout: 5000 }); - const elements = [this.graphicDesignExplore]; - const promises = elements.map(async element => { await expect(element).toBeVisible() }) - await Promise.all(promises); - this.explore.click({ timeout: 5000 }); - }; - - async validatingExploreElementsSecondSet() { - this.explore.click({ timeout: 5000 }); - const elements = [this.graphicDesignExploreIn]; - const promises = elements.map(async element => { await expect(element).toBeVisible() }) - await Promise.all(promises); - this.explore.click({ timeout: 5000 }); - }; + this.graphicDesignExplore = page.locator('.feds-popup a[href$="design.html"]').nth(1); + this.graphicDesignExploreIn = page.locator('.feds-popup a[href$="design.html"]'); // Learn & Support - async validatingLearnAndSupportElements() { - this.learnAndSupport.click({ timeout: 5000 }); - const elements = [this.home]; - const promises = elements.map(async element => { await expect(element).toBeVisible() }); - await Promise.all(promises); - this.learnAndSupport.click({ timeout: 5000 }); - }; + this.home = page.locator('.feds-popup a[href$="support/creative-cloud.html"]'); // Program - async validatingProgramElements() { - this.program.click({ timeout: 5000 }); - const elements = [this.photoshopPr]; - const promises = elements.map(async element => { await expect(element).toBeVisible() }) - await Promise.all(promises); - this.program.click({ timeout: 5000 }); - } - - async validatingProgramSecondSetOfElements() { - this.program.click({ timeout: 5000 }); - const elements = [this.photoshopAp]; - const promises = elements.map(async element => { await expect(element).toBeVisible() }) - await Promise.all(promises); - this.program.click({ timeout: 5000 }); - } + this.photoshopPr = page.locator('.feds-popup a[href$="products/photoshop.html"]').nth(1); + this.photoshopAp = page.locator('.feds-popup a[href$="products/photoshop.html"]'); - // Subject Area - async validatingSubjectAreaElements() { - this.subjectArea.click({ timeout: 5000 }); - const elements = [this.photoSa]; - const promises = elements.map(async element => { await expect(element).toBeVisible() }) - await Promise.all(promises); - this.subjectArea.click({ timeout: 5000 }); - } - - async validatingSubjectAreaSecondSetOfElements() { - this.subjectArea.click({ timeout: 5000 }); - const elements = [this.photoCa]; - const promises = elements.map(async element => { await expect(element).toBeVisible() }) - await Promise.all(promises); - this.subjectArea.click({ timeout: 5000 }); - } + // Subject Areas + this.photoSa = page.locator('.feds-popup a[href$="creativecloud/photography.html"]').nth(1); + this.photoCa = page.locator('.feds-popup a[href$="creativecloud/photography.html"]'); // Training & Support - async validatingTrainingAndSupportElements() { - this.trainingAndSupport.click({ timeout: 5000 }); - const elements = [this.innovations]; - const promises = elements.map(async element => { await expect(element).toBeVisible() }) - await Promise.all(promises); - this.trainingAndSupport.click({ timeout: 5000 }); - } + this.innovations = page.locator('.feds-popup a[href$="creativecloud/features.html"]'); // Footer - async validatingFooterElements() { - const elements = [this.footerCreativeCloud, this.footerCreativeCloudForBusiness, this.footerdiscountForStudentsAndTeachers, this.footerappsForiOS, - this.footerWhatIsExperienceCloud, this.footerDownloadAndInstall, this.footerAdobeBlog, this.footerLoginToYourAccount, this.footerAbout, - this.footerAdobeAcrobatReaderlogo, this.footerAdobeExpresslogo, this.footerPhotoshoplogo, this.footerIllustratorlogo, this.changeRegion, this.facebookLogo, - this.instagramLogo, this.twitterlogo, this.linkedinLogo, this.copyright, this.privacyPolicy, this.termsOfUse, this.cookies, this.protectMyPersonalData, - this.adChoices]; - const promises = elements.map(async element => { await expect(element).toBeVisible() }) - await Promise.all(promises); - }; - - async validatingFooterElementsSecondSet() { - const elements = [this.footerCreativeCloud, this.footerCreativeCloudForBusiness, this.footerdiscountForStudentsAndTeachers, this.footerappsForiOS, - this.footerWhatIsExperienceCloudTwo, this.footerDownloadAndInstall, this.footerAdobeBlog, this.footerLoginToYourAccount, this.footerAbout, - this.footerAdobeAcrobatReaderlogo, this.footerAdobeExpresslogo, this.footerPhotoshoplogo, this.footerIllustratorlogo, this.changeRegion, this.facebookLogo, - this.instagramLogo, this.twitterlogo, this.linkedinLogo, this.copyright, this.privacyPolicy, this.termsOfUse, this.cookies, this.protectMyPersonalData, - this.adChoices]; - const promises = elements.map(async element => { await expect(element).toBeVisible() }) - await Promise.all(promises); - }; - - async validatingFooterElementsThirdSet() { - const elements = [this.footerCreativeCloud, this.footerWhatIsExperienceCloudTwo, this.footerDownloadAndInstall, this.footerAdobeBlog, - this.footerLoginToYourAccount, this.footerAbout, this.footerAdobeAcrobatReaderlogo, this.footerAdobeExpresslogo, this.footerPhotoshoplogo, - this.footerIllustratorlogo, this.changeRegion, this.facebookLogo, this.instagramLogo, this.twitterlogo, this.linkedinLogo, this.copyright, - this.privacyPolicy, this.termsOfUse, this.cookies, this.protectMyPersonalData, this.adChoices]; - const promises = elements.map(async element => { await expect(element).toBeVisible() }) - await Promise.all(promises); - }; - - // Promo Button - async closingPromoButton() { - try { - await this.closePromoButton.click({ timeout: 5000 }); - } catch (error) { - console.error("Error occurred while clicking the closing the Promo button"); + this.footerCreativeCloud = page.locator('.feds-footer-wrapper a[href*="creativecloud.html"]'); + this.footerCreativeCloudForBusiness = page.locator('.feds-footer-wrapper a[href*="creativecloud/business.html"]'); + this.footerdiscountForStudentsAndTeachers = page.locator('.feds-footer-wrapper a[href*="students.html"]'); + this.footerappsForiOS = page.locator('.feds-footer-wrapper a[href*="id852473028"]'); + this.footerWhatIsExperienceCloud = page.locator('.feds-menu-items a[href*="business.adobe.com"]').nth(0); + this.footerWhatIsExperienceCloudTwo = page.locator('.feds-menu-items a[href*="experience-cloud.html"]'); + this.footerDownloadAndInstall = page.locator('.feds-footer-wrapper a[href$="download-install.html"]'); + this.footerAdobeBlog = page.locator('.feds-footer-wrapper a[href*="blog.adobe.com/"]'); + this.footerLoginToYourAccount = page.locator('a[href$="account.adobe.com/"]').nth(0); + this.footerAbout = page.locator('.feds-footer-wrapper a[href$="about-adobe.html"]'); + + // Featured Products + this.footerAdobeAcrobatReaderlogo = page.locator('a[href$="reader/"]'); + this.footerAdobeExpresslogo = page.locator('a[href$="Z2G1FSYV&mv=other"]:nth-of-type(2)'); + this.footerPhotoshoplogo = page.locator('a[href$="photoshop/free-trial-download.html"]'); + this.footerIllustratorlogo = page.locator('a[href$="illustrator/free-trial-download.html"]'); + + // Change Region and social media + this.changeRegion = page.locator('.feds-regionPicker-wrapper'); + this.facebookLogo = page.locator('a[href*="facebook"]'); + this.instagramLogo = page.locator('a[href*="instagram.com"]'); + this.twitterlogo = page.locator('a[href*="twitter"]'); + this.linkedinLogo = page.locator('a[href*="linkedin"]'); + this.copyright = page.locator('.feds-footer-legalWrapper>p>span'); + this.privacyPolicy = page.locator('.feds-footer-legalWrapper a:nth-of-type(1)'); + this.termsOfUse = page.locator('.feds-footer-legalWrapper a:nth-of-type(2)'); + this.cookies = page.locator('.feds-footer-legalWrapper a:nth-of-type(3)'); + this.protectMyPersonalData = page.locator('.feds-footer-legalWrapper a:nth-of-type(4)'); + this.adChoices = page.locator('.feds-footer-legalWrapper a:nth-of-type(5)'); + } + + // UNAV + async validatingUnavElements() { + await this.page.waitForLoadState('networkidle'); + const elements = [this.adobeLogo, this.creativityAndDesign, this.adobeCreativeCloud, this.explore, this.features, this.forBusiness, this.comparePlans, + this.learnAndSupport, this.buyNowButton, this.appSwitcher, this.signInButton]; + const promises = elements.map(async (element) => { await expect(element).toBeVisible(); }); + await Promise.all(promises); + } + + async validatingUnavSecondSetOfElements() { + await this.page.waitForLoadState('networkidle'); + const elements = [this.adobeLogo, this.photoVideoAndDesign, this.creativeCloud, this.program, this.subjectArea, this.trainingAndSupport, + this.pricesAndSubscriptions, this.aboInfo, this.appRecomendation, this.buyNowButton, this.appSwitcher, this.signInButton]; + const promises = elements.map(async (element) => { await expect(element).toBeVisible(); }); + await Promise.all(promises); + } + + async validatingUnavThirdSetOfElements() { + await this.page.waitForLoadState('networkidle'); + const elements = [this.adobeLogo, this.creativityAndDesign, this.creativeCloud, this.program, this.subjectArea, this.trainingAndSupport, + this.pricesAndSubscriptions, this.aboInfo, this.appRecomendation, this.buyNowButton, this.signInButtonTwo]; + const promises = elements.map(async (element) => { await expect(element).toBeVisible(); }); + await Promise.all(promises); + } + + async validatingUnavFourthSetOfElements() { + await this.page.waitForLoadState('networkidle'); + const elements = [this.adobeLogo, this.creativityAndDesign, this.adobeCreativeCloud, this.explore, this.features, this.forBusiness, this.comparePlans, + this.learnAndSupport, this.buyNowButton, this.signInButtonTwo]; + const promises = elements.map(async (element) => { await expect(element).toBeVisible(); }); + await Promise.all(promises); + } + + // Creativity & Design + async validatingCreativityAndDesignElements(locale) { + await this.creativityAndDesign.click({ timeout: 5000 }); + await this.page.waitForLoadState('networkidle'); + const elements = [this.whatIsCC, this.photographers, this.studentsAndTeachers, this.individuals, this.business, this.schoolsAndUniversities, + this.viewPlansAndPricing, this.photoshop, this.adobeExpress, this.lightroom, this.illustrator, this.premierePro, this.adobeStock, this.viewAllProducts, + this.photo, this.graphicDesign, this.Video, this.illustration, this.socialMedia, this.threeDAndAR, this.pdf, this.aiOverviewCC, this.adobeFirefly, + this.adobecom, this.pdfAndESignatures, this.marketingAndCommerce, this.helpAndSupport, this.adobeFireflyCC]; + + const promises = elements.map(async (element) => { + switch (element) { + case this.aiOverviewCC: + if (locale === 'Korea') { return; } + await expect(element).toBeVisible(); + break; + case this.adobeFirefly: + if (locale !== 'Poland') { return; } + await expect(element).toBeVisible(); + break; + case this.adobeFireflyCC: + if (locale === 'Poland') { await expect(element).toBeVisible(); } else { } + break; + default: await expect(element).toBeVisible(); + } + }); + await Promise.all(promises); + await this.creativityAndDesign.click({ timeout: 5000 }); + } + + async validatingCreativityAndDesignElementsSecondSet() { + await this.creativityAndDesign.click({ timeout: 5000 }); + await this.page.waitForLoadState('networkidle'); + const elements = [this.whatIsCC, this.photographers, this.studentsAndTeachers, this.individuals, this.business, this.schoolsAndUniversities, + this.forGovernmentAgencies, this.benifitsForCreativeCloudPaidMembers, this.viewPlansAndPricing, this.photoshop, this.adobeExpress, this.lightroom, + this.illustrator, this.premierePro, this.adobeStock, this.adobeFireflyPro, this.viewAllProducts, this.photo, this.graphicDesign, this.Video, this.illustration, + this.socialMedia, this.threeDAndAR, this.pdf, this.adobeFirefly, this.adobecom, this.pdfAndESignatures, this.marketingAndCommerce, this.helpAndSupport]; + + const promises = elements.map(async (element) => { await expect(element).toBeVisible(); }); + await Promise.all(promises); + await this.creativityAndDesign.click({ timeout: 5000 }); + } + + async validatingCreativityAndDesignElementsThirdSet() { + await this.creativityAndDesign.click({ timeout: 5000 }); + await this.page.waitForLoadState('networkidle'); + const elements = [this.whatIsCC, this.photoshop, this.adobeExpress, this.adobePro, this.illustrator, this.premierePro, this.adobeStockTwo, this.seeAllProducts, + this.individuals, this.photographers, this.studentsAndTeachers, this.business, this.seePlansAndPricing, this.photo, this.graphicDesign, this.Video, this.illustration, + this.socialMedia, this.threeDAndAR, this.pdf, this.aiOverviewCC, this.adobeFirefly, this.adobecom, this.pdfAndESignatures, this.marketingAndCommerce, this.helpAndSupport]; + + const promises = elements.map(async (element) => { await expect(element).toBeVisible(); }); + await Promise.all(promises); + await this.creativityAndDesign.click({ timeout: 5000 }); + } + + async validatingCreativityAndDesignElementsFourthSet() { + await this.creativityAndDesign.click({ timeout: 5000 }); + await this.page.waitForLoadState('networkidle'); + const elements = [this.removeBackground, this.resizeImage, this.covertImageToSVG, this.covertVideoToGIF, this.createQRCode, this.seeAllQuickActions, this.resume, + this.posters, this.card, this.instagramPost, this.youTubeVideo, this.createNow, this.whatIsCC, this.adobeExpressIn, this.photoshop, this.premierePro, + this.illustrator, this.seePlansAndPricing, this.adobeFireflyCC, this.adobecom, this.pdfAndESignatures, this.marketingAndCommerce, this.helpAndSupport]; + + const promises = elements.map(async (element) => { await expect(element).toBeVisible(); }); + await Promise.all(promises); + await this.creativityAndDesign.click({ timeout: 5000 }); + } + + // Photo Video & Design + async validatingPhotoVideoAndDesignElements() { + this.photoVideoAndDesign.click({ timeout: 5000 }); + await this.page.waitForLoadState('networkidle'); + const elements = [this.whatIsCC, this.photographers, this.studentsAndTeachers, this.educationInstitutions, this.business, this.schoolsAndUniversities, + this.viewPlansAndPricing, this.photoshop, this.adobeExpress, this.premierePro, this.illustrator, this.lightroom, this.adobeStock, this.viewAllProducts, + this.photo, this.graphicDesign, this.Video, this.illustration, this.socialMedia, this.threeDAndAR, this.pdf, this.aiOverviewCC, this.adobeFirefly, + this.adobecom, this.pdfAndESignatures, this.marketingAndCommerce, this.helpAndSupport]; + + const promises = elements.map(async (element) => { await expect(element).toBeVisible(); }); + await Promise.all(promises); + this.photoVideoAndDesign.click({ timeout: 5000 }); + } + + // Explore + async validatingExploreElements(locale) { + this.explore.click({ timeout: 5000 }); + const elements = [this.graphicDesignExplore, this.graphicDesignExploreIn]; + const promises = elements.map(async (element) => { + switch (element) { + case this.graphicDesignExplore: + if (locale !== 'India') { return; } + await expect(element).toBeVisible(); + break; + case this.graphicDesignExploreIn: + if (locale === 'India') { await expect(element).toBeVisible(); } else { } + break; + default: await expect(element).toBeVisible(); + } + }); + await Promise.all(promises); + this.explore.click({ timeout: 5000 }); + } + + // Learn & Support + async validatingLearnAndSupportElements() { + this.learnAndSupport.click({ timeout: 5000 }); + const elements = [this.home]; + const promises = elements.map(async (element) => { await expect(element).toBeVisible(); }); + await Promise.all(promises); + this.learnAndSupport.click({ timeout: 5000 }); + } + + // Program + async validatingProgramElements(locale) { + this.program.click({ timeout: 5000 }); + const elements = [this.photoshopPr, this.photoshopAp]; + const promises = elements.map(async (element) => { + switch (element) { + case this.photoshopPr: + if (locale !== 'Spain') { return; } + await expect(element).toBeVisible(); + break; + case this.photoshopAp: + if (locale === 'Spain') { await expect(element).toBeVisible(); } else { } + break; + default: await expect(element).toBeVisible(); + } + }); + await Promise.all(promises); + this.program.click({ timeout: 5000 }); + } + + // Subject Area + async validatingSubjectAreaElements(locale) { + this.subjectArea.click({ timeout: 5000 }); + const elements = [this.photoSa, this.photoCa]; + const promises = elements.map(async (element) => { + switch (element) { + case this.photoSa: + if (locale !== 'Spain') { return; } + await expect(element).toBeVisible(); + break; + case this.photoCa: + if (locale === 'Spain') { await expect(element).toBeVisible(); } else { } + break; + default: await expect(element).toBeVisible(); + } + }); + await Promise.all(promises); + this.subjectArea.click({ timeout: 5000 }); + } + + // Training & Support + async validatingTrainingAndSupportElements() { + this.trainingAndSupport.click({ timeout: 5000 }); + const elements = [this.innovations]; + const promises = elements.map(async (element) => { await expect(element).toBeVisible(); }); + await Promise.all(promises); + this.trainingAndSupport.click({ timeout: 5000 }); + } + + // Footer + async validatingFooterElements(locale) { + const elements = [this.footerCreativeCloud, this.footerCreativeCloudForBusiness, this.footerdiscountForStudentsAndTeachers, this.footerappsForiOS, + this.footerDownloadAndInstall, this.footerAdobeBlog, this.footerLoginToYourAccount, this.footerAbout, this.footerAdobeAcrobatReaderlogo, + this.footerAdobeExpresslogo, this.footerPhotoshoplogo, this.footerIllustratorlogo, this.changeRegion, this.facebookLogo, this.instagramLogo, + this.twitterlogo, this.linkedinLogo, this.copyright, this.privacyPolicy, this.termsOfUse, this.cookies, this.protectMyPersonalData, this.adChoices, + locale === 'Germany' || locale === 'France' ? this.footerWhatIsExperienceCloudTwo : this.footerWhatIsExperienceCloud]; + const promises = elements.map(async (element) => { await expect(element).toBeVisible(); }); + await Promise.all(promises); + } + + // Promo Button + async closingPromoButton() { + try { + await this.closePromoButton.click({ timeout: 5000 }); + } catch (error) { + console.error('Error occurred while clicking the closing the Promo button'); + } + } + + // Test Script + async validatingCreativeCloudUnavPages(page, baseURL, featureIndex, locale, creativeCloudUnav, creativeCloud) { + console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[featureIndex].path}`); + + await test.step(`Validating ${locale} Locale Page`, async () => { + const pageURL = `${baseURL}${features[featureIndex].path}`; + await page.goto(pageURL, { waitUntil: 'domcontentloaded' }); + await expect(page).toHaveURL(pageURL); + + // Verifying the visibility of UNAV Elements + await page.waitForLoadState('domcontentloaded'); + const { unavElements } = creativeCloudUnav.locales[locale]; + if (unavElements) await this[unavElements](); + + // Verifying the visibility of Elements for each Section + const elementsToVerify = ['creativityAndDesignElements', 'photoVideoAndDesignElements', 'exploreElements', 'learnAndSupportElements', + 'programElements', 'subjectAreaElements', 'trainingAndSupportElements']; + + for (const element of elementsToVerify) { + const { [element]: elementVisibility } = creativeCloudUnav.locales[locale]; + if (elementVisibility) { + await this[elementVisibility](); } - }; - - // Test Script - async validatingCreativeCloudUnavPages(page, baseURL, featureIndex, locale, creativeCloudUnav, creativeCloud) { - - console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[featureIndex].path}`); - - const validateElementVisibility = async (element) => { - await Promise.all(element.map(elem => expect(creativeCloud[elem]).toBeVisible())); - }; - - await test.step(`Validating ${locale} Locale Page`, async () => { - const pageURL = `${baseURL}${features[featureIndex].path}`; - await page.goto(pageURL, { waitUntil: 'domcontentloaded' }); - await expect(page).toHaveURL(pageURL); - - // Verifying the visibility of UNAV Elements - await page.waitForLoadState('domcontentloaded'); - const { unavElements } = creativeCloudUnav.locales[locale]; - if (unavElements) await this[unavElements](); - - // Verifying the visibility of Elements for each Section - const elementsToVerify = ["creativityAndDesignElements", "photoVideoAndDesignElements", "exploreElements", "learnAndSupportElements", - "programElements", "subjectAreaElements", "trainingAndSupportElements"]; - - for (const element of elementsToVerify) { - const { [element]: elementVisibility } = creativeCloudUnav.locales[locale]; - if (elementVisibility) { - await this[elementVisibility](); - } - } - - // closing the Promo button - await this.closingPromoButton(); - - // Verifiying the visibility of footer Elements - await this.changeRegion.scrollIntoViewIfNeeded(); - const { footerElements } = creativeCloudUnav.locales[locale]; - if (footerElements) await this[footerElements](); - - // Verifying and clicking the "Buy Now" button - try { - await this.buyNowButton.click({ timeout: 5000 }); - } catch (error) { - await this.buyNowButtonTwo.click({ timeout: 5000 }); - } - await page.waitForLoadState('domcontentloaded'); - const url = await page.url(); - console.info("[Validation] URL of Buy Now Page:", url); - await expect.soft(page).toHaveURL(url); - }); - }; - -}; \ No newline at end of file + } + + // closing the Promo button + await this.closingPromoButton(); + + // Verifiying the visibility of footer Elements + await this.changeRegion.scrollIntoViewIfNeeded(); + const { footerElements } = creativeCloudUnav.locales[locale]; + if (footerElements) await this[footerElements](); + + // Verifying and clicking the "Buy Now" button + try { + await this.buyNowButton.click({ timeout: 5000 }); + } catch (error) { + await this.buyNowButtonTwo.click({ timeout: 5000 }); + } + await page.waitForLoadState('domcontentloaded'); + const url = await page.url(); + console.info('[Validation] URL of Buy Now Page:', url); + await expect.soft(page).toHaveURL(url); + }); + } +} diff --git a/tests/feds/creativeCloudUnavSanity.test.js b/tests/feds/creativeCloudUnavSanity.test.js index bba03f44..e9baf894 100644 --- a/tests/feds/creativeCloudUnavSanity.test.js +++ b/tests/feds/creativeCloudUnavSanity.test.js @@ -1,14 +1,13 @@ -import { expect, test } from "@playwright/test"; -import { features } from "../../features/feds/prodSanity/creativeCloudUnavSanity.spec"; -import CreativeCloudUnavSanity from "../../selectors/feds/feds.creativeCloudUnavSanity.page"; -import creativeCloudUnav from "../../features/feds/locales/creativeCloudUnav.json"; +import { test } from '@playwright/test'; +import { features } from '../../features/feds/prodSanity/creativeCloudUnavSanity.spec.js'; +import CreativeCloudUnavSanity from '../../selectors/feds/feds.creativeCloudUnavSanity.page.js'; +import creativeCloudUnav from '../../features/feds/locales/creativeCloudUnav.json'; test.describe('Test Suite for Creative Cloud Page Components', () => { - - features.forEach((props) => { - test(`${props.name}, ${props.tags}`, async ({ page, baseURL }) => { - const creativeCloud = new CreativeCloudUnavSanity(page); - await creativeCloud.validatingCreativeCloudUnavPages(page, baseURL, props.tcid, props.country, creativeCloudUnav, creativeCloud); - }); + features.forEach((props) => { + test(`${props.name}, ${props.tags}`, async ({ page, baseURL }) => { + const creativeCloud = new CreativeCloudUnavSanity(page); + await creativeCloud.validatingCreativeCloudUnavPages(page, baseURL, props.tcid, props.country, creativeCloudUnav, creativeCloud); }); -}); \ No newline at end of file + }); +}); From 62a110ca939742c7c186f78428d03c048bcbb550 Mon Sep 17 00:00:00 2001 From: Pavan Kumar Date: Thu, 6 Jun 2024 15:09:50 +0530 Subject: [PATCH 3/5] Fixed eslint errors --- .../creativeCloudUnavSanity.spec.js | 6 +- .../feds/feds.creativeCloudUnavSanity.page.js | 86 ++++++++++++------- tests/feds/creativeCloudUnavSanity.test.js | 2 +- 3 files changed, 60 insertions(+), 34 deletions(-) diff --git a/features/feds/prodSanity/creativeCloudUnavSanity.spec.js b/features/feds/prodSanity/creativeCloudUnavSanity.spec.js index 895f7475..fbe57f5f 100644 --- a/features/feds/prodSanity/creativeCloudUnavSanity.spec.js +++ b/features/feds/prodSanity/creativeCloudUnavSanity.spec.js @@ -161,6 +161,6 @@ module.exports = { path: '/ph_fil/creativecloud.html?georouting=off', tags: '@ccounavpagesanity @ccunavPhilippinesEnglish', country: 'Philippines English', - } - ] -} \ No newline at end of file + }, + ], +}; diff --git a/selectors/feds/feds.creativeCloudUnavSanity.page.js b/selectors/feds/feds.creativeCloudUnavSanity.page.js index dc5e84bd..e518d4d7 100644 --- a/selectors/feds/feds.creativeCloudUnavSanity.page.js +++ b/selectors/feds/feds.creativeCloudUnavSanity.page.js @@ -146,7 +146,9 @@ export default class CreativeCloudUnavSanity { // UNAV async validatingUnavElements() { await this.page.waitForLoadState('networkidle'); - const elements = [this.adobeLogo, this.creativityAndDesign, this.adobeCreativeCloud, this.explore, this.features, this.forBusiness, this.comparePlans, + const elements = [ + this.adobeLogo, this.creativityAndDesign, this.adobeCreativeCloud, this.explore, + this.features, this.forBusiness, this.comparePlans, this.learnAndSupport, this.buyNowButton, this.appSwitcher, this.signInButton]; const promises = elements.map(async (element) => { await expect(element).toBeVisible(); }); await Promise.all(promises); @@ -154,24 +156,29 @@ export default class CreativeCloudUnavSanity { async validatingUnavSecondSetOfElements() { await this.page.waitForLoadState('networkidle'); - const elements = [this.adobeLogo, this.photoVideoAndDesign, this.creativeCloud, this.program, this.subjectArea, this.trainingAndSupport, - this.pricesAndSubscriptions, this.aboInfo, this.appRecomendation, this.buyNowButton, this.appSwitcher, this.signInButton]; + const elements = [ + this.adobeLogo, this.photoVideoAndDesign, this.creativeCloud, this.program, + this.subjectArea, this.trainingAndSupport, this.pricesAndSubscriptions, this.aboInfo, + this.appRecomendation, this.buyNowButton, this.appSwitcher, this.signInButton]; const promises = elements.map(async (element) => { await expect(element).toBeVisible(); }); await Promise.all(promises); } async validatingUnavThirdSetOfElements() { await this.page.waitForLoadState('networkidle'); - const elements = [this.adobeLogo, this.creativityAndDesign, this.creativeCloud, this.program, this.subjectArea, this.trainingAndSupport, - this.pricesAndSubscriptions, this.aboInfo, this.appRecomendation, this.buyNowButton, this.signInButtonTwo]; + const elements = [ + this.adobeLogo, this.creativityAndDesign, this.creativeCloud, this.program, this.subjectArea, + this.trainingAndSupport, this.pricesAndSubscriptions, this.aboInfo, this.appRecomendation, + this.buyNowButton, this.signInButtonTwo]; const promises = elements.map(async (element) => { await expect(element).toBeVisible(); }); await Promise.all(promises); } async validatingUnavFourthSetOfElements() { await this.page.waitForLoadState('networkidle'); - const elements = [this.adobeLogo, this.creativityAndDesign, this.adobeCreativeCloud, this.explore, this.features, this.forBusiness, this.comparePlans, - this.learnAndSupport, this.buyNowButton, this.signInButtonTwo]; + const elements = [ + this.adobeLogo, this.creativityAndDesign, this.adobeCreativeCloud, this.explore, this.features, this.forBusiness, + this.comparePlans, this.learnAndSupport, this.buyNowButton, this.signInButtonTwo]; const promises = elements.map(async (element) => { await expect(element).toBeVisible(); }); await Promise.all(promises); } @@ -180,9 +187,11 @@ export default class CreativeCloudUnavSanity { async validatingCreativityAndDesignElements(locale) { await this.creativityAndDesign.click({ timeout: 5000 }); await this.page.waitForLoadState('networkidle'); - const elements = [this.whatIsCC, this.photographers, this.studentsAndTeachers, this.individuals, this.business, this.schoolsAndUniversities, - this.viewPlansAndPricing, this.photoshop, this.adobeExpress, this.lightroom, this.illustrator, this.premierePro, this.adobeStock, this.viewAllProducts, - this.photo, this.graphicDesign, this.Video, this.illustration, this.socialMedia, this.threeDAndAR, this.pdf, this.aiOverviewCC, this.adobeFirefly, + const elements = [ + this.whatIsCC, this.photographers, this.studentsAndTeachers, this.individuals, this.business, + this.schoolsAndUniversities, this.viewPlansAndPricing, this.photoshop, this.adobeExpress, this.lightroom, + this.illustrator, this.premierePro, this.adobeStock, this.viewAllProducts, this.photo, this.graphicDesign, + this.Video, this.illustration, this.socialMedia, this.threeDAndAR, this.pdf, this.aiOverviewCC, this.adobeFirefly, this.adobecom, this.pdfAndESignatures, this.marketingAndCommerce, this.helpAndSupport, this.adobeFireflyCC]; const promises = elements.map(async (element) => { @@ -208,10 +217,13 @@ export default class CreativeCloudUnavSanity { async validatingCreativityAndDesignElementsSecondSet() { await this.creativityAndDesign.click({ timeout: 5000 }); await this.page.waitForLoadState('networkidle'); - const elements = [this.whatIsCC, this.photographers, this.studentsAndTeachers, this.individuals, this.business, this.schoolsAndUniversities, - this.forGovernmentAgencies, this.benifitsForCreativeCloudPaidMembers, this.viewPlansAndPricing, this.photoshop, this.adobeExpress, this.lightroom, - this.illustrator, this.premierePro, this.adobeStock, this.adobeFireflyPro, this.viewAllProducts, this.photo, this.graphicDesign, this.Video, this.illustration, - this.socialMedia, this.threeDAndAR, this.pdf, this.adobeFirefly, this.adobecom, this.pdfAndESignatures, this.marketingAndCommerce, this.helpAndSupport]; + const elements = [ + this.whatIsCC, this.photographers, this.studentsAndTeachers, this.individuals, this.business, + this.schoolsAndUniversities, this.forGovernmentAgencies, this.benifitsForCreativeCloudPaidMembers, + this.viewPlansAndPricing, this.photoshop, this.adobeExpress, this.lightroom, this.illustrator, + this.premierePro, this.adobeStock, this.adobeFireflyPro, this.viewAllProducts, this.photo, + this.graphicDesign, this.Video, this.illustration, this.socialMedia, this.threeDAndAR, this.pdf, + this.adobeFirefly, this.adobecom, this.pdfAndESignatures, this.marketingAndCommerce, this.helpAndSupport]; const promises = elements.map(async (element) => { await expect(element).toBeVisible(); }); await Promise.all(promises); @@ -221,9 +233,12 @@ export default class CreativeCloudUnavSanity { async validatingCreativityAndDesignElementsThirdSet() { await this.creativityAndDesign.click({ timeout: 5000 }); await this.page.waitForLoadState('networkidle'); - const elements = [this.whatIsCC, this.photoshop, this.adobeExpress, this.adobePro, this.illustrator, this.premierePro, this.adobeStockTwo, this.seeAllProducts, - this.individuals, this.photographers, this.studentsAndTeachers, this.business, this.seePlansAndPricing, this.photo, this.graphicDesign, this.Video, this.illustration, - this.socialMedia, this.threeDAndAR, this.pdf, this.aiOverviewCC, this.adobeFirefly, this.adobecom, this.pdfAndESignatures, this.marketingAndCommerce, this.helpAndSupport]; + const elements = [ + this.whatIsCC, this.photoshop, this.adobeExpress, this.adobePro, this.illustrator, this.premierePro, + this.adobeStockTwo, this.seeAllProducts, this.individuals, this.photographers, this.studentsAndTeachers, + this.business, this.seePlansAndPricing, this.photo, this.graphicDesign, this.Video, this.illustration, + this.socialMedia, this.threeDAndAR, this.pdf, this.aiOverviewCC, this.adobeFirefly, this.adobecom, + this.pdfAndESignatures, this.marketingAndCommerce, this.helpAndSupport]; const promises = elements.map(async (element) => { await expect(element).toBeVisible(); }); await Promise.all(promises); @@ -233,9 +248,12 @@ export default class CreativeCloudUnavSanity { async validatingCreativityAndDesignElementsFourthSet() { await this.creativityAndDesign.click({ timeout: 5000 }); await this.page.waitForLoadState('networkidle'); - const elements = [this.removeBackground, this.resizeImage, this.covertImageToSVG, this.covertVideoToGIF, this.createQRCode, this.seeAllQuickActions, this.resume, - this.posters, this.card, this.instagramPost, this.youTubeVideo, this.createNow, this.whatIsCC, this.adobeExpressIn, this.photoshop, this.premierePro, - this.illustrator, this.seePlansAndPricing, this.adobeFireflyCC, this.adobecom, this.pdfAndESignatures, this.marketingAndCommerce, this.helpAndSupport]; + const elements = [ + this.removeBackground, this.resizeImage, this.covertImageToSVG, this.covertVideoToGIF, this.createQRCode, + this.seeAllQuickActions, this.resume, this.posters, this.card, this.instagramPost, this.youTubeVideo, + this.createNow, this.whatIsCC, this.adobeExpressIn, this.photoshop, this.premierePro, this.illustrator, + this.seePlansAndPricing, this.adobeFireflyCC, this.adobecom, this.pdfAndESignatures, this.marketingAndCommerce, + this.helpAndSupport]; const promises = elements.map(async (element) => { await expect(element).toBeVisible(); }); await Promise.all(promises); @@ -246,9 +264,11 @@ export default class CreativeCloudUnavSanity { async validatingPhotoVideoAndDesignElements() { this.photoVideoAndDesign.click({ timeout: 5000 }); await this.page.waitForLoadState('networkidle'); - const elements = [this.whatIsCC, this.photographers, this.studentsAndTeachers, this.educationInstitutions, this.business, this.schoolsAndUniversities, - this.viewPlansAndPricing, this.photoshop, this.adobeExpress, this.premierePro, this.illustrator, this.lightroom, this.adobeStock, this.viewAllProducts, - this.photo, this.graphicDesign, this.Video, this.illustration, this.socialMedia, this.threeDAndAR, this.pdf, this.aiOverviewCC, this.adobeFirefly, + const elements = [ + this.whatIsCC, this.photographers, this.studentsAndTeachers, this.educationInstitutions, this.business, + this.schoolsAndUniversities, this.viewPlansAndPricing, this.photoshop, this.adobeExpress, this.premierePro, + this.illustrator, this.lightroom, this.adobeStock, this.viewAllProducts, this.photo, this.graphicDesign, + this.Video, this.illustration, this.socialMedia, this.threeDAndAR, this.pdf, this.aiOverviewCC, this.adobeFirefly, this.adobecom, this.pdfAndESignatures, this.marketingAndCommerce, this.helpAndSupport]; const promises = elements.map(async (element) => { await expect(element).toBeVisible(); }); @@ -336,11 +356,15 @@ export default class CreativeCloudUnavSanity { // Footer async validatingFooterElements(locale) { - const elements = [this.footerCreativeCloud, this.footerCreativeCloudForBusiness, this.footerdiscountForStudentsAndTeachers, this.footerappsForiOS, - this.footerDownloadAndInstall, this.footerAdobeBlog, this.footerLoginToYourAccount, this.footerAbout, this.footerAdobeAcrobatReaderlogo, - this.footerAdobeExpresslogo, this.footerPhotoshoplogo, this.footerIllustratorlogo, this.changeRegion, this.facebookLogo, this.instagramLogo, - this.twitterlogo, this.linkedinLogo, this.copyright, this.privacyPolicy, this.termsOfUse, this.cookies, this.protectMyPersonalData, this.adChoices, - locale === 'Germany' || locale === 'France' ? this.footerWhatIsExperienceCloudTwo : this.footerWhatIsExperienceCloud]; + const elements = [ + this.footerCreativeCloud, this.footerCreativeCloudForBusiness, this.footerdiscountForStudentsAndTeachers, + this.footerappsForiOS, this.footerDownloadAndInstall, this.footerAdobeBlog, this.footerLoginToYourAccount, + this.footerAbout, this.footerAdobeAcrobatReaderlogo, this.footerAdobeExpresslogo, this.footerPhotoshoplogo, + this.footerIllustratorlogo, this.changeRegion, this.facebookLogo, this.instagramLogo, this.twitterlogo, + this.linkedinLogo, this.copyright, this.privacyPolicy, this.termsOfUse, this.cookies, this.protectMyPersonalData, + this.adChoices, + locale === 'Germany' || locale === 'France' + ? this.footerWhatIsExperienceCloudTwo : this.footerWhatIsExperienceCloud]; const promises = elements.map(async (element) => { await expect(element).toBeVisible(); }); await Promise.all(promises); } @@ -355,7 +379,7 @@ export default class CreativeCloudUnavSanity { } // Test Script - async validatingCreativeCloudUnavPages(page, baseURL, featureIndex, locale, creativeCloudUnav, creativeCloud) { + async validatingCreativeCloudUnavPages(page, baseURL, featureIndex, locale, creativeCloudUnav) { console.info(`[FEDSInfo] Checking Page: ${baseURL}${features[featureIndex].path}`); await test.step(`Validating ${locale} Locale Page`, async () => { @@ -369,7 +393,9 @@ export default class CreativeCloudUnavSanity { if (unavElements) await this[unavElements](); // Verifying the visibility of Elements for each Section - const elementsToVerify = ['creativityAndDesignElements', 'photoVideoAndDesignElements', 'exploreElements', 'learnAndSupportElements', + const elementsToVerify = [ + 'creativityAndDesignElements', 'photoVideoAndDesignElements', + 'exploreElements', 'learnAndSupportElements', 'programElements', 'subjectAreaElements', 'trainingAndSupportElements']; for (const element of elementsToVerify) { diff --git a/tests/feds/creativeCloudUnavSanity.test.js b/tests/feds/creativeCloudUnavSanity.test.js index e9baf894..703813a2 100644 --- a/tests/feds/creativeCloudUnavSanity.test.js +++ b/tests/feds/creativeCloudUnavSanity.test.js @@ -7,7 +7,7 @@ test.describe('Test Suite for Creative Cloud Page Components', () => { features.forEach((props) => { test(`${props.name}, ${props.tags}`, async ({ page, baseURL }) => { const creativeCloud = new CreativeCloudUnavSanity(page); - await creativeCloud.validatingCreativeCloudUnavPages(page, baseURL, props.tcid, props.country, creativeCloudUnav, creativeCloud); + await creativeCloud.validatingCreativeCloudUnavPages(page, baseURL, props.tcid, props.country, creativeCloudUnav); }); }); }); From cde05ee4fc2cd074019f3d0eb8c5434de6eddb81 Mon Sep 17 00:00:00 2001 From: Pavan Kumar Date: Thu, 6 Jun 2024 15:22:22 +0530 Subject: [PATCH 4/5] Fixed else block error --- selectors/feds/feds.creativeCloudUnavSanity.page.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/selectors/feds/feds.creativeCloudUnavSanity.page.js b/selectors/feds/feds.creativeCloudUnavSanity.page.js index e518d4d7..793f3f4a 100644 --- a/selectors/feds/feds.creativeCloudUnavSanity.page.js +++ b/selectors/feds/feds.creativeCloudUnavSanity.page.js @@ -205,7 +205,7 @@ export default class CreativeCloudUnavSanity { await expect(element).toBeVisible(); break; case this.adobeFireflyCC: - if (locale === 'Poland') { await expect(element).toBeVisible(); } else { } + if (locale === 'Poland') { await expect(element).toBeVisible(); } break; default: await expect(element).toBeVisible(); } @@ -287,7 +287,7 @@ export default class CreativeCloudUnavSanity { await expect(element).toBeVisible(); break; case this.graphicDesignExploreIn: - if (locale === 'India') { await expect(element).toBeVisible(); } else { } + if (locale === 'India') { await expect(element).toBeVisible(); } break; default: await expect(element).toBeVisible(); } @@ -316,7 +316,7 @@ export default class CreativeCloudUnavSanity { await expect(element).toBeVisible(); break; case this.photoshopAp: - if (locale === 'Spain') { await expect(element).toBeVisible(); } else { } + if (locale === 'Spain') { await expect(element).toBeVisible(); } break; default: await expect(element).toBeVisible(); } @@ -336,7 +336,7 @@ export default class CreativeCloudUnavSanity { await expect(element).toBeVisible(); break; case this.photoCa: - if (locale === 'Spain') { await expect(element).toBeVisible(); } else { } + if (locale === 'Spain') { await expect(element).toBeVisible(); } break; default: await expect(element).toBeVisible(); } From 698c6bc6a638e5f111e54d9b8594ed8a01ab4370 Mon Sep 17 00:00:00 2001 From: Pavan Kumar Date: Mon, 10 Jun 2024 11:26:45 +0530 Subject: [PATCH 5/5] eslint error resolved --- tests/feds/creativeCloudUnavSanity.test.js | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/feds/creativeCloudUnavSanity.test.js b/tests/feds/creativeCloudUnavSanity.test.js index 703813a2..31afba27 100644 --- a/tests/feds/creativeCloudUnavSanity.test.js +++ b/tests/feds/creativeCloudUnavSanity.test.js @@ -1,6 +1,7 @@ import { test } from '@playwright/test'; import { features } from '../../features/feds/prodSanity/creativeCloudUnavSanity.spec.js'; import CreativeCloudUnavSanity from '../../selectors/feds/feds.creativeCloudUnavSanity.page.js'; +// eslint-disable-next-line import creativeCloudUnav from '../../features/feds/locales/creativeCloudUnav.json'; test.describe('Test Suite for Creative Cloud Page Components', () => {