Fix tests
This commit is contained in:
@ -41,8 +41,8 @@ export const SortByName: Story = {
|
|||||||
|
|
||||||
expect(await canvas.findByText('Airbnb')).toBeInTheDocument();
|
expect(await canvas.findByText('Airbnb')).toBeInTheDocument();
|
||||||
|
|
||||||
const cancelButton = canvas.getByText('Cancel');
|
const resetButton = canvas.getByText('Reset');
|
||||||
await userEvent.click(cancelButton);
|
await userEvent.click(resetButton);
|
||||||
|
|
||||||
await expect(canvas.queryAllByTestId('remove-icon-name')).toStrictEqual([]);
|
await expect(canvas.queryAllByTestId('remove-icon-name')).toStrictEqual([]);
|
||||||
},
|
},
|
||||||
|
|||||||
@ -43,7 +43,7 @@ export const Email: Story = {
|
|||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|
||||||
export const Cancel: Story = {
|
export const Reset: Story = {
|
||||||
play: async ({ canvasElement }) => {
|
play: async ({ canvasElement }) => {
|
||||||
const canvas = within(canvasElement);
|
const canvas = within(canvasElement);
|
||||||
|
|
||||||
@ -55,8 +55,8 @@ export const Cancel: Story = {
|
|||||||
|
|
||||||
expect(await canvas.getByTestId('remove-icon-email')).toBeInTheDocument();
|
expect(await canvas.getByTestId('remove-icon-email')).toBeInTheDocument();
|
||||||
|
|
||||||
const cancelButton = canvas.getByText('Cancel');
|
const resetButton = canvas.getByText('Reset');
|
||||||
await userEvent.click(cancelButton);
|
await userEvent.click(resetButton);
|
||||||
|
|
||||||
await sleep(1000);
|
await sleep(1000);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user