Skip to content

Commit

Permalink
comment line added
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobbykumar706584 committed Oct 12, 2023
1 parent 3c46ecb commit 1059b0e
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
5 changes: 4 additions & 1 deletion e2e-tests/base.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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');
Expand Down Expand Up @@ -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)")
})
Expand All @@ -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();
Expand Down
4 changes: 3 additions & 1 deletion e2e-tests/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 1059b0e

Please sign in to comment.