Skip to content

Commit

Permalink
Merge pull request #415 from Infineon/386-code-quality-chips-missing-…
Browse files Browse the repository at this point in the history
…e2e-tests

e2e tests added for chip component
  • Loading branch information
verena-ifx authored Aug 28, 2023
2 parents b840ef2 + 511de0b commit f5f41c9
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions packages/components/src/components/chips/chip.e2e.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
import { newE2EPage } from '@stencil/core/testing';

describe('ifx-chip', () => {
it('renders correctly with default props', async () => {
const page = await newE2EPage();
await page.setContent('<ifx-chip placeholder="Select an option"><ifx-dropdown-menu></ifx-dropdown-menu></ifx-chip>');

const chip = await page.find('ifx-chip');
const chipContainer = await chip.find('.dropdown.container');
const wrapperLabel = await chip.find('.wrapper-label');
const wrapperCloseButton = await chip.find('.wrapper-close-button');

expect(chip).toHaveClass('hydrated');
expect(chipContainer).toBeDefined();
expect(wrapperLabel).toBeDefined();
expect(wrapperCloseButton).toBeDefined();
});


});

0 comments on commit f5f41c9

Please sign in to comment.