fix(test): add close pop-ups locator for intercom modal
This locator should automatically close all "openscap faster trigger" pop-ups in playwright tests.
This commit is contained in:
parent
3d8ccdf23d
commit
d0a70dfbbe
1 changed files with 4 additions and 0 deletions
|
|
@ -25,6 +25,10 @@ export const closePopupsIfExist = async (page: Page) => {
|
||||||
page.locator(`button[id^="pendo-close-guide-"]`), // This closes the pendo guide pop-up
|
page.locator(`button[id^="pendo-close-guide-"]`), // This closes the pendo guide pop-up
|
||||||
page.locator(`button[id="truste-consent-button"]`), // This closes the trusted consent pop-up
|
page.locator(`button[id="truste-consent-button"]`), // This closes the trusted consent pop-up
|
||||||
page.getByLabel('close-notification'), // This closes a one off info notification (May be covered by the toast above, needs recheck.)
|
page.getByLabel('close-notification'), // This closes a one off info notification (May be covered by the toast above, needs recheck.)
|
||||||
|
page
|
||||||
|
.locator('iframe[name="intercom-modal-frame"]')
|
||||||
|
.contentFrame()
|
||||||
|
.getByRole('button', { name: 'Close' }),
|
||||||
];
|
];
|
||||||
|
|
||||||
for (const locator of locatorsToCheck) {
|
for (const locator of locatorsToCheck) {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue