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

warriors: update and activate commerce tests #418

Merged
merged 7 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
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
23 changes: 15 additions & 8 deletions features/milo/commerce.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@ module.exports = {
tcid: '0',
name: '@Commerce-Price-Term',
path: '/drafts/nala/features/commerce/prices-with-term',
tags: '@commerce @smoke @regression @nopr',
tags: '@commerce @smoke @regression',
},
{
tcid: '1',
name: '@Commerce-Price-Unit-Term',
path: '/drafts/nala/features/commerce/prices-with-term-unit',
tags: '@commerce @smoke @regression @nopr',
tags: '@commerce @smoke @regression',

},
{
tcid: '2',
name: '@Commerce-Price-Taxlabel-Unit-Term',
path: '/drafts/nala/features/commerce/prices-with-term-unit-taxlabel',
tags: '@commerce @smoke @regression @nopr',
tags: '@commerce @smoke @regression',
},
{
tcid: '3',
name: '@Commerce-Promo',
path: '/drafts/nala/features/commerce/promo-placeholders',
data: { promo: 'nicopromo' },
tags: '@commerce @smoke @regression @nopr',
data: { promo: 'UMRM2MUSPr501YOC' },
tags: '@commerce @smoke @regression',
},
{
tcid: '4',
Expand All @@ -49,18 +49,25 @@ module.exports = {
tcid: '6',
name: '@Commerce-KitchenSink-Smoke',
path: '/docs/library/kitchen-sink/merch-card',
tags: '@commerce @kitchensink @smoke @regression @nopr',
tags: '@commerce @kitchensink @smoke @regression',
},
{
tcid: '7',
name: '@Commerce-Localized',
path: '/de/drafts/nala/features/commerce/promo-placeholders',
data: {
promo: 'nicopromo',
promo: 'PEMAP50AASTE2',
CO: 'co=DE',
lang: 'lang=de',
},
tags: '@commerce @smoke @regression @nopr',
tags: '@commerce @smoke @regression',
},
{
tcid: '8',
name: '@Commerce-Old-Promo',
path: '/drafts/nala/features/commerce/promo-old-price',
data: { promo: 'UMRM2MUSPr501YOC' },
tags: '@commerce @smoke @regression',
},
],
};
2 changes: 1 addition & 1 deletion features/milo/promotions.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ module.exports = {
},
{
tcid: '13',
name: '@Promo-insert-fragment',
name: '@Promo-fragment-insert',
path: '/drafts/nala/features/promotions/promo-with-fragments-insert',
data: {
textMarquee: 'Fragment marquee',
Expand Down
98 changes: 47 additions & 51 deletions tests/milo/commerce.feature.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { expect, test } from '@playwright/test';

Check failure on line 1 in tests/milo/commerce.feature.test.js

View workflow job for this annotation

GitHub Actions / Running tests

[milo-live-chromium] › commerce.feature.test.js:257:7 › Commerce feature test suite › @Commerce-KitchenSink-Smoke

5) [milo-live-chromium] › commerce.feature.test.js:257:7 › Commerce feature test suite › @Commerce-KitchenSink-Smoke, @Commerce @kitchensink @smoke @regression › Validate wcs placeholders Test timeout of 30000ms exceeded.

Check failure on line 1 in tests/milo/commerce.feature.test.js

View workflow job for this annotation

GitHub Actions / Running tests

[milo-live-chromium] › commerce.feature.test.js:265:7 › Commerce feature test suite › @Commerce-KitchenSink-Smoke

5) [milo-live-chromium] › commerce.feature.test.js:265:7 › Commerce feature test suite › @Commerce-KitchenSink-Smoke, @Commerce @kitchensink @smoke @regression › Validate wcs placeholders Test timeout of 30000ms exceeded.
import { features } from '../../features/milo/commerce.spec.js';
import { WebUtil } from '../../libs/webutil.js';
import CommercePage from '../../selectors/milo/commerce.feature.page.js';
Expand All @@ -22,33 +22,24 @@
});

