-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: fix onboarding form e2e (#1545)
Because - fix onboarding form e2e This commit - fix onboarding form e2e
- Loading branch information
Showing
6 changed files
with
23 additions
and
17 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -3,23 +3,26 @@ import { expect, Locator, Page } from "@playwright/test"; | |
export class OnboardingPage { | ||
readonly page: Page; | ||
readonly emailField: Locator; | ||
readonly companyField: Locator; | ||
readonly displayNameField: Locator; | ||
readonly companyNameField: Locator; | ||
readonly roleField: Locator; | ||
readonly roleOption: Locator; | ||
readonly submitButton: Locator; | ||
|
||
readonly onboardingPagePath = "/onboarding"; | ||
readonly testEmail = "[email protected]"; | ||
readonly testDisplayName = "Instill AI"; | ||
readonly testCompany = "Instill AI"; | ||
readonly testRole = "Product & Design"; | ||
readonly testRole = "Customer Service"; | ||
readonly pipelinePagePath = "/admin/pipelines"; | ||
|
||
constructor(page: Page) { | ||
this.page = page; | ||
this.emailField = page.locator("input#email"); | ||
this.companyField = page.locator("input#org-name"); | ||
this.roleField = page.locator("button#role"); | ||
this.roleOption = page.getByRole("option", { name: this.testRole }); | ||
this.emailField = page.locator('input[name="email"]'); | ||
this.displayNameField = page.locator('input[name="displayName"]'); | ||
this.companyNameField = page.locator('input[name="companyName"]'); | ||
this.roleField = page.getByTestId("onboarding-form-role-field"); | ||
this.roleOption = page.getByLabel(this.testRole); | ||
this.submitButton = page.getByRole("button", { name: "Start" }); | ||
} | ||
|
||
|
@@ -34,8 +37,10 @@ export class OnboardingPage { | |
async fillInOnboardingForm() { | ||
await this.emailField.fill(this.testEmail); | ||
expect(this.emailField).toHaveValue(this.testEmail); | ||
await this.companyField.fill(this.testCompany); | ||
expect(this.companyField).toHaveValue(this.testCompany); | ||
await this.displayNameField.fill(this.testDisplayName); | ||
expect(this.displayNameField).toHaveValue(this.testDisplayName); | ||
await this.companyNameField.fill(this.testCompany); | ||
expect(this.companyNameField).toHaveValue(this.testCompany); | ||
await this.roleField.click(); | ||
await this.roleOption.click(); | ||
expect(this.roleField).toHaveText(this.testRole); | ||
|
3 changes: 2 additions & 1 deletion
3
apps/console/integration-test/tests/should-change-component-id.test.ts
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
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