From b8b6948396966879a0ce97af6f5ac7e730def871 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aliz=C3=A9=20Debray?= Date: Thu, 19 Dec 2024 18:20:33 +0100 Subject: [PATCH] Fix e2e tests --- packages/components/cypress/e2e/language-option.cy.ts | 8 ++++---- .../language-option/language-option.snapshot.stories.ts | 8 +------- 2 files changed, 5 insertions(+), 11 deletions(-) diff --git a/packages/components/cypress/e2e/language-option.cy.ts b/packages/components/cypress/e2e/language-option.cy.ts index a3ad3c5b74..72ce65db0b 100644 --- a/packages/components/cypress/e2e/language-option.cy.ts +++ b/packages/components/cypress/e2e/language-option.cy.ts @@ -4,7 +4,7 @@ describe('language-option', () => { describe('button', () => { beforeEach(() => { cy.getComponent('language-option', LANGUAGE_OPTION_ID); - cy.get('@language-option').shadow().find('button').as('button'); + cy.get('@language-option').find('button').as('button'); }); it('should render', () => { @@ -12,7 +12,7 @@ describe('language-option', () => { }); it('should not render an anchor', () => { - cy.get('@language-option').shadow().find('a').should('not.exist'); + cy.get('@language-option').find('a').should('not.exist'); }); it('should render a button with correct properties', () => { @@ -35,7 +35,7 @@ describe('language-option', () => { describe('anchor', () => { beforeEach(() => { cy.getComponent('language-option', LANGUAGE_OPTION_ID, 'anchor'); - cy.get('@language-option').shadow().find('a').as('anchor'); + cy.get('@language-option').find('a').as('anchor'); }); it('should render', () => { @@ -43,7 +43,7 @@ describe('language-option', () => { }); it('should not render a button', () => { - cy.get('@language-option').shadow().find('button').should('not.exist'); + cy.get('@language-option').find('button').should('not.exist'); }); it('should render an anchor', () => { diff --git a/packages/documentation/src/stories/raw-components/language-option/language-option.snapshot.stories.ts b/packages/documentation/src/stories/raw-components/language-option/language-option.snapshot.stories.ts index 451971eb42..eb1e9dcf97 100644 --- a/packages/documentation/src/stories/raw-components/language-option/language-option.snapshot.stories.ts +++ b/packages/documentation/src/stories/raw-components/language-option/language-option.snapshot.stories.ts @@ -18,12 +18,6 @@ export const LanguageOption: Story = { _args: HTMLPostLanguageOptionElement, context: StoryContext, ) => { - return schemes( - () => html` -
- ${meta.render?.({ ...context.args }, context)} -
- `, - ); + return schemes(() => html` ${meta.render?.({ ...context.args }, context)} `); }, };