mirror of https://github.com/nocodb/nocodb
Muhammed Mustafa
2 years ago
18 changed files with 319 additions and 160 deletions
@ -1,6 +1,8 @@ |
|||||||
node_modules/ |
node_modules/ |
||||||
/test-results/ |
/test-results/ |
||||||
/playwright-report/ |
/playwright-report/ |
||||||
|
/playwright-report copy/ |
||||||
/playwright/.cache/ |
/playwright/.cache/ |
||||||
.env |
.env |
||||||
output |
output |
||||||
|
/output copy/ |
||||||
|
@ -0,0 +1,37 @@ |
|||||||
|
// playwright-dev-page.ts
|
||||||
|
import { expect, Page } from "@playwright/test"; |
||||||
|
import BasePage from "../Base"; |
||||||
|
|
||||||
|
export class SignupPage extends BasePage { |
||||||
|
constructor(rootPage: Page) { |
||||||
|
super(rootPage); |
||||||
|
} |
||||||
|
|
||||||
|
prefixEmail(email: string) { |
||||||
|
const parallelId = process.env.TEST_PARALLEL_INDEX ?? '0' |
||||||
|
return `nc_test_${parallelId}_${email}`; |
||||||
|
} |
||||||
|
|
||||||
|
goto() { |
||||||
|
return this.rootPage.goto("/#/signup/"); |
||||||
|
} |
||||||
|
|
||||||
|
get() { |
||||||
|
return this.rootPage.locator("html"); |
||||||
|
} |
||||||
|
|
||||||
|
async signUp({ email, password, withoutPrefix }: { email: string; password: string, withoutPrefix?: boolean }) { |
||||||
|
if(!withoutPrefix) email = this.prefixEmail(email); |
||||||
|
|
||||||
|
const signUp = this.rootPage; |
||||||
|
await signUp.locator('button:has-text("SIGN UP")').waitFor(); |
||||||
|
|
||||||
|
await signUp |
||||||
|
.locator(`input[placeholder="Enter your work email"]`) |
||||||
|
.fill(email); |
||||||
|
await signUp |
||||||
|
.locator(`input[placeholder="Enter your password"]`) |
||||||
|
.fill(password); |
||||||
|
await signUp.locator(`button:has-text("SIGN UP")`).click(); |
||||||
|
} |
||||||
|
} |
Loading…
Reference in new issue