Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Spec home page #391

Merged
merged 19 commits into from
Jul 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
b43177d
Home Page Test Scripts added for all locales(91)
PavanKumarN8 May 21, 2024
eeb06b0
.eslintrc.js file modified for windows LB
PavanKumarN8 May 21, 2024
da92cc4
I updated the code as per the review comments.
PavanKumarN8 May 23, 2024
2eb3afc
Elements updated for Experience Cloud
PavanKumarN8 May 31, 2024
bca6809
Merge branch 'main' of https://github.com/PavanKumarN8/nala into spec…
PavanKumarN8 Jun 3, 2024
ab8bb02
Update .eslintrc.js
PavanKumarN8 Jun 4, 2024
3040f9d
Fixed eslint errors
PavanKumarN8 Jun 6, 2024
de887f7
Merge branch 'spec-homepage' of https://github.com/PavanKumarN8/nala …
PavanKumarN8 Jun 6, 2024
669a69c
Fixed eslint errors
PavanKumarN8 Jun 9, 2024
d71f005
Fixed eslint errors for HomePageSanity.page.js
PavanKumarN8 Jun 9, 2024
25292d3
Merge branch 'main' into spec-homepage
skumar09 Jun 10, 2024
19fd4e4
Merge branch 'main' of https://github.com/PavanKumarN8/nala into spec…
PavanKumarN8 Jun 26, 2024
6ab8abc
Merge branch 'main' of https://github.com/PavanKumarN8/nala into spec…
PavanKumarN8 Jun 28, 2024
aafe4d0
HomePage Script updated. Deleted 'homePage.json' becasue it's no long…
PavanKumarN8 Jun 28, 2024
b37c178
Merge branch 'spec-homepage' of https://github.com/PavanKumarN8/nala …
PavanKumarN8 Jun 28, 2024
8663653
Merge branch 'main' of https://github.com/PavanKumarN8/nala into spec…
PavanKumarN8 Jul 8, 2024
ca2f7a1
Added iOS, Android, iPad methods and Test file
PavanKumarN8 Jul 9, 2024
1941a73
MobileHomePageSanity.test.js script updated.
PavanKumarN8 Jul 10, 2024
74a4167
Merge branch 'main' into spec-homePage
Dli3 Jul 16, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
166 changes: 166 additions & 0 deletions features/feds/prodSanity/mobileTesting/mobilehomePageSanity.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,166 @@
module.exports = {
name: 'AdobeHomePage',
features: [
{
tcid: '0',
name: '@UnitedStatesMobileHomePageCheck',
path: '/?georouting=off',
tags: '@mobileHomePageSanity @mobileHomePageUnitedStates',
country: 'United States',
},
{
tcid: '1',
name: '@GermanyMobileHomePageCheck',
path: '/de/?georouting=off',
tags: '@mobileHomePageSanity @mobileHomePageGermany',
country: 'Germany',
},
{
tcid: '2',
name: '@FranceMobileHomePageCheck',
path: '/fr/?georouting=off',
tags: '@mobileHomePageSanity @mobileHomePageFrance',
country: 'France',
},
{
tcid: '3',
name: '@ItalyMobileHomePageCheck',
path: '/it/?georouting=off',
tags: '@mobileHomePageSanity @mobileHomePageItaly',
country: 'Italy',
},
{
tcid: '4',
name: '@UnitedKingdomMobileHomePageCheck',
path: '/uk/?georouting=off',
tags: '@mobileHomePageSanity @mobileHomePageUnitedKingdom',
country: 'United Kingdom',
},
{
tcid: '5',
name: '@MiddleEastAndNorthAfricaMobileHomePageCheck',
path: '/mena_ar/?georouting=off',
tags: '@mobileHomePageSanity @mobileHomePageMiddleEastAndNorthAfrica',
country: 'Middle East And North Africa',
},
{
tcid: '6',
name: '@JapanMobileHomePageCheck',
path: '/jp/?georouting=off',
tags: '@mobileHomePageSanity @mobileHomePageJapan',
country: 'Japan',
},
{
tcid: '7',
name: '@IndiaMobileHomePageCheck',
path: '/in/?georouting=off',
tags: '@mobileHomePageSanity @mobileHomePageIndia',
country: 'India',
},
{
tcid: '8',
name: '@SpainMobileHomePageCheck',
path: '/es/?georouting=off',
tags: '@mobileHomePageSanity @mobileHomePageSpain',
country: 'Spain',
},
{
tcid: '9',
name: '@CanadaEnglishMobileHomePageCheck',
path: '/ca/?georouting=off',
tags: '@mobileHomePageSanity @mobileHomePageCanadaEnglish',
country: 'Canada English',
},
{
tcid: '10',
name: '@KoreaMobileHomePageCheck',
path: '/kr/?georouting=off',
tags: '@mobileHomePageSanity @mobileHomePageKorea',
country: 'Korea',
},
{
tcid: '11',
name: '@CanadaFrenchMobileHomePageCheck',
path: '/ca_fr/?georouting=off',
tags: '@mobileHomePageSanity @mobileHomePageCanadaFrench',
country: 'Canada French',
},
{
tcid: '12',
name: '@PolandMobileHomePageCheck',
path: '/pl/?georouting=off',
tags: '@mobileHomePageSanity @mobileHomePagePoland',
country: 'Poland',
},
{
tcid: '13',
name: '@MexicoMobileHomePageCheck',
path: '/mx/?georouting=off',
tags: '@mobileHomePageSanity @mobileHomePageMexico',
country: 'Mexico',
},
{
tcid: '14',
name: '@AustraliaMobileHomePageCheck',
path: '/au/?georouting=off',
tags: '@mobileHomePageSanity @mobileHomePageAustralia',
country: 'Australia',
},
{
tcid: '15',
name: '@IndonesiaMobileHomePageCheck',
path: '/id_id/?georouting=off',
tags: '@mobileHomePageSanity @mobileHomePageIndonesia',
country: 'Indonesia',
},
{
tcid: '16',
name: '@IndonesiaEnglishMobileHomePageCheck',
path: '/id_en/?georouting=off',
tags: '@mobileHomePageSanity @mobileHomePageIndonesiaEnglish',
country: 'Indonesia English',
},
{
tcid: '17',
name: '@TurkeyMobileHomePageCheck',
path: '/tr/?georouting=off',
tags: '@mobileHomePageSanity @mobileHomePageTurkey',
country: 'Turkey',
},
{
tcid: '18',
name: '@ThailandEnglishMobileHomePageCheck',
path: '/th_en/?georouting=off',
tags: '@mobileHomePageSanity @mobileHomePageThailandEnglish',
country: 'Thailand English',
},
{
tcid: '19',
name: '@ThailandMobileHomePageCheck',
path: '/th_th/?georouting=off',
tags: '@mobileHomePageSanity @mobileHomePageThailand',
country: 'Thailand',
},
{
tcid: '20',
name: '@SingaporeMobileHomePageCheck',
path: '/sg/?georouting=off',
tags: '@mobileHomePageSanity @mobileHomePageSingapore',
country: 'Singapore',
},
{
tcid: '21',
name: '@PhilippineMobileHomePageCheck',
path: '/ph_fil/?georouting=off',
tags: '@mobileHomePageSanity @mobileHomePagePhilippines',
country: 'Philippines',
},
{
tcid: '22',
name: '@PhilippineEnglishMobileHomePageCheck',
path: '/ph_fil/?georouting=off',
tags: '@mobileHomePageSanity @mobileHomePagePhilippinesEnglish',
country: 'Philippines English',
},
],
};
80 changes: 61 additions & 19 deletions selectors/feds/feds.homepagesanity.page.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export default class HomePageSanity {
this.signInButton = page.locator('#unav-profile');
this.gnavCCPP = page.locator('.feds-navItem:nth-child(1)');
this.gnavSpecialOffers = page.locator('.feds-navItem:nth-child(2)');
this.hamburgerMenu = page.locator('.feds-toggle');

// Creative Cloud Elements
this.whatIsCC = page.locator('.feds-popup a[href*="creativecloud.html"]').nth(0);
Expand Down Expand Up @@ -41,6 +42,8 @@ export default class HomePageSanity {
this.illustrator = page.locator('.feds-popup a[href*="HZG8WTXS&mv=other"]');
this.seePlansAndPricing = page.locator('.feds-popup a[href*="WXYGHWCC&mv=other"]');

this.whatIsCCMobile = page.locator('.feds-popup a[href*="creativecloud"]').nth(0);

// Document Cloud Elements
this.adobeAcrobat = page.locator('a[href$="acrobat.html"] .feds-navLink-content');
this.acrobatPlansAndPricing = page.locator('.feds-cta.feds-cta--primary[href$="/pricing.html"]');
Expand Down Expand Up @@ -207,13 +210,7 @@ export default class HomePageSanity {
},
{ element: this.photo, conditions: { defaultVisibility: true, excludeCountries: ['India'] } },
{ element: this.pdf, conditions: { defaultVisibility: true, excludeCountries: ['India'] } },
{
element: this.aIOverviewCC,
conditions: {
defaultVisibility: true,
excludeCountries: ['Belgium French', 'India', 'Japan'],
},
},
{ element: this.aIOverviewCC, conditions: { defaultVisibility: true } },
{ element: this.adobeFirefly, conditions: { defaultVisibility: true } },
{ element: this.seeAllProducts, conditions: { includeCountries: ['Brazil', 'Chile', 'Spain'] } },
{ element: this.individuals, conditions: { includeCountries: ['Brazil', 'Chile'] } },
Expand Down Expand Up @@ -245,7 +242,7 @@ export default class HomePageSanity {
await this.gnavDC.click();
const elementsToCheck = [
{ element: this.adobeAcrobat, conditions: { defaultVisibility: true } },
{ element: this.acrobatPlansAndPricing, conditions: { defaultVisibility: true, excludeCountries: ['Germany'] } },
{ element: this.acrobatPlansAndPricing, conditions: { defaultVisibility: true } },
{ element: this.acrobatReader, conditions: { defaultVisibility: true } },
{ element: this.business, conditions: { defaultVisibility: true } },
{
Expand All @@ -265,7 +262,7 @@ export default class HomePageSanity {
'Nederland', 'Poland', 'Portugal', 'Romania', 'Switzerland', 'Slovenia', 'Slovakia', 'Switzerland French',
'Finland', 'Sweden', 'Switzerland Italian', 'Turkey', 'Czech Republic', 'Bulgaria', 'Russia', 'Ukraine',
'Israel Hebrew', 'UAE', 'Middle East And North Africa', 'Kingdom Of Saudi Arabia', 'Egypt', 'Kuwait',
'Qatar', 'India', 'Indonesia', 'Malaysia', 'Philippines', 'Vietnam', 'India Hindi', 'Thailand',
'Qatar', 'Indonesia', 'Malaysia', 'Philippines', 'Vietnam', 'India Hindi', 'Thailand',
'Hong Kong', 'Taiwan', 'Japan', 'Korea', 'Latvia'],
},
},
Expand All @@ -287,7 +284,6 @@ export default class HomePageSanity {
{ element: this.wordToPDF, conditions: { defaultVisibility: true } },
{ element: this.developerResources, conditions: { defaultVisibility: true } },
{ element: this.eventsAndWebinars, conditions: { defaultVisibility: true } },
{ element: this.AIOverviewDCTwo, conditions: { includeCountries: ['India'] } },
{ element: this.consultationBeforePurchase, conditions: { includeCountries: ['Japan'] } },
{ element: this.governmentTwo, conditions: { includeCountries: ['Japan'] } },
];
Expand Down Expand Up @@ -356,7 +352,7 @@ export default class HomePageSanity {
{ element: this.requestAdemo, conditions: { includeCountries: ['Brazil', 'India'] } },
{ element: this.analytics, conditions: { includeCountries: ['Brazil', 'India'] } },
{ element: this.experienceManagerAssets, conditions: { includeCountries: ['Brazil', 'India'] } },
{ element: this.aiOverview, conditions: { includeCountries: ['Brazil', 'India'] } },
{ element: this.aiOverview, conditions: { includeCountries: ['Brazil'] } },
{ element: this.adobeSummit, conditions: { includeCountries: ['Brazil', 'India'] } },
];

Expand All @@ -376,13 +372,7 @@ export default class HomePageSanity {
await this.gnavHelpX.click();
const elementsToCheck = [
{ element: this.helpCentre, conditions: { defaultVisibility: true } },
{
element: this.downloadAndInstall,
conditions: {
defaultVisibility: true,
excludeCountries: ['Ecuador', 'Puerto Rico'],
},
},
{ element: this.downloadAndInstall, conditions: { defaultVisibility: true } },
{ element: this.contact, conditions: { defaultVisibility: true } },
{ element: this.manageMyAccount, conditions: { defaultVisibility: true } },
{
Expand All @@ -394,7 +384,6 @@ export default class HomePageSanity {
},
{ element: this.creativeCloudTutorials, conditions: { defaultVisibility: true } },
{ element: this.adobeExperienceLeague, conditions: { defaultVisibility: true } },
{ element: this.downloadAndInstallTwo, conditions: { includeCountries: ['Ecuador', 'Puerto Rico'] } },
{
element: this.subscribeToAdobeStatusTwo,
conditions: { includeCountries: ['Kuwait English', 'Qatar English'] },
Expand Down Expand Up @@ -495,4 +484,57 @@ export default class HomePageSanity {
}
}));
}

// Android, iOS and iPad methods.

// U-NAV
async validatingUnav() {
const elements = [this.hamburgerMenu, this.adobelogo, this.appSwitcher, this.signInButton];
await Promise.all(elements.map(async (element) => {
await expect(element).toBeVisible();
}));
}

// Hamburger Menu Items
async validatingHamburgerMenu() {
await this.hamburgerMenu.click();
const elements = [this.gnavCC, this.gnavDC, this.gnavEC, this.gnavHelpX];
await Promise.all(elements.map(async (element) => {
await expect(element).toBeVisible();
}));
}

// Creativity & Design
async validatingCreativityAndDesign(country) {
await this.gnavCC.click();

const excludeCountries = ['United Kingdom', 'India', 'Spain'];

if (excludeCountries.includes(country)) {
await expect(this.whatIsCCMobile).not.toBeVisible();
} else {
await expect(this.whatIsCCMobile).toBeVisible();
}
}

// Marketing & Commerce
async validatingMarketingAndCommerce() {
await this.gnavEC.click();
await expect(this.adobeExperienceCloud).toBeVisible();
await this.hamburgerMenu.click();
}

// Footer
async validatingFooter(country) {
await this.changeRegion.scrollIntoViewIfNeeded();

const includeCountry = ['India'];

const elements = [this.changeRegion, this.facebookLogo, this.twitterlogo,
this.linkedinLogo, this.copyright, this.privacyPolicy, this.termsOfUse, this.cookies,
this.protectMyPersonalData, this.adChoices,
includeCountry.includes(country) ? this.instagramLogoTwo : this.instagramLogo,
];
await Promise.all(elements.map((element) => expect(element).toBeVisible()));
}
}
35 changes: 35 additions & 0 deletions tests/feds/mobileHomePageSanity.test.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
import { test, expect } from '@playwright/test';
import { features } from '../../features/feds/prodSanity/mobileTesting/mobilehomePageSanity.spec.js';
import HomePageSanity from '../../selectors/feds/feds.homepagesanity.page.js';

test.describe('Test Suite for Home Page on Android & iOS & iPad Devices', () => {
let home;

test.beforeEach(async ({ page }) => {
home = new HomePageSanity(page);
});

test.afterEach(async ({ page }) => {
await page.close();
});
features.forEach((props) => {
test(`${props.name}, ${props.tags}, ${props.country}`, async ({ page, baseURL }) => {
console.info(`[FEDSInfo] Checking Page: ${props.country} = ${baseURL}${props.path}`);

const pageURL = `${baseURL}${props.path}`;
await page.goto(pageURL, { waitUntil: 'networkidle' });
await expect(page).toHaveURL(pageURL);

// Verifying the visibility of G-NAV Elements
await home.validatingUnav();
// Verifying the visibility of Hamburger Menu Elements
await home.validatingHamburgerMenu();
// Verifying the visibility of Creative Cloud Elements
await home.validatingCreativityAndDesign(props.country);
// Verifying the visibility of Experience Cloud Elements
await home.validatingMarketingAndCommerce();
// Verifying the visibility of Footer Elements
await home.validatingFooter(props.country);
});
});
});
Loading