-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(contribution): passage au DSFR #6428
Changes from 250 commits
56bde01
0dcdb11
eb9af7a
f7ccd02
f146a58
1ab139e
b9ae448
e43a732
222395d
e1b2b85
c4033af
9c7536b
75b9216
13ba1aa
aee0955
abecbd2
a5c5bdc
6709c1e
919318a
1f81741
75cddcf
e830c52
1935bcf
b250d45
3d0967c
177b731
f87c8ad
c4c92cb
29ec0d6
70c41a0
16ed3e8
7f329e0
68ea2cf
0ebc402
6cefcfb
36697b3
fb4a99a
0a35960
6eb422c
26bad05
8afa8bc
5839013
1520482
cd15bc7
0748928
fe39518
0731fc3
002ae75
66875a5
282063a
bb5da2f
cab0a48
ef094cf
8809b88
4fcbfb2
6e7f2c0
4965bae
c33bfcd
0352cfc
5c7f10f
dfe2380
5270d52
cd3fa62
c632048
2a79178
f1fc182
24717fa
305466d
110f94b
a5c477d
eec0cc4
522af71
8e2c763
dd33ad6
cc8e30b
d17fac7
6cdf0ee
4141195
32a8755
a2312d1
430dfa9
7a02cf5
cf31b15
e410252
0dac89d
9cc3244
d4c3207
96b7fa7
0385beb
3bb82bc
1a4bc60
473039b
8c5cc64
2a850f8
9782c1f
da49d80
831cc19
a16c584
9c30f65
211d760
6c69a40
1ca5f26
d9cf3ef
a953056
b770a78
e3649d5
a697f00
2b7f0eb
a7a1ccf
0fd1de6
973fd8a
bfb67e2
81f6c29
1ad5cb4
6ae8be0
8f2f068
e9a7b29
82d6931
d30f0d6
fe30b70
aeed234
02ae084
1d2264e
53bed58
d5f1f76
0fabe69
3cc0033
2c91db2
b773b1e
25f856c
fd45a6b
4f0efb6
e41c00a
d67511d
7cea474
e38cd23
ee8b031
923af5e
41f85a7
12dc309
b9b49a4
9f679fa
edab7a6
4844ede
6d141d9
50927c8
61ea30a
4aedbac
5047503
d56f2e8
be89fdc
ff86281
7c4d058
b104d8d
66f54d9
fad136e
f498c5d
485eeec
9bc765d
a11f23d
e3fa9da
c617dcd
b70b9e3
c91d916
0282272
27a4440
0a85f37
6f6159f
8fa8a6c
cbc20ba
3189795
85fb67b
ccc2593
045c8ef
1203afc
7ec59ae
5df6f55
81e7953
5730dc6
026a22a
6794496
f6103a4
16e919c
95529e2
7df7c1d
d488e4a
d6eeeec
1971ea5
6b1716c
9e07f01
e595818
ce8f016
e9cd917
e903723
844dc3d
3175ea5
7ab21d0
cbb025f
441a008
26ca99d
c7b9834
30bf7b5
ac01419
63e6192
070e654
78e92f0
aab5b88
ea6292a
3c72da2
c1b521b
3c1fd5a
1c8345f
eb37ec8
c4c30e7
f4e6645
52e1eed
cf3f530
8499aa0
6350687
0542095
9af3e44
64b18a8
15feb50
cd6dec3
a98a410
633a64b
3fa6cc9
1f7bb80
80750f9
357606e
9ca45bd
30709b8
dae87cb
7afdb91
5831655
58d2616
9a1cc4e
85061c5
367e650
57d34ac
f7bde0a
49bf9d6
e48a9e8
1bf979f
33c4292
bce8664
57a5f77
e3e4345
5a37616
d9ffb61
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
import React from "react"; | ||
import { DsfrLayout } from "../../../src/modules/layout"; | ||
import { notFound } from "next/navigation"; | ||
import { generateDefaultMetadata } from "../../../src/modules/common/metas"; | ||
import { fetchRelatedItems } from "../../../src/modules/documents"; | ||
import { | ||
ContributionLayout, | ||
fetchContributionBySlug, | ||
} from "../../../src/modules/contributions"; | ||
|
||
export async function generateMetadata({ params }) { | ||
const { metas } = await getContribution(params.slug); | ||
|
||
return generateDefaultMetadata({ | ||
title: metas.title, | ||
description: metas.description, | ||
path: `/contribution/${params.slug}`, | ||
}); | ||
} | ||
|
||
async function Contribution({ params }) { | ||
const contribution = await getContribution(params.slug); | ||
return ( | ||
<DsfrLayout> | ||
<ContributionLayout contribution={contribution} /> | ||
</DsfrLayout> | ||
); | ||
} | ||
|
||
const getContribution = async (slug: string) => { | ||
const contribution = await fetchContributionBySlug(slug); | ||
|
||
if (!contribution) { | ||
return notFound(); | ||
} | ||
return contribution; | ||
}; | ||
|
||
export default Contribution; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,6 +16,8 @@ export const localConfig: ConfigData = { | |
"no-dup-id": "off", | ||
"wcag/h63": "off", | ||
"wcag/h32": "off", | ||
"no-redundant-role": "off", | ||
"no-missing-references": "off", | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @m-maillot quand t'aura fixé la RGAA sur la combobox on pourra retirer ces 2 exclusions |
||
}, | ||
}; | ||
|
||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,37 @@ | ||
describe("Conventions collectives", () => { | ||
it("je vois la liste de toutes les cc", () => { | ||
cy.visit("/"); | ||
cy.findByRole("heading", { level: 1 }) | ||
.should("have.text", "Bienvenue sur le Code du travail numérique") | ||
.click(); | ||
cy.get("#fr-header-main-navigation") | ||
cy.findByRole("heading", { level: 1 }).should( | ||
"have.text", | ||
"Bienvenue sur le Code du travail numérique" | ||
); | ||
|
||
cy.get("#fr-header-main-navigation a") | ||
.contains("Votre convention collective") | ||
.click(); | ||
|
||
cy.urlEqual("/convention-collective"); | ||
|
||
cy.findByRole("heading", { level: 1 }) | ||
.should("have.text", "Votre convention collective") | ||
.click(); | ||
cy.findByRole("heading", { level: 1 }).should( | ||
"have.text", | ||
"Votre convention collective" | ||
); | ||
cy.get("body").should( | ||
"contain", | ||
"Les conventions collectives présentées sont les plus représentatives en termes de nombre de salariés" | ||
); | ||
cy.get("#content a").should("have.length", 49); | ||
|
||
cy.get("#content a").first().click(); | ||
|
||
cy.urlEqual( | ||
"/convention-collective/2941-aide-accompagnement-soins-et-services-a-domicile-bad" | ||
); | ||
cy.get('[data-accordion-component="Accordion"]') | ||
.eq(0) | ||
.find('[data-accordion-component="AccordionItemButton"]') | ||
.should("have.length", 6); | ||
|
||
cy.get('[data-accordion-component="Accordion"]') | ||
.eq(0) | ||
.find('[data-accordion-component="AccordionItemButton"]') | ||
|
@@ -71,9 +78,14 @@ describe("Conventions collectives", () => { | |
.find('[data-accordion-component="AccordionItemButton"]') | ||
.first() | ||
.click(); | ||
cy.get('[data-accordion-component="AccordionItem"] a').first().click(); | ||
cy.get('[data-accordion-component="AccordionItem"] a') | ||
.first() | ||
.contains( | ||
"Quelles sont les conditions d’indemnisation pendant le congé de maternité" | ||
) | ||
.click(); | ||
cy.urlEqual( | ||
"/convention-collective/2941-aide-accompagnement-soins-et-services-a-domicile-bad" | ||
"/contribution/2941-quelles-sont-les-conditions-dindemnisation-pendant-le-conge-de-maternite" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. je ne comprends pas comment ça passait avant mais on clique bien sur une contrib donc on doit arriver sur une contrib |
||
); | ||
}); | ||
|
||
|
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
j'ai remis ces règles parcequ'elles sont maintenant valides