diff --git a/packages/compat/src/components/Loader/Loader.cy.tsx b/packages/compat/src/components/Loader/Loader.cy.tsx index 8136b372d14..83486764036 100644 --- a/packages/compat/src/components/Loader/Loader.cy.tsx +++ b/packages/compat/src/components/Loader/Loader.cy.tsx @@ -14,13 +14,18 @@ describe('Loader', () => { cy.mount(); cy.findByTestId('loader') .should('have.css', 'animation-duration', '0s') - .should('have.css', 'background-size', '0px'); + // Chrome may serialize the computed value with an explicit `auto` height (e.g. `0px auto`) + .should(($el) => { + expect($el.css('background-size')).to.match(/^0px( auto)?$/); + }); cy.mount(); cy.findByTestId('loader') .should('have.css', 'animation-duration', '0s') - .should('have.css', 'background-size', '50%'); + .should(($el) => { + expect($el.css('background-size')).to.match(/^50%( auto)?$/); + }); }); it('with delay', () => { cy.mount();