From 1059b0e90d12ef1d417b1f57dfd6981d90493d3b Mon Sep 17 00:00:00 2001 From: Bobbykumar706584 Date: Thu, 12 Oct 2023 11:39:17 +0530 Subject: [PATCH] comment line added --- e2e-tests/base.test.ts | 5 ++++- e2e-tests/common.js | 4 +++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/e2e-tests/base.test.ts b/e2e-tests/base.test.ts index 3d2b3d981..d7af714e1 100644 --- a/e2e-tests/base.test.ts +++ b/e2e-tests/base.test.ts @@ -9,7 +9,8 @@ import { userValidation, signOut, showActiveUsers, searchProject, checkProjectName, checkNotification, goToProjectPage, exportProjects, archivedProjects, - unarchivedProjects, goToEditProject, changeAppLanguage, changeTargetLanguage, projectTargetLanguage, userProfileValidaiton + unarchivedProjects, goToEditProject, changeAppLanguage, + projectTargetLanguage, userProfileValidaiton } from './common'; const fs = require('fs'); @@ -363,6 +364,7 @@ test("Update/Edit text translation project license", async ({ textProject }) => expect(await title).toBe('Projects') }) +/* Changing text translation project target language */ test("Changing text translation project language from English to Persian", async ({ textProject }) => { await projectTargetLanguage(window, expect, textProject, "persian", "Persian (Farsi)") }) @@ -371,6 +373,7 @@ test("Changing text translation project language from Persian to English", async await projectTargetLanguage(window, expect, textProject, "english", "English") }) +/* updating user profile */ test("Update user Profile", async () => { await userProfileValidaiton(window, expect) await expect(window.locator('input[name="given-name"]')).toBeVisible(); diff --git a/e2e-tests/common.js b/e2e-tests/common.js index cb2d0aa5c..9fca92042 100644 --- a/e2e-tests/common.js +++ b/e2e-tests/common.js @@ -2,11 +2,13 @@ export const checkLogInOrNot = async (window, expect) => { await window.waitForSelector('//*[@id="__next"]/div', '//*[@id="__next"]/div[1]', { timeout: 5000 }) const textVisble = await window.locator('//*[@aria-label="projects"]').isVisible() if (textVisble) { - // If 'projects' is visible, check the title + // If title is "Projects" (english) or Not(other language) visible in project list page, const title = await window.locator('//*[@aria-label="projects"]').textContent() if(await title === "Projects"){ + //expecting "Projects" in english await expect(title).toBe("Projects") }else{ + //expecting "Projects" in Other langauage await expect(title).not.toBe('Projects') } } else {