Last active
January 23, 2024 11:28
-
-
Save JorensM/33cdac4b495d7b5e6b343b7d2cb0dcda to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
fireEvent.changeText(title_comp, TITLE) | |
fireEvent.changeText(description_comp, DESCRIPTION); | |
fireEvent.press(save_button); // This causes the route to change | |
await waitFor(() => expect(screen).toHavePathname('/listings/' + LISTING_ID), {timeout: 10 * 1000, interval: 1000}); | |
const title_comp_2 = await waitFor(() => screen.getByText(TITLE)); // Error here | |
const description_comp_2 = await waitFor(() => screen.getByText(DESCRIPTION)); | |
const author_comp = await waitFor(() => screen.getByText('By ' + AUTHOR_NAME)); | |
expect(title_comp_2).toBeDefined(); | |
expect(description_comp_2).toBeDefined(); | |
expect(author_comp).toBeDefined() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment