Refactor/new menu item (#1448)
* wip * finished * Added disabled * Fixed disabled * Finished cleaning * Minor fixes from merge * Added docs * Added PascalCase * Fix from review * Fixes from merge * Fix lint * Fixed storybook tests
This commit is contained in:
@ -35,11 +35,7 @@ export const Email: Story = {
|
||||
const filterButton = await canvas.findByText('Filter');
|
||||
await userEvent.click(filterButton);
|
||||
|
||||
const emailFilterButton = (
|
||||
await canvas.findAllByTestId('dropdown-menu-item')
|
||||
).find((item) => {
|
||||
return item.textContent?.includes('Email');
|
||||
});
|
||||
const emailFilterButton = await canvas.findByTestId('select-filter-2');
|
||||
|
||||
assert(emailFilterButton);
|
||||
|
||||
@ -70,11 +66,7 @@ export const CompanyName: Story = {
|
||||
const filterButton = await canvas.findByText('Filter');
|
||||
await userEvent.click(filterButton);
|
||||
|
||||
const companyFilterButton = (
|
||||
await canvas.findAllByTestId('dropdown-menu-item')
|
||||
).find((item) => {
|
||||
return item.textContent?.includes('Company');
|
||||
});
|
||||
const companyFilterButton = await canvas.findByTestId('select-filter-3');
|
||||
|
||||
assert(companyFilterButton);
|
||||
|
||||
@ -87,7 +79,7 @@ export const CompanyName: Story = {
|
||||
|
||||
await sleep(500);
|
||||
|
||||
const qontoChip = (await canvas.findAllByTestId('dropdown-menu-item')).find(
|
||||
const qontoChip = (await canvas.findAllByTestId('menu-item')).find(
|
||||
(item) => {
|
||||
return item.textContent?.includes('Qonto');
|
||||
},
|
||||
|
||||
@ -34,9 +34,7 @@ export const Email: Story = {
|
||||
const sortButton = await canvas.findByText('Sort');
|
||||
await userEvent.click(sortButton);
|
||||
|
||||
const emailSortButton = canvas.getByText('Email', {
|
||||
selector: 'li > div > div',
|
||||
});
|
||||
const emailSortButton = await canvas.findByTestId('select-sort-2');
|
||||
await userEvent.click(emailSortButton);
|
||||
|
||||
expect(await canvas.getByTestId('remove-icon-email')).toBeInTheDocument();
|
||||
@ -52,9 +50,7 @@ export const Cancel: Story = {
|
||||
const sortButton = await canvas.findByText('Sort');
|
||||
await userEvent.click(sortButton);
|
||||
|
||||
const emailSortButton = canvas.getByText('Email', {
|
||||
selector: 'li > div > div',
|
||||
});
|
||||
const emailSortButton = await canvas.findByTestId('select-sort-2');
|
||||
await userEvent.click(emailSortButton);
|
||||
|
||||
expect(await canvas.getByTestId('remove-icon-email')).toBeInTheDocument();
|
||||
|
||||
Reference in New Issue
Block a user