-
Notifications
You must be signed in to change notification settings - Fork 21
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
Conversation
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. |
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"); | ||
}); |
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.
Nice, propre le test e2e !!
it("should display iframe préavis de retraite", () => { | ||
cy.visit("/integration/preavis-retraite"); | ||
|
||
// @ts-ignore |
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.
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"); |
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.
ça va pas être simple à mocker ce test avec l'approche qu'on avait fait, à voir si ça serait fonctionnel
49a43e5
to
ca19be6
Compare
🎉 Deployment for commit ca19be6 : IngressesDocker images
|
#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