Skip to content

Commit 4d65ed9

Browse files
committed
test: ✅ Corrige tests de composants
1 parent d05be88 commit 4d65ed9

File tree

3 files changed

+11
-6
lines changed

3 files changed

+11
-6
lines changed

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,10 @@
2020
"build:css": "node build-css.mjs",
2121
"build:js": "cross-env NODE_ENV=production rollup --config rollup.config.js",
2222
"demo-app": "vite",
23-
"test": "jest",
23+
"test": "run-s test:unit test:ct-ci",
24+
"test:unit": "jest",
2425
"test:ct": "cypress open-ct",
26+
"test:ct-ci": "cypress run-ct",
2527
"format": "npm run lint -- --fix",
2628
"lint": "eslint ./src/**/*.{vue,js,jsx,ts,tsx}",
2729
"storybook": "start-storybook -p 6006 -s public",
@@ -110,7 +112,8 @@
110112
"vue-router": "^4.0.10"
111113
},
112114
"gitHooks": {
113-
"pre-commit": "lint-staged"
115+
"pre-commit": "lint-staged",
116+
"pre-push": "npm test"
114117
},
115118
"lint-staged": {
116119
"*.{vue,js,jsx,ts,tsx}": "npm run lint"

src/components/DsfrAccordion/DsfrAccordion.e2e.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const AccordionWrapper = {
3636
<li>
3737
<DsfrAccordion
3838
id="accordion1"
39-
title="Titre de mon accordéon"
39+
:title="title1"
4040
>
4141
Contenu de l’accordéon
4242
</DsfrAccordion>

src/components/DsfrRadioButton/DsfrRadioButtonSet.e2e.js

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,15 @@ describe('DsfrRadioButtonSet', () => {
3737
],
3838
},
3939
})
40+
.get('.fr-radio-group:first-child input')
41+
.should('not.have.focus')
4042

4143
cy.tab()
42-
.type(' ')
4344
.get('.fr-radio-group:first-child input')
4445
.should('have.focus')
45-
// .click()
46-
.type('{rightArrow}')
46+
.get('.fr-radio-group')
47+
.contains('Valeur 3')
48+
.click({ force: true })
4749
.get('.fr-radio-group:nth-child(3) input')
4850
.should('have.focus')
4951
})

0 commit comments

Comments
 (0)