From 6805001ebac352957b89565131cb70fe5364c4ee Mon Sep 17 00:00:00 2001 From: "tom.davies" Date: Mon, 23 Oct 2023 15:54:40 +0100 Subject: [PATCH] test(portrait): remove disabled color contrast rules in fixed tests and remove invalid tooltip tests --- src/components/portrait/portrait.pw.tsx | 40 +++++-------------------- 1 file changed, 8 insertions(+), 32 deletions(-) diff --git a/src/components/portrait/portrait.pw.tsx b/src/components/portrait/portrait.pw.tsx index 1969164038..30eec2ad9e 100644 --- a/src/components/portrait/portrait.pw.tsx +++ b/src/components/portrait/portrait.pw.tsx @@ -384,7 +384,6 @@ test.describe("Event checks for Portrait component", () => { }); }); -// TODO: remove "color-contrast" disabled rules parameter from all relevant accessibility tests upon the completion of FE-6202 test.describe("Accessibility tests for Portrait component", () => { test("should pass accessibility checks when gravatar is passed", async ({ mount, @@ -413,7 +412,7 @@ test.describe("Accessibility tests for Portrait component", () => { }) => { await mount(); - await checkAccessibility(page, "color-contrast"); + await checkAccessibility(page); }); }); @@ -423,7 +422,7 @@ test.describe("Accessibility tests for Portrait component", () => { }) => { await mount(); - await checkAccessibility(page, "color-contrast"); + await checkAccessibility(page); }); ["square", "circle"].forEach((shape) => { @@ -433,7 +432,7 @@ test.describe("Accessibility tests for Portrait component", () => { }) => { await mount(); - await checkAccessibility(page, "color-contrast"); + await checkAccessibility(page); }); }); @@ -444,7 +443,7 @@ test.describe("Accessibility tests for Portrait component", () => { }) => { await mount(); - await checkAccessibility(page, "color-contrast"); + await checkAccessibility(page); }); }); @@ -455,7 +454,7 @@ test.describe("Accessibility tests for Portrait component", () => { }) => { await mount(); - await checkAccessibility(page, "color-contrast"); + await checkAccessibility(page); }); }); @@ -469,7 +468,7 @@ test.describe("Accessibility tests for Portrait component", () => { }) => { await mount(); - await checkAccessibility(page, "color-contrast"); + await checkAccessibility(page); }); }); @@ -481,7 +480,6 @@ test.describe("Accessibility tests for Portrait component", () => { await mount( ); - await checkAccessibility(page, "color-contrast"); }); }); @@ -538,29 +536,7 @@ test.describe("Accessibility tests for Portrait component", () => { mount, page, }) => { - await mount(); - - await checkAccessibility(page, "color-contrast"); - }); - }); - - colors.forEach(([names]) => { - test(`should pass accessibility checks with a tooltip, with a ${names} background color`, async ({ - mount, - page, - }) => { - await mount(); - - await checkAccessibility(page, "color-contrast"); - }); - }); - - colors.forEach(([names]) => { - test(`should pass accessibility checks with a tooltip, with a ${names} font color`, async ({ - mount, - page, - }) => { - await mount(); + await mount(); await checkAccessibility(page, "color-contrast"); }); @@ -573,6 +549,6 @@ test.describe("Accessibility tests for Portrait component", () => { let callbackCount = 0; await mount(); - await checkAccessibility(page, "color-contrast"); + await checkAccessibility(page); }); });