Skip to content
Snippets Groups Projects
Commit 8284a1a0 authored by François Grand's avatar François Grand
Browse files

fix(e2e): Mathjax formula in help tests fail after first language

refs #608
parent e114b190
No related branches found
No related tags found
2 merge requests!225Release v4.17.0,!209Resolve "Documentation: Les formules de math ne s'affichent pas dans la version anglaise"
Pipeline #140241 passed
......@@ -20,7 +20,7 @@ describe("documentation − ", () => {
});
async function checkMathjaxInHelp(lang: number) {
// change setup to French
// change language setup
await prefPage.navigateTo();
await prefPage.changeLanguage(lang);
await browser.sleep(200);
......@@ -38,10 +38,23 @@ describe("documentation − ", () => {
browser.getAllWindowHandles().then(async (handles) => {
browser.ignoreSynchronization = true; // deprecated but the only solution to work in the newly opened tab
// switch to help tab
browser.switchTo().window(handles[1]).then(async () => {
// check Mathjax element is present
expect(element.all(by.css("mjx-container")).isPresent()).toBe(true);
expect(element(by.css("mjx-container")).isPresent()).toBe(true);
}).then(async () => {
// close help tab
await browser.close();
// switch back to calculator (required to avoid failure of next language test)
await browser.switchTo().window(handles[0]);
browser.ignoreSynchronization = false;
});
// switch back to calculator (required to avoid failure of next language test)
await browser.switchTo().window(handles[0]);
browser.ignoreSynchronization = false;
});
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment