Update tests to close success notifications

This commit is contained in:
Nikolaj Geisle
2022-10-14 09:06:12 +02:00
parent e6b0b65ddd
commit d7ca610f6d
3 changed files with 3 additions and 1 deletions

View File

@@ -21,7 +21,7 @@ const config: PlaywrightTestConfig = {
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 5 : 2,
retries: process.env.CI ? 5 : 0,
// We don't want to run parallel, as tests might differ in state
workers: 1,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */

View File

@@ -290,6 +290,7 @@ test.describe('Content tests', () => {
await umbracoUi.setEditorHeaderName(newNodeName);
await umbracoUi.clickElement(umbracoUi.getButtonByLabelKey(ConstantHelper.buttons.saveAndPublish));
await umbracoUi.isSuccessNotificationVisible();
await page.locator('span:has-text("×")').click();
await umbracoUi.clickElement(umbracoUi.getButtonByLabelKey(ConstantHelper.buttons.rollback));
// Not a very nice selector, but there's sadly no alternative :(

View File

@@ -48,6 +48,7 @@ test.describe('DataTypes', () => {
// Save
await umbracoUi.clickElement(umbracoUi.getButtonByLabelKey(ConstantHelper.buttons.saveAndPublish));
await umbracoUi.isSuccessNotificationVisible();
await page.locator('span:has-text("×")').click();
// Assert
const expected = `<p style="color:000000" > Lorem ipsum dolor sit amet </p>`;