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:
Dominik Vagner 2025-05-26 16:47:41 +02:00 committed by Klara Simickova
parent 3d8ccdf23d
commit d0a70dfbbe

View file

@ -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="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
.locator('iframe[name="intercom-modal-frame"]')
.contentFrame()
.getByRole('button', { name: 'Close' }),
];
for (const locator of locatorsToCheck) {