-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1134 from betagouv/quickfix-johan
✅ Ajoute un test e2e pour la génération de PDF demande mobilité
- Loading branch information
Showing
16 changed files
with
156 additions
and
11 deletions.
There are no files selected for viewing
99 changes: 99 additions & 0 deletions
99
mon-entreprise/cypress/integration/mon-entreprise/demande-mobilité.js
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,99 @@ | ||
const fr = Cypress.env('language') === 'fr' | ||
|
||
describe('Formulaire demande mobilité', function() { | ||
if (!fr) { | ||
return | ||
} | ||
before(() => cy.visit('/gérer/demande-mobilité')) | ||
it('should not crash', () => { | ||
cy.contains('Demande de mobilité en Europe') | ||
}) | ||
it('should allow to complete "coordonnées" section', () => { | ||
cy.contains('SIRET').click() | ||
cy.focused() | ||
.type('684 064 0011') | ||
.tab() | ||
.type('Deaux') | ||
.tab() | ||
.type('Jean') | ||
.tab() | ||
.type('Française') | ||
cy.contains('sécurité sociale').click() | ||
cy.focused() | ||
.type('1 91 07 468 054 75') | ||
.tab() | ||
.type('1991-07-25') | ||
.tab() | ||
.type('Pouts') | ||
.wait(1000) | ||
.type('{enter}') | ||
.tab() | ||
.type('3 rue de la Rhumerie') | ||
.tab() | ||
.type('Brest') | ||
.wait(1000) | ||
.type('{enter}') | ||
.tab() | ||
.type('[email protected]') | ||
.tab() | ||
.type('06 85 69 78 54') | ||
.tab() | ||
}) | ||
it('should allow to complete "activité en France" section', () => { | ||
cy.focused() | ||
.type('Deaux & Fils') | ||
.tab() | ||
.type('14 chemin des Docks') | ||
.tab() | ||
.type('Bre') | ||
.wait(1000) | ||
cy.contains('29240').click() | ||
cy.contains('Organisme Urssaf').click() | ||
cy.focused() | ||
.type('Bretagne') | ||
.tab() | ||
.tab() | ||
.type('Boulangerie') | ||
}) | ||
it('should allow to complete "votre demande" section', () => { | ||
cy.contains('Oui').click() | ||
cy.get("input[name='demande . infrastructure sauvegardée'][value='oui']") | ||
.next() | ||
.click() | ||
cy.get("input[name='demande . activité semblable'][value='oui']") | ||
.next() | ||
.click() | ||
cy.get("input[name='demande . date de fin connue'][value='oui']") | ||
.next() | ||
.click() | ||
cy.get('label[for="détachement . pays"]') | ||
.wait(1000) | ||
.click() | ||
cy.focused() | ||
.select('Irlande') | ||
.tab() | ||
.type('2020-11-06') | ||
.tab() | ||
.type('2021-04-09') | ||
.tab() | ||
.tab() | ||
.type('Fabrications de gateaux bretons') | ||
cy.get("input[name='détachement . base fixe'][value='non']") | ||
.next() | ||
.click() | ||
cy.get( | ||
"input[name='commentaires additionnels . commentaires'][value='non']" | ||
) | ||
.next() | ||
.click() | ||
}) | ||
it('should allow to download PDF', () => { | ||
cy.contains( | ||
'Je certifie l’exactitude des informations communiquées ci-dessus' | ||
).click() | ||
cy.contains('Fait à').click() | ||
cy.focused().type('Plougastel') | ||
cy.contains('Générer la demande').click() | ||
cy.contains('Télécharger le fichier').click() | ||
}) | ||
}) |
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 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 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 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 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 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 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 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 |
---|---|---|
|
@@ -2026,6 +2026,14 @@ ajv@^6.1.0, ajv@^6.10.0, ajv@^6.10.2, ajv@^6.12.2, ajv@^6.12.3: | |
json-schema-traverse "^0.4.1" | ||
uri-js "^4.2.2" | ||
|
||
ally.js@^1.4.1: | ||
version "1.4.1" | ||
resolved "https://registry.yarnpkg.com/ally.js/-/ally.js-1.4.1.tgz#9fb7e6ba58efac4ee9131cb29aa9ee3b540bcf1e" | ||
integrity sha1-n7fmuljvrE7pExyymqnuO1QLzx4= | ||
dependencies: | ||
css.escape "^1.5.0" | ||
platform "1.3.3" | ||
|
||
alphanum-sort@^1.0.1, alphanum-sort@^1.0.2: | ||
version "1.0.2" | ||
resolved "https://registry.yarnpkg.com/alphanum-sort/-/alphanum-sort-1.0.2.tgz#97a1119649b211ad33691d9f9f486a8ec9fbe0a3" | ||
|
@@ -3881,6 +3889,11 @@ [email protected]: | |
resolved "https://registry.yarnpkg.com/css-what/-/css-what-2.1.3.tgz#a6d7604573365fe74686c3f311c56513d88285f2" | ||
integrity sha512-a+EPoD+uZiNfh+5fxw2nO9QwFa6nJe2Or35fGY6Ipw1R3R4AGz1d1TEZrCegvw2YTmZ0jXirGYlzxxpYSHwpEg== | ||
|
||
css.escape@^1.5.0: | ||
version "1.5.1" | ||
resolved "https://registry.yarnpkg.com/css.escape/-/css.escape-1.5.1.tgz#42e27d4fa04ae32f931a4b4d4191fa9cddee97cb" | ||
integrity sha1-QuJ9T6BK4y+TGktNQZH6nN3ul8s= | ||
|
||
cssesc@^3.0.0: | ||
version "3.0.0" | ||
resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" | ||
|
@@ -3962,6 +3975,13 @@ cyclist@^1.0.1: | |
resolved "https://registry.yarnpkg.com/cyclist/-/cyclist-1.0.1.tgz#596e9698fd0c80e12038c2b82d6eb1b35b6224d9" | ||
integrity sha1-WW6WmP0MgOEgOMK4LW6xs1tiJNk= | ||
|
||
cypress-plugin-tab@^1.0.5: | ||
version "1.0.5" | ||
resolved "https://registry.yarnpkg.com/cypress-plugin-tab/-/cypress-plugin-tab-1.0.5.tgz#a40714148104004bb05ed62b1bf46bb544f8eb4a" | ||
integrity sha512-QtTJcifOVwwbeMP3hsOzQOKf3EqKsLyjtg9ZAGlYDntrCRXrsQhe4ZQGIthRMRLKpnP6/tTk6G0gJ2sZUfRliQ== | ||
dependencies: | ||
ally.js "^1.4.1" | ||
|
||
cypress@^3.6.1: | ||
version "3.8.3" | ||
resolved "https://registry.yarnpkg.com/cypress/-/cypress-3.8.3.tgz#e921f5482f1cbe5814891c878f26e704bbffd8f4" | ||
|
@@ -9189,6 +9209,11 @@ pkg-dir@^4.1.0: | |
dependencies: | ||
find-up "^4.0.0" | ||
|
||
[email protected]: | ||
version "1.3.3" | ||
resolved "https://registry.yarnpkg.com/platform/-/platform-1.3.3.tgz#646c77011899870b6a0903e75e997e8e51da7461" | ||
integrity sha1-ZGx3ARiZhwtqCQPnXpl+jlHadGE= | ||
|
||
pn@^1.1.0: | ||
version "1.1.0" | ||
resolved "https://registry.yarnpkg.com/pn/-/pn-1.1.0.tgz#e2f4cef0e219f463c179ab37463e4e1ecdccbafb" | ||
|