fix flake in delete listing test (#13899)
This commit is contained in:
parent
9b8d7cabb3
commit
e04c6152a4
1 changed files with 10 additions and 0 deletions
|
|
@ -19,10 +19,20 @@ describe('Delete listing', () => {
|
|||
|
||||
cy.findByRole('link', { name: 'Delete' }).click();
|
||||
|
||||
// Wait until the confirmation page loads
|
||||
cy.findByRole('heading', {
|
||||
name: 'Are you sure you want to delete this listing?',
|
||||
});
|
||||
|
||||
cy.findByRole('main')
|
||||
.findByRole('button', { name: /^Delete$/i })
|
||||
.click();
|
||||
|
||||
// Wait for the form to submit and the user to be returned to the dashboard
|
||||
cy.findByRole('heading', {
|
||||
name: 'Are you sure you want to delete this listing?',
|
||||
}).should('not.exist');
|
||||
|
||||
cy.findByRole('main')
|
||||
.findByRole('heading', { name: 'Listing title' })
|
||||
.should('not.exist');
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue