Skip to content

Commit

Permalink
lint fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
Bobbykumar706584 committed Sep 26, 2023
1 parent 252a0d8 commit ea14515
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions e2e-tests/common.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export const checkLogInOrNot = async(window, expect) => {
export const checkLogInOrNot = async (window, expect) => {
await window.waitForSelector('//*[@id="__next"]/div', '//*[@id="__next"]/div[1]')
const textVisble = await window.locator('//h1["@aria-label=projects"]', {timeout:3000}).isVisible()
const textVisble = await window.locator('//h1["@aria-label=projects"]', { timeout: 3000 }).isVisible()
if (textVisble) {
const title = await window.textContent('[aria-label=projects]')
await expect(title).toBe('Projects')
Expand All @@ -15,12 +15,12 @@ export const checkLogInOrNot = async(window, expect) => {

export const filterUser = (json, name) => {
const filtered = json.filter((user) =>
user.username.toLowerCase() !== name.toLowerCase()
)
return filtered
}
user.username.toLowerCase() !== name.toLowerCase()
)
return filtered
}

export const userJson = async(window, packageInfo, fs, path) => {
export const userJson = async (window, packageInfo, fs, path) => {
const newpath = await window.evaluate(() => Object.assign({}, window.localStorage))
const file = path.join(newpath.userPath, packageInfo.name, 'users', 'users.json');
const data = await fs.readFileSync(file);
Expand All @@ -40,8 +40,8 @@ export const userFile = async (window, packageInfo, path) => {
export const removeFolderAndFile = async (fs, folder, userName, json, file) => {
fs.rmSync(folder, { recursive: true, force: true })
const filtered = json.filter((item) =>
item.username.toLowerCase() !== userName.toLowerCase()
)
item.username.toLowerCase() !== userName.toLowerCase()
)
return await fs.writeFileSync(file, JSON.stringify(filtered))
}

Expand Down

0 comments on commit ea14515

Please sign in to comment.