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