Skip to content

Commit

Permalink
Write new login fail test
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan committed Feb 20, 2023
1 parent 0f84d3d commit 50fe418
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 3 deletions.
1 change: 1 addition & 0 deletions tests/e2e/support/api/graph/userManagement.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const createUser = async ({ user, admin }: { user: User; admin: User }):
body,
user: admin
})

checkResponseStatus(response, 'Failed while creating user')

const responseData = await response.json()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export const changeAccountEnabled = async (args: {
value: boolean
}): Promise<void> => {
const { page, value, uuid } = args
console.log(uuid)
await page.locator(util.format(userIdSelector, uuid)).click()
await page.waitForSelector(editActionBtn)
await page.locator(`.context-menu`).locator(editActionBtn).click()
Expand Down
3 changes: 1 addition & 2 deletions tests/e2e/support/objects/app-admin-settings/users/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,10 @@ export class Users {
this.#usersEnvironment = new UsersEnvironment()
this.#page = page
}

async allowLogin({ key }: { key: string }): Promise<void> {
const { uuid } = this.#usersEnvironment.getUser({ key })
await changeAccountEnabled({ uuid, value: true, page: this.#page })
}

async forbidLogin({ key }: { key: string }): Promise<void> {
const { uuid } = this.#usersEnvironment.getUser({ key })
await changeAccountEnabled({ uuid, value: false, page: this.#page })
Expand Down

0 comments on commit 50fe418

Please sign in to comment.