✅ Ajoute un test end to end pour la saisie du salaire net
parent
6cd4d69236
commit
a0d9d63c13
|
@ -1,9 +1,22 @@
|
|||
const salaryInput = inputTitle => {
|
||||
const inputContainer = cy
|
||||
.contains(inputTitle)
|
||||
.closest('.main')
|
||||
.find('.targetInputOrValue')
|
||||
inputContainer.click()
|
||||
return inputContainer.find('input')
|
||||
}
|
||||
describe('Landing basic test', function() {
|
||||
it('should not crash when requesting the page', function() {
|
||||
it('should not crash when entering salary', function() {
|
||||
cy.visit('/')
|
||||
})
|
||||
it('should display the simulateur after loading', function() {
|
||||
cy.visit('/')
|
||||
cy.contains('Entrez un salaire mensuel')
|
||||
})
|
||||
it('should display cotisation repartition when entering net salary', function() {
|
||||
cy.visit('/')
|
||||
salaryInput('Salaire net').type('2000')
|
||||
cy.get('.distribution-chart__container')
|
||||
})
|
||||
})
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
},
|
||||
"scripts": {
|
||||
"compile": "webpack --config source/webpack.prod.js",
|
||||
"serve:embauche": "webpack --config source/webpack.prod.js; cp dist/embauche.html dist/404.html; http-server dist &",
|
||||
"eslint-check": "eslint --print-config .eslintrc | eslint-config-prettier-check",
|
||||
"eslint": "LIST=`git diff --cached --name-only --diff-filter=AMR HEAD | grep .*\\.js | grep -v json`; if [ \"$LIST\" ]; then eslint $LIST; fi",
|
||||
"externalize": "node source/externalize.js",
|
||||
|
@ -109,13 +110,13 @@
|
|||
"google-translate-api": "^2.3.0",
|
||||
"html-loader": "^0.5.5",
|
||||
"html-webpack-plugin": "^3.2.0",
|
||||
"http-server": "^0.11.1",
|
||||
"intl": "^1.2.5",
|
||||
"intl-locales-supported": "^1.0.0",
|
||||
"js-yaml": "^3.12.0",
|
||||
"jsdom": "^12.0.0",
|
||||
"json-loader": "^0.5.7",
|
||||
"koa-connect": "^2.0.1",
|
||||
"live-server": "^1.2.0",
|
||||
"mocha": "^5.0.4",
|
||||
"mocha-webpack": "^2.0.0-beta.0",
|
||||
"mock-local-storage": "^1.0.5",
|
||||
|
|
Loading…
Reference in New Issue