Skip to content

Commit

Permalink
homepage tests
Browse files Browse the repository at this point in the history
  • Loading branch information
hadobe committed Feb 7, 2025
1 parent 432c2fd commit 8cb560d
Show file tree
Hide file tree
Showing 6 changed files with 432 additions and 5 deletions.
11 changes: 6 additions & 5 deletions configs/express.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ const config = {
outputDir: '../test-results',
globalSetup: '../global.setup.js',
/* Maximum time one test can run for. */
timeout: 30 * 1000,
timeout: 60 * 1000,
expect: {
/**
* Maximum time expect() should wait for the condition to be met.
Expand All @@ -37,8 +37,9 @@ const config = {
actionTimeout: 60000,

trace: 'on-first-retry',

// eslint-disable-next-line max-len
baseURL: envs['@express_live'] || 'https://main--express--adobecom.hlx.live',
baseURL: envs['@express_milo_live'] || 'https://main--express-milo--adobecom.aem.live',
},

/* Configure projects for major browsers */
Expand All @@ -47,23 +48,23 @@ const config = {
name: 'express-live-chromium',
use: {
...devices['Desktop Chrome'],
baseURL: envs['@express_live'],
baseURL: envs['@express_milo_live'],
},
},

{
name: 'express-live-firefox',
use: {
...devices['Desktop Firefox'],
baseURL: envs['@express_live'],
baseURL: envs['@express_milo_live'],
},
},

{
name: 'express-live-webkit',
use: {
...devices['Desktop Safari'],
baseURL: envs['@express_live'],
baseURL: envs['@express_milo_live'],
},
},
],
Expand Down
1 change: 1 addition & 0 deletions envs/envs.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ module.exports = {
'@dme_stage': 'https://stage--dme-partners--adobecom.hlx.live',
'@express_stage': 'https://stage--express--adobecom.hlx.live',
'@express_live': 'https://main--express--adobecom.hlx.live',
'@express_milo_live': 'https://main--express-milo--adobecom.aem.live',
'@graybox_bacom': 'https://test.business-graybox.adobe.com',
'@graybox_dc': 'https://test.graybox.adobe.com',
};
11 changes: 11 additions & 0 deletions features/express/testPages/homepage.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
name: 'Express Homepage',
features: [
{
tcid: '0',
name: '@home-page',
path: '/drafts/nala/homepage',
tags: '@express @smoke @regression @stage-smoke',
},
],
};
68 changes: 68 additions & 0 deletions selectors/express/common.page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
export default class commonElements {
constructor(page) {
this.page = page;
this.mainHeading = page.locator('h1');
this.heading2 = page.locator('h2');
this.heading3 = page.locator('h3');
this.heading4 = page.locator('h4');
this.heading5 = page.locator('h5');
this.subheading = page.locator('.subheading');
this.expressLogo = page.locator('.express-logo');

// Marquee block
this.marqueeBlock = page.locator('.ax-marquee');
this.marqueeVideo = this.marqueeBlock.locator('video');
this.marqueeText = page.locator('.marquee-foreground p[style]');
this.marqueeButton = page.locator('.button-inline');

// Gen AI cards
this.genAICards = page.locator('.gen-ai-cards');
this.genAICardsHeading = page.locator('.gen-ai-cards-heading');
this.genAICardsCarouselPlatform = page.locator('.gen-ai-cards-cards .carousel-platform');
this.genAICardsCarouselCard = this.genAICardsCarouselPlatform.locator('.card');
this.genAICardsCarouselCardTitle = this.genAICardsCarouselCard.locator('.cta-card-title');
this.genAICardsCarouselCardText = this.genAICardsCarouselCard.locator('.cta-card-desc');
this.genAICardsCarouselCardImage = this.genAICardsCarouselCard.locator('img');
this.genAICardsCarouselCardButton = this.genAICardsCarouselCard.locator(' > div > .con-button');

// Discover cards
this.discoverCardsBlock = page.locator('.discover-cards');
this.discoverCardsHeading = this.discoverCardsBlock.locator('h2');
this.discoverCardsHeading2 = this.discoverCardsBlock.locator('h3');
this.discoverCard = this.discoverCardsBlock.locator('.card');
this.discoverCardTitle = this.discoverCard.locator('h4');
this.discoverCardText = this.discoverCard.locator('p');
this.discoverCardImage = this.discoverCard.locator('img');
this.discoverCardButton = this.discoverCard.locator('.button');
this.discoverCardsGalleryControl = this.discoverCardsBlock.locator('.gallery-control');
this.dicoverCardsControlPrev = this.discoverCardsGalleryControl.locator('.prev');
this.dicoverCardsControlNext = this.discoverCardsGalleryControl.locator('.next');

// Tutorials card
this.tutorialsBlock = page.locator('.tutorials');
this.tutorialCard = page.locator('.tutorial-card');
this.tutorialCardPlayButton = page.locator('svg.icon.icon-play');
this.tutorialCardDuration = page.locator('.tutorial-card-duration');
this.tutorialCardText = page.locator('.tutorial-card-text');

// Logo row
this.logoRowBlock = page.locator('.logo-row');

// Banner
this.bannerBlock = page.locator('.banner');
this.bannerText = this.bannerBlock.locator('h2');
this.bannerButton = this.bannerBlock.locator('a');
this.bannerLink = this.bannerBlock.locator('a');

// Floating button
this.floatingButtonBlock = page.locator('.floating-button');
this.floatingButtonInvisibleClass = page.locator('.floating-button--intersecting');
this.floatingButtonLink = this.floatingButtonBlock.locator('a');

// Faas form
this.faasForm = page.locator('#sales-contact-form-1');
this.faasFormCloseButton = page.locator('.dialog-close');
this.susiLightDialog = page.locator('.susi-light');
this.susiLightDialogCloseButton = page.locator('.dialog-close');
}
}
37 changes: 37 additions & 0 deletions selectors/express/home.page.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
export default class homePage {
constructor(page) {
this.page = page;
this.marqueeBlock = page.locator('.grid-marquee');
this.headline = page.locator('.headline');
this.ctas = page.locator('.ctas');
this.ctaButton = this.ctas.locator('a');
this.card = page.locator('button.card');
this.cardFace = this.card.locator('.face');
this.cardImage = this.cardFace.locator('picture img');
this.cardDrawer = this.card.locator('.drawer');
this.cardDrawerLink = this.cardDrawer.locator('a');
this.cardDrawerPanel = page.locator('button.card > .drawer .panel');
this.ratingsBlock = page.locator('.grid-marquee.ratings .ratings');
this.ratingsContainer = this.ratingsBlock.locator('.ratings-container');
this.ratingsStar = this.ratingsBlock.locator('svg');
this.ratingsButton = this.ratingsBlock.locator('a');
this.quotesBlock = page.locator('.quotes');
this.quotesAuthorPhoto = page.locator('.quote .author-photo img');
this.quotesAuthorDescription = page.locator('.quote .author-description');
this.quotesQuoteComment = page.locator('.quote .quote-comment');
this.pricingCardBlock = page.locator('.simplified-pricing-cards');
this.comparePlansHeading = page.locator('#compare-adobe-express-plans');
this.pricingCard = this.pricingCardBlock.locator('.card');
this.pricingCardPlanExplanation = this.pricingCard.locator('.plan-explanation');
this.pricingCardButton = this.pricingCard.locator('.button');
this.pricingCardPricingArea = this.pricingCard.locator('.pricing-area');
this.pricingCardPricingAreaText = this.pricingCardPricingArea.locator('p');
this.pricingFooter = page.locator('.pricing-footer');
this.pricingFooterLink = this.pricingFooter.locator('div > a');
this.compareAllPlansButton = page.getByRole('link', { name: 'Compare all plans' });
this.start30DayFreeTrialButton = page.getByRole('link', { name: 'Start 30-day free trial'});
this.getAdobeAccessFreeButton = page.getByRole('link', { name: 'Get Adobe Express free' });
this.start14DayFreeTrialButton = page.getByRole('link', { name: 'Start 14-day free trial' });
this.requestInformationButton = page.getByRole('link', { name: 'Request information' });
}
}
Loading

0 comments on commit 8cb560d

Please sign in to comment.