Skip to content

Commit

Permalink
fix(meta): retours sur les changements apportés par la nouvelle conve…
Browse files Browse the repository at this point in the history
…ntion collective 3248 (#5521)

* fix: retours

* fix: retours

* fix: retours
  • Loading branch information
maxgfr authored Dec 28, 2023
1 parent 6e532c4 commit 04d3fbe
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ describe("Conventions collectives", () => {
"contain",
"Retrouvez les questions/réponses fréquentes organisées par thème"
);
cy.get("#content li").should("have.length", 126);
cy.get("#content li").should("have.length", 49);
cy.get("#content li").first().click();
cy.url().should(
"include",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -327,7 +327,7 @@ describe("Test enterprise endpoint", () => {
{ headers: { referer: "cdtn-api" } }
);

expect(response.body.entreprises).toHaveLength(1);
expect(response.body.entreprises).toHaveLength(2);
response.body.entreprises.forEach((enterprise) => {
expect(enterprise.conventions).toHaveLength(1);
expect(enterprise.conventions[0].num).toEqual(1090);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export const populateAgreements = async (
}
);
const entreprises = entreprisePromises
? await Promise.all(entreprisePromises?.slice(0, 1))
? await Promise.all(entreprisePromises)
: [];
return {
...enterpriseApiResponse,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export const getHomeData = async (): Promise<GetHomePage> => {
const agreements = await getByIdsAgreements([
"39ac98db5d", // 573-commerces-de-gros
"81c96604dc", // 2609-batiment-etam
"be72a669a7", // 650-metallurgie-ingenieurs-et-cadres
"2f57b6af7c", // 3248-metallurgie
"d825ef1df2", // 3239-particuliers-employeurs-et-emploi-a-domicile
]);
const response = {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ const ContributionGeneric = ({ contribution }: Props) => {
const isNoCDT = () => contribution && contribution.type === "generic-no-cdt";
const showButtonToDisplayCDTContent = () =>
!isNoCDT() && (!showAnswer || convention);
const showGeneralInformationButton = () =>
!isNoCDT() && !showAnswer && !convention;

const onSelectAgreement = (
agreement: Agreement | null,
Expand Down Expand Up @@ -309,7 +311,7 @@ const ContributionGeneric = ({ contribution }: Props) => {
</DivCentered>
</Wrapper>

{showButtonToDisplayCDTContent() && (
{showGeneralInformationButton() && (
<Div>
<Button
variant="navLink"
Expand Down

0 comments on commit 04d3fbe

Please sign in to comment.