-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'development' into question-page
- Loading branch information
Showing
40 changed files
with
1,860 additions
and
321 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,36 +1,29 @@ | ||
describe('First time user tests', () => { | ||
beforeEach(() => { | ||
it('can skip the background collect form', () => { | ||
cy.visit('/'); | ||
}); | ||
|
||
it('can display the welcome message and background input buttons', () => { | ||
cy.contains('Welkom bij Windesheim.AI!'); | ||
cy.get('[data-testid="userLogo"]').should('exist'); | ||
cy.contains('Vertel me uw achtergrond!'); | ||
cy.contains('We bieden u op maat gemaakte training.'); | ||
cy.contains('Oke').click(); | ||
}); | ||
// Check if the disclaimer pop-up is displayed and close it if it is | ||
cy.get('body').then(($body) => { | ||
if ($body.find('.disclaimer-popup').length > 0) { | ||
cy.contains('Disclaimer').should('be.visible'); | ||
cy.get('.disclaimer-popup .close-button').click(); | ||
} | ||
}); | ||
|
||
it('can skip the background collect form', () => { | ||
cy.contains('Welkom bij Windesheim.AI!'); | ||
// After the disclaimer (if present) is closed, | ||
// check if the homepage is displayed correctly | ||
cy.contains('Welkom bij Windesheim.AI!').should('be.visible'); | ||
cy.contains('We bieden u op maat gemaakte training.').should( | ||
'be.visible', | ||
); | ||
|
||
// Now skip the background form process | ||
cy.contains('Overslaan').click(); | ||
cy.contains('Overslaan').click(); | ||
|
||
cy.contains('Windesheim AI'); | ||
cy.contains('Disclaimer'); | ||
}); | ||
|
||
it('can answer the background questions and progresses through it', () => { | ||
cy.contains('Oke').click(); | ||
cy.contains('Achtergrondinformatie verzamelen'); | ||
cy.contains('Wat is uw positie?'); | ||
cy.get('[data-testid="listButton"]').first().click(); | ||
cy.contains('In welk gebied van AI bent u geïnteresseerd?'); | ||
cy.get('[data-testid="listButton"]').first().click(); | ||
cy.contains('Hoe bekend bent u met AI?'); | ||
cy.get('[data-testid="listButton"]').first().click(); | ||
cy.contains('Overslaan').click(); | ||
cy.contains('Windesheim AI'); | ||
cy.contains('Disclaimer'); | ||
// Check if you land at the expected place after skipping | ||
cy.contains('Windesheim AI').should('be.visible'); | ||
// Since the disclaimer only appears at the beginning and does not appear again afterwards, | ||
// no further check for "Disclaimer" at the end is necessary. | ||
}); | ||
}); |
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
Oops, something went wrong.