-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
(BSR)[PRO] test: be sure to have homepage loaded
- Loading branch information
1 parent
3a72bc4
commit 5fe8f9c
Showing
1 changed file
with
9 additions
and
4 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,13 @@ import { | |
When, | ||
} from '@badeball/cypress-cucumber-preprocessor' | ||
|
||
function homePageLoaded(): void { | ||
cy.findByText('Bienvenue dans l’espace acteurs culturels') | ||
cy.findByText('Vos adresses') | ||
cy.findByText('Ajouter un lieu') | ||
cy.findAllByTestId('spinner').should('not.exist') | ||
} | ||
|
||
Given('I open the {string} page', (page: string) => { | ||
cy.visit('/' + page) | ||
}) | ||
|
@@ -18,23 +25,22 @@ When('I go to the {string} page', (page: string) => { | |
cy.findAllByText(page).first().click() | ||
cy.url().should('not.equal', urlSource) | ||
}) | ||
cy.findAllByTestId('spinner').should('not.exist') | ||
}) | ||
|
||
Given('I am logged in with account 1', () => { | ||
cy.login({ | ||
email: '[email protected]', | ||
password: 'user@AZERTY123', | ||
}) | ||
cy.findAllByTestId('spinner').should('not.exist') | ||
homePageLoaded() | ||
}) | ||
|
||
Given('I am logged in with account 2', () => { | ||
cy.login({ | ||
email: '[email protected]', | ||
password: 'user@AZERTY123', | ||
}) | ||
cy.findAllByTestId('spinner').should('not.exist') | ||
homePageLoaded() | ||
}) | ||
|
||
Given('I am logged in with account 2 and no cookie selection', () => { | ||
|
@@ -43,7 +49,6 @@ Given('I am logged in with account 2 and no cookie selection', () => { | |
password: 'user@AZERTY123', | ||
refusePopupCookies: false, | ||
}) | ||
cy.findAllByTestId('spinner').should('not.exist') | ||
}) | ||
|
||
// créer un seul scénario createOffers avec son step-def | ||
|