diff --git a/e2e/documentation.e2e-spec.ts b/e2e/documentation.e2e-spec.ts
index ea30f5ab58e3984971ee3828d59d9875bd6d37b3..e3a142432e2468131827ff80666eb351322b0a48 100644
--- a/e2e/documentation.e2e-spec.ts
+++ b/e2e/documentation.e2e-spec.ts
@@ -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;
         });
     }