diff --git a/src/components/dialog/dialog.pw.tsx b/src/components/dialog/dialog.pw.tsx index 7d91d50474..29d7380a2f 100644 --- a/src/components/dialog/dialog.pw.tsx +++ b/src/components/dialog/dialog.pw.tsx @@ -876,7 +876,7 @@ test.describe("Accessibility tests for playwright mock components and storybook }); [true, false].forEach((enableBackgroundUIValue) => { - test(`verify visibility of background overlay when enableBackgroundUI prop is set to ${enableBackgroundUIValue}`, async ({ + test(`verify visibility of backgroundUILocatorElement when enableBackgroundUI prop is set to ${enableBackgroundUIValue}`, async ({ mount, page, }) => { @@ -887,9 +887,9 @@ test.describe("Accessibility tests for playwright mock components and storybook const backgroundUILocatorElement = backgroundUILocator(page); if (enableBackgroundUIValue) { - await expect(backgroundUILocatorElement).toBeVisible(); - } else { await expect(backgroundUILocatorElement).not.toBeVisible(); + } else { + await expect(backgroundUILocatorElement).toBeVisible(); } }); });