generated from adobe/aem-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 174
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MWPW-162833 [nala][MEP] confirm the "any-marquee-section" selector (#…
…3229) * add nala test for any-marquee-section * update instructions * update spec file for description * fix description in test file * fix the name in the spec file --------- Co-authored-by: John Pratt <jpratt@adobe.com>
- Loading branch information
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
module.exports = { | ||
name: 'test the any-marquee-section selector', | ||
features: [ | ||
{ | ||
tcid: '0', | ||
name: '@test the default and personalized pages', | ||
desc: 'there should be marquees present in the default page, "replacement text" should be present in the PZN page', | ||
path: '/drafts/nala/features/personalization/any-marquee-section/any-marquee-section', | ||
data: { defaultURL: '/drafts/nala/features/personalization/any-marquee-section/any-marquee-section?mep=%2Fdrafts%2Fnala%2Ffeatures%2Fpersonalization%2Fany-marquee-section%2Fany-marquee-section.json--default' }, | ||
tags: '@anymarquee0 @smoke @regression @milo ', | ||
}, | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
// to run the test: npm run nala stage any-marquee-section.test.js | ||
|
||
import { expect, test } from '@playwright/test'; | ||
import { features } from './any-marquee-section.spec.js'; | ||
|
||
const miloLibs = process.env.MILO_LIBS || ''; | ||
|
||
// Test 0: verify the selector "any-marquee-section" | ||
test(`${features[0].name},${features[0].tags}`, async ({ page, baseURL }) => { | ||
const defaultURL = `${baseURL}${features[0].data.defaultURL}${miloLibs}`; | ||
const pznURL = `${baseURL}${features[0].path}${miloLibs}`; | ||
const PZNUpdateLocator = '[data-manifest-id="any-marquee-section.json"]'; | ||
const marqueeLocator = '.marquee'; | ||
const heroMarqueeLocator = '.hero-marquee'; | ||
|
||
await test.step('step-1: verify default test page', async () => { | ||
console.info(`[Test Page]: ${defaultURL}`); | ||
await page.goto(defaultURL); | ||
await expect(page.locator(PZNUpdateLocator)).toHaveCount(0); | ||
await expect(page.locator(marqueeLocator)).toHaveCount(18); | ||
await expect(page.locator(heroMarqueeLocator)).toHaveCount(3); | ||
}); | ||
|
||
await test.step('step-2: verify personalized page substitutions', async () => { | ||
console.info(`[Test Page]: ${pznURL}`); | ||
await page.goto(pznURL); | ||
await expect(page.locator(PZNUpdateLocator)).toHaveCount(21); | ||
await expect(page.locator(marqueeLocator)).toHaveCount(0); | ||
await expect(page.locator(heroMarqueeLocator)).toHaveCount(0); | ||
}); | ||
}); |