test: Add Review and finish button tests
This add tests to check whether the Review and finish button works properly, sending user to the Details step. And whether it's disabled when the state is invalid.
This commit is contained in:
parent
558bb50c34
commit
3ae642b848
8 changed files with 137 additions and 5 deletions
|
|
@ -185,6 +185,14 @@ export const clickCancel = async () => {
|
|||
await waitFor(() => user.click(cancelBtn));
|
||||
};
|
||||
|
||||
export const clickReviewAndFinish = async () => {
|
||||
const user = userEvent.setup();
|
||||
const reviewAndFinishBtn = await screen.findByRole('button', {
|
||||
name: /Review and finish/,
|
||||
});
|
||||
await waitFor(() => user.click(reviewAndFinishBtn));
|
||||
};
|
||||
|
||||
export const getNextButton = async () => {
|
||||
const next = await screen.findByRole('button', { name: /Next/ });
|
||||
return next;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue