Skip to content

Commit

Permalink
MWPW-134272: add e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
Sheridan Sunier authored and Sheridan Sunier committed Jul 26, 2023
1 parent f2281cc commit c5c1b4b
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/app.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/main.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Chimera UI Libraries - Build 7/26/2023, 13:28:03
* Chimera UI Libraries - Build 7/26/2023, 14:00:02
*
*/
/******/ (function(modules) { // webpackBootstrap
Expand Down
2 changes: 1 addition & 1 deletion dist/main.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 13 additions & 1 deletion e2e-tests/specs/all.e2e.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,7 +291,19 @@ describe('Hide CTA(s):', async () => {
await browser.setTimeout({ script: 50000 });
for await (const oneCTA of $$('.consonant-Card .consonant-BtnInfobit--cta')) {
expect(await oneCTA.isDisplayed()).toEqual(false);
}
}
});
it('MWPW-134272: Cards with "hide CTA tags" should be hidden while others are still visible', async () => {
const cloneConfig = structuredClone(config);
cloneConfig.hideCtaTags = ['adobe-com-enterprise:topic/digital-foundation'];
const state = btoa(JSON.stringify(cloneConfig));
const url = `${serverPath}/html/e2e/MWPW-126169.html?state=${state}`;
await browser.url(url);
await browser.setTimeout({ script: 50000 });
const taggedCta = await $('#ad83970f-c987-3c86-846f-4edaec827fb1 .consonant-BtnInfobit--cta').isDisplayed();
const untaggedCta = await $('#ac578dee-f01b-3ea0-a282-2116619e4251 .consonant-BtnInfobit--cta').isDisplayed();
expect(taggedCta).toEqual(false);
expect(untaggedCta).toEqual(true);
});
});

Expand Down

0 comments on commit c5c1b4b

Please sign in to comment.