await test.step('Validate regular price display', async () => {
await COMM.price.waitFor({ state: 'visible', timeout: 10000 });

Check failure on line 25 in tests/milo/commerce.feature.test.js

View workflow job for this annotation

GitHub Actions / Running tests

[milo-live-chromium] › commerce.feature.test.js:15:7 › Commerce feature test suite › @Commerce-Price-Term

1) [milo-live-chromium] › commerce.feature.test.js:15:7 › Commerce feature test suite › @Commerce-Price-Term,@Commerce @smoke @regression › Validate regular price display TimeoutError: locator.waitFor: Timeout 10000ms exceeded. Call log: - waiting for locator('//span[@Data-Template="price"]') to be visible 23 | 24 | await test.step('Validate regular price display', async () => { > 25 | await COMM.price.waitFor({ state: 'visible', timeout: 10000 }); | ^ 26 | expect(await COMM.price.innerText()).toContain('US$263.88/yr'); 27 | expect(await COMM.price.locator('.price-recurrence').innerText()).not.toBe(''); 28 | expect(await COMM.price.locator('.price-unit-type').innerText()).toBe(''); at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:25:24 at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:24:16

Check failure on line 25 in tests/milo/commerce.feature.test.js

View workflow job for this annotation

GitHub Actions / Running tests

[milo-live-chromium] › commerce.feature.test.js:15:7 › Commerce feature test suite › @Commerce-Price-Term

1) [milo-live-chromium] › commerce.feature.test.js:15:7 › Commerce feature test suite › @Commerce-Price-Term,@Commerce @smoke @regression › Validate regular price display Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── TimeoutError: locator.waitFor: Timeout 10000ms exceeded. Call log: - waiting for locator('//span[@Data-Template="price"]') to be visible 23 | 24 | await test.step('Validate regular price display', async () => { > 25 | await COMM.price.waitFor({ state: 'visible', timeout: 10000 }); | ^ 26 | expect(await COMM.price.innerText()).toContain('US$263.88/yr'); 27 | expect(await COMM.price.locator('.price-recurrence').innerText()).not.toBe(''); 28 | expect(await COMM.price.locator('.price-unit-type').innerText()).toBe(''); at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:25:24 at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:24:16
await expect(COMM.price).toHaveAttribute('data-display-recurrence', 'true');
await expect(COMM.price).toHaveAttribute('data-display-per-unit', 'false');
await expect(COMM.price).toHaveAttribute('data-display-tax', 'false');
expect(await COMM.price.innerText()).toContain('US$263.88');
expect(await COMM.price.innerText()).toContain('US$263.88/yr');
expect(await COMM.price.locator('.price-recurrence').innerText()).not.toBe('');
expect(await COMM.price.locator('.price-unit-type').innerText()).toBe('');
expect(await COMM.price.locator('.price-tax-inclusivity').innerText()).toBe('');
});

await test.step('Validate optical price display', async () => {
await COMM.priceOptical.waitFor({ state: 'visible', timeout: 10000 });

Check failure on line 33 in tests/milo/commerce.feature.test.js

View workflow job for this annotation

GitHub Actions / Running tests

[milo-live-chromium] › commerce.feature.test.js:23:7 › Commerce feature test suite › @Commerce-Price-Term

1) [milo-live-chromium] › commerce.feature.test.js:23:7 › Commerce feature test suite › @Commerce-Price-Term,@Commerce @smoke @regression › Validate regular price display TimeoutError: locator.waitFor: Timeout 10000ms exceeded. Call log: - waiting for locator('//span[@Data-Template="price"]') to be visible 31 | 32 | await test.step('Validate regular price display', async () => { > 33 | await COMM.price.waitFor({ state: 'visible', timeout: 10000 }); | ^ 34 | expect(await COMM.price.innerText()).toContain('US$263.88/yr'); 35 | expect(await COMM.price.locator('.price-recurrence').innerText()).not.toBe(''); 36 | expect(await COMM.price.locator('.price-unit-type').innerText()).toBe(''); at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:33:24 at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:32:16

Check failure on line 33 in tests/milo/commerce.feature.test.js

View workflow job for this annotation

GitHub Actions / Running tests

[milo-live-chromium] › commerce.feature.test.js:23:7 › Commerce feature test suite › @Commerce-Price-Term

1) [milo-live-chromium] › commerce.feature.test.js:23:7 › Commerce feature test suite › @Commerce-Price-Term,@Commerce @smoke @regression › Validate regular price display Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── TimeoutError: locator.waitFor: Timeout 10000ms exceeded. Call log: - waiting for locator('//span[@Data-Template="price"]') to be visible 31 | 32 | await test.step('Validate regular price display', async () => { > 33 | await COMM.price.waitFor({ state: 'visible', timeout: 10000 }); | ^ 34 | expect(await COMM.price.innerText()).toContain('US$263.88/yr'); 35 | expect(await COMM.price.locator('.price-recurrence').innerText()).not.toBe(''); 36 | expect(await COMM.price.locator('.price-unit-type').innerText()).toBe(''); at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:33:24 at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:32:16
await expect(COMM.priceOptical).toHaveAttribute('data-display-recurrence', 'true');
await expect(COMM.priceOptical).toHaveAttribute('data-display-per-unit', 'false');
await expect(COMM.priceOptical).toHaveAttribute('data-display-tax', 'false');
expect(await COMM.priceOptical.innerText()).toContain('US$21.99');
expect(await COMM.priceOptical.innerText()).toContain('US$21.99/mo');
expect(await COMM.priceOptical.locator('.price-recurrence').innerText()).not.toBe('');
expect(await COMM.priceOptical.locator('.price-unit-type').innerText()).toBe('');
expect(await COMM.priceOptical.locator('.price-tax-inclusivity').innerText()).toBe('');
});

await test.step('Validate strikethrough price display', async () => {
await COMM.priceStrikethrough.waitFor({ state: 'visible', timeout: 10000 });
await expect(COMM.priceStrikethrough).toHaveAttribute('data-display-recurrence', 'true');
await expect(COMM.priceStrikethrough).toHaveAttribute('data-display-per-unit', 'false');
await expect(COMM.priceStrikethrough).toHaveAttribute('data-display-tax', 'false');
expect(await COMM.priceStrikethrough.innerText()).toContain('US$263.88');
expect(await COMM.priceStrikethrough.innerText()).toContain('US$263.88/yr');
expect(await COMM.priceStrikethrough.locator('.price-recurrence').innerText()).not.toBe('');
expect(await COMM.priceStrikethrough.locator('.price-unit-type').innerText()).toBe('');
expect(await COMM.priceStrikethrough.locator('.price-tax-inclusivity').innerText()).toBe('');
Expand All @@ -70,33 +61,24 @@
});

await test.step('Validate regular price display', async () => {
await COMM.price.waitFor({ state: 'visible', timeout: 10000 });

Check failure on line 64 in tests/milo/commerce.feature.test.js

View workflow job for this annotation

GitHub Actions / Running tests

[milo-live-chromium] › commerce.feature.test.js:54:7 › Commerce feature test suite › @Commerce-Price-Unit-Term

2) [milo-live-chromium] › commerce.feature.test.js:54:7 › Commerce feature test suite › @Commerce-Price-Unit-Term,@Commerce @smoke @regression › Validate regular price display TimeoutError: locator.waitFor: Timeout 10000ms exceeded. Call log: - waiting for locator('//span[@Data-Template="price"]') to be visible 62 | 63 | await test.step('Validate regular price display', async () => { > 64 | await COMM.price.waitFor({ state: 'visible', timeout: 10000 }); | ^ 65 | expect(await COMM.price.innerText()).toContain('US$'); 66 | expect(await COMM.price.locator('.price-recurrence').innerText()).not.toBe(''); 67 | expect(await COMM.price.locator('.price-unit-type').innerText()).not.toBe(''); at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:64:24 at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:63:16

Check failure on line 64 in tests/milo/commerce.feature.test.js

View workflow job for this annotation

GitHub Actions / Running tests

[milo-live-chromium] › commerce.feature.test.js:54:7 › Commerce feature test suite › @Commerce-Price-Unit-Term

2) [milo-live-chromium] › commerce.feature.test.js:54:7 › Commerce feature test suite › @Commerce-Price-Unit-Term,@Commerce @smoke @regression › Validate regular price display Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── TimeoutError: locator.waitFor: Timeout 10000ms exceeded. Call log: - waiting for locator('//span[@Data-Template="price"]') to be visible 62 | 63 | await test.step('Validate regular price display', async () => { > 64 | await COMM.price.waitFor({ state: 'visible', timeout: 10000 }); | ^ 65 | expect(await COMM.price.innerText()).toContain('US$'); 66 | expect(await COMM.price.locator('.price-recurrence').innerText()).not.toBe(''); 67 | expect(await COMM.price.locator('.price-unit-type').innerText()).not.toBe(''); at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:64:24 at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:63:16
await expect(COMM.price).toHaveAttribute('data-display-recurrence', 'true');
await expect(COMM.price).toHaveAttribute('data-display-per-unit', 'true');
await expect(COMM.price).toHaveAttribute('data-display-tax', 'false');
expect(await COMM.price.innerText()).toContain('US$263.88');
expect(await COMM.price.innerText()).toContain('US$');
expect(await COMM.price.locator('.price-recurrence').innerText()).not.toBe('');
expect(await COMM.price.locator('.price-unit-type').innerText()).not.toBe('');
expect(await COMM.price.locator('.price-tax-inclusivity').innerText()).toBe('');
});

await test.step('Validate optical price display', async () => {
await COMM.priceOptical.waitFor({ state: 'visible', timeout: 10000 });

Check failure on line 72 in tests/milo/commerce.feature.test.js

View workflow job for this annotation

GitHub Actions / Running tests

[milo-live-chromium] › commerce.feature.test.js:62:7 › Commerce feature test suite › @Commerce-Price-Unit-Term

2) [milo-live-chromium] › commerce.feature.test.js:62:7 › Commerce feature test suite › @Commerce-Price-Unit-Term,@Commerce @smoke @regression › Validate regular price display TimeoutError: locator.waitFor: Timeout 10000ms exceeded. Call log: - waiting for locator('//span[@Data-Template="price"]') to be visible 70 | 71 | await test.step('Validate regular price display', async () => { > 72 | await COMM.price.waitFor({ state: 'visible', timeout: 10000 }); | ^ 73 | expect(await COMM.price.innerText()).toContain('US$'); 74 | expect(await COMM.price.locator('.price-recurrence').innerText()).not.toBe(''); 75 | expect(await COMM.price.locator('.price-unit-type').innerText()).not.toBe(''); at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:72:24 at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:71:16

Check failure on line 72 in tests/milo/commerce.feature.test.js

View workflow job for this annotation

GitHub Actions / Running tests

[milo-live-chromium] › commerce.feature.test.js:62:7 › Commerce feature test suite › @Commerce-Price-Unit-Term

2) [milo-live-chromium] › commerce.feature.test.js:62:7 › Commerce feature test suite › @Commerce-Price-Unit-Term,@Commerce @smoke @regression › Validate regular price display Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── TimeoutError: locator.waitFor: Timeout 10000ms exceeded. Call log: - waiting for locator('//span[@Data-Template="price"]') to be visible 70 | 71 | await test.step('Validate regular price display', async () => { > 72 | await COMM.price.waitFor({ state: 'visible', timeout: 10000 }); | ^ 73 | expect(await COMM.price.innerText()).toContain('US$'); 74 | expect(await COMM.price.locator('.price-recurrence').innerText()).not.toBe(''); 75 | expect(await COMM.price.locator('.price-unit-type').innerText()).not.toBe(''); at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:72:24 at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:71:16
await expect(COMM.priceOptical).toHaveAttribute('data-display-recurrence', 'true');
await expect(COMM.priceOptical).toHaveAttribute('data-display-per-unit', 'true');
await expect(COMM.priceOptical).toHaveAttribute('data-display-tax', 'false');
expect(await COMM.priceOptical.innerText()).toContain('US$21.99');
expect(await COMM.priceOptical.innerText()).toContain('US$');
expect(await COMM.priceOptical.locator('.price-recurrence').innerText()).not.toBe('');
expect(await COMM.priceOptical.locator('.price-unit-type').innerText()).not.toBe('');
expect(await COMM.priceOptical.locator('.price-tax-inclusivity').innerText()).toBe('');
});

await test.step('Validate strikethrough price display', async () => {
await COMM.priceStrikethrough.waitFor({ state: 'visible', timeout: 10000 });
await expect(COMM.priceStrikethrough).toHaveAttribute('data-display-recurrence', 'true');
await expect(COMM.priceStrikethrough).toHaveAttribute('data-display-per-unit', 'true');
await expect(COMM.priceStrikethrough).toHaveAttribute('data-display-tax', 'false');
expect(await COMM.priceStrikethrough.innerText()).toContain('US$263.88');
expect(await COMM.priceStrikethrough.innerText()).toContain('US$');
expect(await COMM.priceStrikethrough.locator('.price-recurrence').innerText()).not.toBe('');
expect(await COMM.priceStrikethrough.locator('.price-unit-type').innerText()).not.toBe('');
expect(await COMM.priceStrikethrough.locator('.price-tax-inclusivity').innerText()).toBe('');
Expand All @@ -118,33 +100,24 @@
});

await test.step('Validate regular price display', async () => {
await COMM.price.waitFor({ state: 'visible', timeout: 10000 });

Check failure on line 103 in tests/milo/commerce.feature.test.js

View workflow job for this annotation

GitHub Actions / Running tests

[milo-live-chromium] › commerce.feature.test.js:93:7 › Commerce feature test suite › @Commerce-Price-Taxlabel-Unit-Term

3) [milo-live-chromium] › commerce.feature.test.js:93:7 › Commerce feature test suite › @Commerce-Price-Taxlabel-Unit-Term,@Commerce @smoke @regression › Validate regular price display TimeoutError: locator.waitFor: Timeout 10000ms exceeded. Call log: - waiting for locator('//span[@Data-Template="price"]') to be visible 101 | 102 | await test.step('Validate regular price display', async () => { > 103 | await COMM.price.waitFor({ state: 'visible', timeout: 10000 }); | ^ 104 | expect(await COMM.price.innerText()).toContain('US$'); 105 | expect(await COMM.price.locator('.price-recurrence').innerText()).not.toBe(''); 106 | expect(await COMM.price.locator('.price-unit-type').innerText()).not.toBe(''); at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:103:24 at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:102:16

Check failure on line 103 in tests/milo/commerce.feature.test.js

View workflow job for this annotation

GitHub Actions / Running tests

[milo-live-chromium] › commerce.feature.test.js:93:7 › Commerce feature test suite › @Commerce-Price-Taxlabel-Unit-Term

3) [milo-live-chromium] › commerce.feature.test.js:93:7 › Commerce feature test suite › @Commerce-Price-Taxlabel-Unit-Term,@Commerce @smoke @regression › Validate regular price display Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── TimeoutError: locator.waitFor: Timeout 10000ms exceeded. Call log: - waiting for locator('//span[@Data-Template="price"]') to be visible 101 | 102 | await test.step('Validate regular price display', async () => { > 103 | await COMM.price.waitFor({ state: 'visible', timeout: 10000 }); | ^ 104 | expect(await COMM.price.innerText()).toContain('US$'); 105 | expect(await COMM.price.locator('.price-recurrence').innerText()).not.toBe(''); 106 | expect(await COMM.price.locator('.price-unit-type').innerText()).not.toBe(''); at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:103:24 at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:102:16
await expect(COMM.price).toHaveAttribute('data-display-recurrence', 'true');
await expect(COMM.price).toHaveAttribute('data-display-per-unit', 'true');
await expect(COMM.price).toHaveAttribute('data-display-tax', 'true');
expect(await COMM.price.innerText()).toContain('US$263.88');
expect(await COMM.price.innerText()).toContain('US$');
expect(await COMM.price.locator('.price-recurrence').innerText()).not.toBe('');
expect(await COMM.price.locator('.price-unit-type').innerText()).not.toBe('');
expect(await COMM.price.locator('.price-tax-inclusivity').innerText()).not.toBe('');
});

await test.step('Validate optical price display', async () => {
await COMM.priceOptical.waitFor({ state: 'visible', timeout: 10000 });

Check failure on line 111 in tests/milo/commerce.feature.test.js

View workflow job for this annotation

GitHub Actions / Running tests

[milo-live-chromium] › commerce.feature.test.js:101:7 › Commerce feature test suite › @Commerce-Price-Taxlabel-Unit-Term

3) [milo-live-chromium] › commerce.feature.test.js:101:7 › Commerce feature test suite › @Commerce-Price-Taxlabel-Unit-Term,@Commerce @smoke @regression › Validate regular price display TimeoutError: locator.waitFor: Timeout 10000ms exceeded. Call log: - waiting for locator('//span[@Data-Template="price"]') to be visible 109 | 110 | await test.step('Validate regular price display', async () => { > 111 | await COMM.price.waitFor({ state: 'visible', timeout: 10000 }); | ^ 112 | expect(await COMM.price.innerText()).toContain('US$'); 113 | expect(await COMM.price.locator('.price-recurrence').innerText()).not.toBe(''); 114 | expect(await COMM.price.locator('.price-unit-type').innerText()).not.toBe(''); at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:111:24 at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:110:16

Check failure on line 111 in tests/milo/commerce.feature.test.js

View workflow job for this annotation

GitHub Actions / Running tests

[milo-live-chromium] › commerce.feature.test.js:101:7 › Commerce feature test suite › @Commerce-Price-Taxlabel-Unit-Term

3) [milo-live-chromium] › commerce.feature.test.js:101:7 › Commerce feature test suite › @Commerce-Price-Taxlabel-Unit-Term,@Commerce @smoke @regression › Validate regular price display Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── TimeoutError: locator.waitFor: Timeout 10000ms exceeded. Call log: - waiting for locator('//span[@Data-Template="price"]') to be visible 109 | 110 | await test.step('Validate regular price display', async () => { > 111 | await COMM.price.waitFor({ state: 'visible', timeout: 10000 }); | ^ 112 | expect(await COMM.price.innerText()).toContain('US$'); 113 | expect(await COMM.price.locator('.price-recurrence').innerText()).not.toBe(''); 114 | expect(await COMM.price.locator('.price-unit-type').innerText()).not.toBe(''); at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:111:24 at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:110:16
await expect(COMM.priceOptical).toHaveAttribute('data-display-recurrence', 'true');
await expect(COMM.priceOptical).toHaveAttribute('data-display-per-unit', 'true');
await expect(COMM.priceOptical).toHaveAttribute('data-display-tax', 'true');
expect(await COMM.priceOptical.innerText()).toContain('US$21.99');
expect(await COMM.priceOptical.innerText()).toContain('US$');
expect(await COMM.priceOptical.locator('.price-recurrence').innerText()).not.toBe('');
expect(await COMM.priceOptical.locator('.price-unit-type').innerText()).not.toBe('');
expect(await COMM.priceOptical.locator('.price-tax-inclusivity').innerText()).not.toBe('');
});

await test.step('Validate strikethrough price display', async () => {
await COMM.priceStrikethrough.waitFor({ state: 'visible', timeout: 10000 });
await expect(COMM.priceStrikethrough).toHaveAttribute('data-display-recurrence', 'true');
await expect(COMM.priceStrikethrough).toHaveAttribute('data-display-per-unit', 'true');
await expect(COMM.priceStrikethrough).toHaveAttribute('data-display-tax', 'true');
expect(await COMM.priceStrikethrough.innerText()).toContain('US$263.88');
expect(await COMM.priceStrikethrough.innerText()).toContain('US$');
expect(await COMM.priceStrikethrough.locator('.price-recurrence').innerText()).not.toBe('');
expect(await COMM.priceStrikethrough.locator('.price-unit-type').innerText()).not.toBe('');
expect(await COMM.priceStrikethrough.locator('.price-tax-inclusivity').innerText()).not.toBe('');
Expand All @@ -168,12 +141,15 @@
});

await test.step('Validate regular price has promo', async () => {
await COMM.price.waitFor({ state: 'visible', timeout: 10000 });

Check failure on line 144 in tests/milo/commerce.feature.test.js

View workflow job for this annotation

GitHub Actions / Running tests

[milo-live-chromium] › commerce.feature.test.js:132:7 › Commerce feature test suite › @Commerce-Promo

4) [milo-live-chromium] › commerce.feature.test.js:132:7 › Commerce feature test suite › @Commerce-Promo,@Commerce @smoke @regression › Validate regular price has promo TimeoutError: locator.waitFor: Timeout 10000ms exceeded. Call log: - waiting for locator('//span[@Data-Template="price"]') to be visible 142 | 143 | await test.step('Validate regular price has promo', async () => { > 144 | await COMM.price.waitFor({ state: 'visible', timeout: 10000 }); | ^ 145 | await expect(COMM.price).toHaveAttribute('data-promotion-code', data.promo); 146 | await expect(COMM.price).toHaveAttribute('data-display-old-price', 'true'); 147 | await COMM.price.locator('.price').first().waitFor({ state: 'visible', timeout: 10000 }); at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:144:24 at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:143:16

Check failure on line 144 in tests/milo/commerce.feature.test.js

View workflow job for this annotation

GitHub Actions / Running tests

[milo-live-chromium] › commerce.feature.test.js:132:7 › Commerce feature test suite › @Commerce-Promo

4) [milo-live-chromium] › commerce.feature.test.js:132:7 › Commerce feature test suite › @Commerce-Promo,@Commerce @smoke @regression › Validate regular price has promo Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── TimeoutError: locator.waitFor: Timeout 10000ms exceeded. Call log: - waiting for locator('//span[@Data-Template="price"]') to be visible 142 | 143 | await test.step('Validate regular price has promo', async () => { > 144 | await COMM.price.waitFor({ state: 'visible', timeout: 10000 }); | ^ 145 | await expect(COMM.price).toHaveAttribute('data-promotion-code', data.promo); 146 | await expect(COMM.price).toHaveAttribute('data-display-old-price', 'true'); 147 | await COMM.price.locator('.price').first().waitFor({ state: 'visible', timeout: 10000 }); at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:144:24 at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:143:16
await expect(COMM.price).toHaveAttribute('data-promotion-code', data.promo);
await expect(COMM.price).toHaveAttribute('data-display-old-price', 'true');
await COMM.price.locator('.price').first().waitFor({ state: 'visible', timeout: 10000 });
await COMM.price.locator('.price-strikethrough').waitFor({ state: 'visible', timeout: 10000 });
});

await test.step('Validate optical price has promo', async () => {
await COMM.priceOptical.waitFor({ state: 'visible', timeout: 10000 });

Check failure on line 152 in tests/milo/commerce.feature.test.js

View workflow job for this annotation

GitHub Actions / Running tests

[milo-live-chromium] › commerce.feature.test.js:140:7 › Commerce feature test suite › @Commerce-Promo

4) [milo-live-chromium] › commerce.feature.test.js:140:7 › Commerce feature test suite › @Commerce-Promo,@Commerce @smoke @regression › Validate regular price has promo TimeoutError: locator.waitFor: Timeout 10000ms exceeded. Call log: - waiting for locator('//span[@Data-Template="price"]') to be visible 150 | 151 | await test.step('Validate regular price has promo', async () => { > 152 | await COMM.price.waitFor({ state: 'visible', timeout: 10000 }); | ^ 153 | await expect(COMM.price).toHaveAttribute('data-promotion-code', data.promo); 154 | await expect(COMM.price).toHaveAttribute('data-display-old-price', 'true'); 155 | await COMM.price.locator('.price').first().waitFor({ state: 'visible', timeout: 10000 }); at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:152:24 at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:151:16

Check failure on line 152 in tests/milo/commerce.feature.test.js

View workflow job for this annotation

GitHub Actions / Running tests

[milo-live-chromium] › commerce.feature.test.js:140:7 › Commerce feature test suite › @Commerce-Promo

4) [milo-live-chromium] › commerce.feature.test.js:140:7 › Commerce feature test suite › @Commerce-Promo,@Commerce @smoke @regression › Validate regular price has promo Retry #1 ─────────────────────────────────────────────────────────────────────────────────────── TimeoutError: locator.waitFor: Timeout 10000ms exceeded. Call log: - waiting for locator('//span[@Data-Template="price"]') to be visible 150 | 151 | await test.step('Validate regular price has promo', async () => { > 152 | await COMM.price.waitFor({ state: 'visible', timeout: 10000 }); | ^ 153 | await expect(COMM.price).toHaveAttribute('data-promotion-code', data.promo); 154 | await expect(COMM.price).toHaveAttribute('data-display-old-price', 'true'); 155 | await COMM.price.locator('.price').first().waitFor({ state: 'visible', timeout: 10000 }); at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:152:24 at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:151:16
await expect(COMM.priceOptical).toHaveAttribute('data-promotion-code', data.promo);
});

Expand All @@ -197,6 +173,8 @@

// @Commerce-Upgrade-Entitlement - Validate Upgrade commerce flow
test(`${features[4].name}, ${features[4].tags}`, async ({ page, baseURL }) => {
test.skip(); // Skipping due to missing login

const testPage = `${baseURL}${features[4].path}${miloLibs}`;
console.info('[Test Page]: ', testPage);

Expand Down Expand Up @@ -236,6 +214,8 @@

// @Commerce-Download-Entitlement - Validate Download commerce flow
test(`${features[5].name}, ${features[5].tags}`, async ({ page, baseURL }) => {
test.skip(); // Skipping due to missing login

const testPage = `${baseURL}${features[5].path}${miloLibs}`;
console.info('[Test Page]: ', testPage);
const { data } = features[5];
Expand Down Expand Up @@ -288,21 +268,23 @@

// Validate there are no unresolved commerce placeholders
await test.step('Validate wcs placeholders', async () => {
await COMM.merchCard.first().waitFor({ state: 'visible', timeout: 30000 });
await COMM.merchCard.first().waitFor({ state: 'visible', timeout: 45000 });

Check failure on line 271 in tests/milo/commerce.feature.test.js

View workflow job for this annotation

GitHub Actions / Running tests

[milo-live-chromium] › commerce.feature.test.js:257:7 › Commerce feature test suite › @Commerce-KitchenSink-Smoke

5) [milo-live-chromium] › commerce.feature.test.js:257:7 › Commerce feature test suite › @Commerce-KitchenSink-Smoke, @Commerce @kitchensink @smoke @regression › Validate wcs placeholders Error: locator.waitFor: Test timeout of 30000ms exceeded. Call log: - waiting for locator('merch-card').first() to be visible 269 | // Validate there are no unresolved commerce placeholders 270 | await test.step('Validate wcs placeholders', async () => { > 271 | await COMM.merchCard.first().waitFor({ state: 'visible', timeout: 45000 }); | ^ 272 | await webUtil.scrollPage('down', 'slow'); 273 | const unresolvedPlaceholders = await page.evaluate( 274 | () => [...document.querySelectorAll('[data-wcs-osi]')].filter( at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:271:36 at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:270:16
await webUtil.scrollPage('down', 'slow');
const unresolvedPlaceholders = await page.evaluate(
() => [...document.querySelectorAll('[data-wcs-osi]')].filter(
(el) => !el.classList.contains('placeholder-resolved')
));
(el) => !el.classList.contains('placeholder-resolved'),
),
);
expect(unresolvedPlaceholders.length).toBe(0);
});

Check failure on line 279 in tests/milo/commerce.feature.test.js

View workflow job for this annotation

GitHub Actions / Running tests

[milo-live-chromium] › commerce.feature.test.js:265:7 › Commerce feature test suite › @Commerce-KitchenSink-Smoke

5) [milo-live-chromium] › commerce.feature.test.js:265:7 › Commerce feature test suite › @Commerce-KitchenSink-Smoke, @Commerce @kitchensink @smoke @regression › Validate wcs placeholders Error: locator.waitFor: Test timeout of 30000ms exceeded. Call log: - waiting for locator('merch-card').first() to be visible 277 | // Validate there are no unresolved commerce placeholders 278 | await test.step('Validate wcs placeholders', async () => { > 279 | await COMM.merchCard.first().waitFor({ state: 'visible', timeout: 45000 }); | ^ 280 | await webUtil.scrollPage('down', 'slow'); 281 | const unresolvedPlaceholders = await page.evaluate( 282 | () => [...document.querySelectorAll('[data-wcs-osi]')].filter( at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:279:36 at /home/runner/work/nala/nala/tests/milo/commerce.feature.test.js:278:16

// Validate commerce checkout links are indeed commerce
await test.step('Validate checkout links', async () => {
const invalidCheckoutLinks = await page.evaluate(
() => [...document.querySelectorAll('[data-wcs-osi][is="checkout-link"]')].filter(
(el) => !el.getAttribute('href').includes('commerce')
));
(el) => !el.getAttribute('href').includes('commerce'),
),
);
expect(invalidCheckoutLinks.length).toBe(0);
});
});
Expand Down Expand Up @@ -337,10 +319,7 @@

await test.step('Validate regular price display', async () => {
await COMM.price.waitFor({ state: 'visible', timeout: 10000 });
await expect(COMM.price).toHaveAttribute('data-display-recurrence', 'true');
await expect(COMM.price).toHaveAttribute('data-display-per-unit', 'false');
await expect(COMM.price).toHaveAttribute('data-display-tax', 'false');
expect(await COMM.price.innerText()).toContain('€/Monat');
expect(await COMM.price.innerText()).toContain('€/Jahr');
expect(await COMM.price.locator('.price-recurrence').innerText()).not.toBe('');
expect(await COMM.price.locator('.price-unit-type').innerText()).toBe('');
expect(await COMM.price.locator('.price-tax-inclusivity').innerText()).toBe('');
Expand All @@ -349,9 +328,6 @@

await test.step('Validate optical price display', async () => {
await COMM.priceOptical.waitFor({ state: 'visible', timeout: 10000 });
await expect(COMM.priceOptical).toHaveAttribute('data-display-recurrence', 'true');
await expect(COMM.priceOptical).toHaveAttribute('data-display-per-unit', 'false');
await expect(COMM.priceOptical).toHaveAttribute('data-display-tax', 'false');
expect(await COMM.priceOptical.innerText()).toContain('€/Monat');
expect(await COMM.priceOptical.locator('.price-recurrence').innerText()).not.toBe('');
expect(await COMM.priceOptical.locator('.price-unit-type').innerText()).toBe('');
Expand All @@ -361,9 +337,6 @@

await test.step('Validate strikethrough price display', async () => {
await COMM.priceStrikethrough.waitFor({ state: 'visible', timeout: 10000 });
await expect(COMM.priceStrikethrough).toHaveAttribute('data-display-recurrence', 'true');
await expect(COMM.priceStrikethrough).toHaveAttribute('data-display-per-unit', 'false');
await expect(COMM.priceStrikethrough).toHaveAttribute('data-display-tax', 'false');
expect(await COMM.priceStrikethrough.innerText()).toContain('€/Jahr');
expect(await COMM.priceStrikethrough.locator('.price-recurrence').innerText()).not.toBe('');
expect(await COMM.priceStrikethrough.locator('.price-unit-type').innerText()).toBe('');
Expand All @@ -375,4 +348,27 @@
await expect(COMM.priceStrikethrough).toHaveAttribute('data-promotion-code', data.promo);
});
});

// @Commerce-Old-Promo - Validate promo price WITHOUT old price
test(`${features[8].name},${features[8].tags}`, async ({ page, baseURL }) => {
const testPage = `${baseURL}${features[8].path}${miloLibs}`;
const { data } = features[8];

console.info('[Test Page]: ', testPage);

await test.step('Go to the test page', async () => {
await page.goto(testPage);
await page.waitForLoadState('domcontentloaded');
});

await test.step('Validate promo price does not show old price', async () => {
await COMM.price.waitFor({ state: 'visible', timeout: 10000 });
await expect(COMM.price).toHaveAttribute('data-promotion-code', data.promo);
await expect(COMM.price).not.toHaveAttribute('data-display-old-price', 'true');
// expect(await COMM.price.innerText()).toContain('US$17.24');
// expect(await COMM.price.innerText()).not.toContain('US$34.49');
await expect(await COMM.price.locator('.price').first()).toBeVisible();
await expect(await COMM.price.locator('.price-strikethrough')).not.toBeVisible();
});
});
});
2 changes: 1 addition & 1 deletion tests/milo/promotions.feature.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ test.describe('Promotions feature test suite', () => {
});
});

// @Promo-insert-fragment - Validate promo insert text after and before fragment
// @Promo-fragment-insert - Validate promo insert text after and before fragment
test(`${features[13].name},${features[13].tags}`, async ({ page, baseURL }) => {
const testPage = `${baseURL}${features[13].path}${miloLibs}`;
const { data } = features[13];
Expand Down
Loading