-
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.
Revert "feat: ❇️ add tutorial to secure a firearm (#159)"
This reverts commit e1edd0a.
- Loading branch information
Showing
208 changed files
with
3,849 additions
and
6,018 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
This file was deleted.
Oops, something went wrong.
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
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
describe('Get Basegun result', () => { | ||
it('should have dummy button enabled', () => { | ||
cy.visit('/') | ||
cy.get('.swiper-button-next').click() | ||
cy.get('#position-button') | ||
.contains('J\'ai compris') | ||
.click() | ||
cy.url() | ||
.should('contain', '/accueil') | ||
cy.getByDataTestid('start') | ||
.contains('Démarrer') | ||
.click() | ||
cy.url() | ||
.should('contain', '/instructions') | ||
cy.contains('h3', 'Pour un résultat optimal') | ||
cy.contains('span', 'canon vers la droite') | ||
|
||
cy.getByDataTestid('select-file').as('fileInput') | ||
cy.intercept('POST','/api/upload').as('upload') | ||
cy.get('@fileInput').selectFile('./cypress/images/pistolet-semi-auto.jpg', { force: true }) | ||
cy.wait('@upload').then(({ response }) => { | ||
expect(response.statusCode).to.eq(200) | ||
}) | ||
cy.url().should('contain','/resultat') | ||
cy.getByDataTestid('legal-category').contains('Catégorie B') | ||
cy.getByDataTestid('dummy-button') | ||
.should('be.enabled') | ||
.contains('Vérifier si l\'arme est factice') | ||
}) | ||
|
||
it('should have dummy button disabled', () => { | ||
cy.visit('/instructions') | ||
cy.getByDataTestid('select-file').as('fileInput') | ||
cy.intercept('POST','/api/upload').as('upload') | ||
cy.get('@fileInput').selectFile('./cypress/images/pistolet-ancien-a-percussion-monocoup.jpg', { force: true }) | ||
cy.wait('@upload').then(({ response }) => { | ||
expect(response.statusCode).to.eq(200) | ||
}) | ||
cy.url().should('contain','/resultat') | ||
cy.getByDataTestid('legal-category').contains('D') | ||
cy.getByDataTestid('dummy-button') | ||
.should('be.disabled') | ||
.contains('Pas de guide de vérification') | ||
}) | ||
}) |
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,14 +1,14 @@ | ||
describe('HomePage', () => { | ||
it('shoud visit HomePage', () => { | ||
cy.visit('/') | ||
cy.getByDataTestid('basegun-logo').should('exist') | ||
cy.contains('li', 'Basegun est une application') | ||
cy.get('swiper-container').shadow().find('.swiper-button-next').click() | ||
cy.contains('li', 'ne remplace en aucun cas l\'avis d\'un expert') | ||
cy.get('#agree-button').contains('J\'ai compris').click() | ||
cy.url().should('contain', '/accueil') | ||
}) | ||
|
||
it('shoud visit HomePage', () => { | ||
cy.visit('/') | ||
cy.getByDataTestid('basegun-logo').should('exist') | ||
cy.contains('li', 'Basegun est une application') | ||
cy.get('.swiper-button-next').click() | ||
cy.contains('li', 'Une arme doit toujours être') | ||
cy.get('#position-button').contains('J\'ai compris').click() | ||
cy.url().should('contain', '/accueil') | ||
}) | ||
it('should open Menu informations', () => { | ||
cy.visit('/') | ||
cy.getByDataTestid('header-logo').contains('Ministère') | ||
|
@@ -20,28 +20,24 @@ describe('HomePage', () => { | |
.click() | ||
cy.url() | ||
.should('contain', '/a-propos') | ||
cy.contains('p', 'Basegun est un projet') | ||
|
||
cy.get('#button-menu') | ||
.click() | ||
cy.getByRole('navigation') | ||
.contains('a', 'Mentions légales') | ||
.click() | ||
cy.url() | ||
.should('contain', '/mentions-legales') | ||
cy.contains('p', 'basegun.fr') | ||
|
||
cy.get('#button-menu') | ||
.click() | ||
cy.getByRole('navigation') | ||
.contains('a', 'Contact') | ||
.click() | ||
cy.url() | ||
.should('contain', '/contact') | ||
cy.contains('a', '[email protected]') | ||
cy.getByRole('navigation') | ||
.contains('a', 'Important') | ||
.click({ force: true }) | ||
}) | ||
}, | ||
) | ||
cy.get('.information') | ||
.should('exist') | ||
.click() | ||
cy.url().should('contain','/') | ||
}) | ||
} | ||
) |
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.