Skip to content

Commit

Permalink
Fix e2e tests
Browse files Browse the repository at this point in the history
  • Loading branch information
alizedebray committed Dec 19, 2024
1 parent de40bdf commit b8b6948
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 11 deletions.
8 changes: 4 additions & 4 deletions packages/components/cypress/e2e/language-option.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ 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', () => {
cy.get('@language-option').should('exist');
});

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', () => {
Expand All @@ -35,15 +35,15 @@ 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', () => {
cy.get('@language-option').should('exist');
});

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', () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@ export const LanguageOption: Story = {
_args: HTMLPostLanguageOptionElement,
context: StoryContext<HTMLPostLanguageOptionElement>,
) => {
return schemes(
() => html`
<div class="d-flex flex-column gap-16" role="list">
${meta.render?.({ ...context.args }, context)}
</div>
`,
);
return schemes(() => html` ${meta.render?.({ ...context.args }, context)} `);
},
};

0 comments on commit b8b6948

Please sign in to comment.