diff --git a/packages/components/src/components/checkbox/checkbox.spec.tsx b/packages/components/src/components/checkbox/checkbox.spec.tsx index c0c1993293c..4ed1db11dc2 100644 --- a/packages/components/src/components/checkbox/checkbox.spec.tsx +++ b/packages/components/src/components/checkbox/checkbox.spec.tsx @@ -23,7 +23,7 @@ const testA11y = () => { const component = await mount(comp); const snapshot = await component.ariaSnapshot(); // Some wired issue with react and playwright ariaSnapshot in this case - const playwrightReactIssueFix = snapshot.replace(': on', ''); + const playwrightReactIssueFix = snapshot.replace(': "on"', ''); expect(playwrightReactIssueFix).toMatchSnapshot( `${testInfo.testId}.yaml` ); diff --git a/packages/components/src/components/radio/radio.spec.tsx b/packages/components/src/components/radio/radio.spec.tsx index 54ad437ec68..073a8e5e6e9 100644 --- a/packages/components/src/components/radio/radio.spec.tsx +++ b/packages/components/src/components/radio/radio.spec.tsx @@ -23,7 +23,7 @@ const testA11y = () => { const component = await mount(comp); const snapshot = await component.ariaSnapshot(); // Some wired issue with react and playwright ariaSnapshot in this case - const playwrightReactIssueFix = snapshot.replace(': on', ''); + const playwrightReactIssueFix = snapshot.replace(': "on"', ''); expect(playwrightReactIssueFix).toMatchSnapshot( `${testInfo.testId}.yaml` );