forked from hcengineering/platform
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
UBERF-5575: Fix workspace join (hcengineering#4684)
Signed-off-by: Andrey Sobolev <haiodo@gmail.com> Signed-off-by: Tiago Cruz <tcruz@netic.io>
- Loading branch information
Showing
4 changed files
with
159 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { expect, type Locator, type Page } from '@playwright/test' | ||
import { CommonPage } from './common-page' | ||
import { SignUpData } from './common-types' | ||
|
||
export class SignInJoinPage extends CommonPage { | ||
readonly page: Page | ||
readonly inputEmail: Locator | ||
readonly inputPassword: Locator | ||
readonly buttonJoin: Locator | ||
|
||
constructor (page: Page) { | ||
super() | ||
this.page = page | ||
this.inputEmail = page.locator('input[name="email"]') | ||
this.inputPassword = page.locator('//div[text()="Password"]/../input') | ||
this.buttonJoin = page.locator('button', { hasText: 'Join' }) | ||
} | ||
|
||
async join (data: Pick<SignUpData, 'email' | 'password'>): Promise<void> { | ||
await this.inputEmail.fill(data.email) | ||
await this.inputPassword.fill(data.password) | ||
expect(await this.buttonJoin.isEnabled()).toBe(true) | ||
await this.buttonJoin.click() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters