Use getByTestId() instead of getByText
for asserting if user is on landing page b/c the text "Create a new image" is present on both the landing page and the wizard.
This commit is contained in:
parent
0895a122f5
commit
e106a32431
1 changed files with 4 additions and 4 deletions
|
|
@ -22,8 +22,8 @@ async function verifyCancelButton(cancel) {
|
|||
// this goes back to the landing page
|
||||
await waitFor(
|
||||
() => [
|
||||
screen.getByText('Create a new image'),
|
||||
screen.getByRole('button', { name: /Create image/ }),
|
||||
screen.getByTestId('create-image-action'),
|
||||
screen.getByTestId('images-table'),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
|
@ -352,8 +352,8 @@ describe('Click through all steps', () => {
|
|||
// returns back to the landing page
|
||||
// await waitFor(
|
||||
// () => [
|
||||
// screen.getByText('Create a new image'),
|
||||
// screen.getByRole('button', { name: /Create image/ }),
|
||||
// screen.getByTestId('create-image-action'),
|
||||
// screen.getByTestId('images-table'),
|
||||
// ]
|
||||
// );
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue