Skip to content
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: implementation widget CC pour telerc #5817

Merged
merged 8 commits into from
May 3, 2024

Conversation

Viczei
Copy link
Contributor

@Viczei Viczei commented Apr 23, 2024

#5767
#5185
#4367

Pour faire fonctionner le widget sans les redirections, il faut préciser à l'utilisateur que l'url à utiliser dans l'iframe est la suivante: /widgets/convention-collective?noRedirect=true
Pour catcher l'événement de sélection du message, il faut suivre les indications de la page intégration

@Viczei Viczei requested review from m-maillot and maxgfr April 23, 2024 12:38
@Viczei Viczei self-assigned this Apr 23, 2024
@Viczei Viczei linked an issue Apr 23, 2024 that may be closed by this pull request
3 tasks
@github-advanced-security
Copy link

This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation.

Comment on lines +10 to +29
it("should display iframe moteur de recherche", () => {
cy.visit("/integration/moteur-recherche", {
onBeforeLoad(win) {
// start spying
cy.spy(win, "postMessage").as("postMessage");
},
});

// @ts-ignore
cy.getIframe().as("iframe");

cy.get("@iframe")
.find("label", { timeout: 10000 })
.should(
"have.text",
"Trouvez les réponses à vos questions en droit du travail"
);
cy.get("@iframe").find("#button-search").click();
cy.get("@postMessage").should("be.calledOnce");
});
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, propre le test e2e !!

it("should display iframe préavis de retraite", () => {
cy.visit("/integration/preavis-retraite");

// @ts-ignore
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pourquoi on fait des ts-ignore, y'a surement un moyen avec un .d.ts d'éviter cela

cy.get("@entreprise-search").type("carrefour");
cy.get("@iframe").find("button[type=submit]").as("button-submit");
cy.get("@button-submit").click();
cy.get("@iframe").contains("CARREFOUR HYPERMARCHES").as("entreprise");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ça va pas être simple à mocker ce test avec l'approche qu'on avait fait, à voir si ça serait fonctionnel

@m-maillot m-maillot force-pushed the 5767-widget-rcuprer-lidcc-slectionn branch from 49a43e5 to ca19be6 Compare May 3, 2024 14:20
@m-maillot m-maillot merged commit b389361 into dev May 3, 2024
23 checks passed
@m-maillot m-maillot deleted the 5767-widget-rcuprer-lidcc-slectionn branch May 3, 2024 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Widget] Récupérer l'IDCC sélectionné
4 participants