Open platform to collect and prioritize feedback
Fixed the login tests
Matt Roberts20795c55ee63
diff --git a/Makefile b/Makefileindex 2be0e4d7a..63591484f 100644--- a/Makefile+++ b/Makefile@@ -59,6 +59,15 @@ test-e2e-server: ## Run all E2E teststest-e2e-ui: ## Run all E2E testsnpx cucumber-js e2e/features/ui/**/*.feature --require-module ts-node/register --require 'e2e/**/*.ts' --publish-quiet+test-e2e-ui-headed: ## Run all E2E tests with visible browser+ HEADED=true npx cucumber-js e2e/features/ui/**/*.feature --require-module ts-node/register --require 'e2e/**/*.ts' --publish-quiet++test-e2e-ui-scenario: ## Run specific E2E test scenario (use NAME="scenario name")+ npx cucumber-js e2e/features/ui/**/*.feature --require-module ts-node/register --require 'e2e/**/*.ts' --publish-quiet --name "$(NAME)"++test-e2e-ui-scenario-headed: ## Run specific E2E test scenario with visible browser (use NAME="scenario name")+ HEADED=true npx cucumber-js e2e/features/ui/**/*.feature --require-module ts-node/register --require 'e2e/**/*.ts' --publish-quiet --name "$(NAME)"+##@ Running (Watch Mode)diff --git a/e2e/setup.ts b/e2e/setup.tsindex 4ff69bc9d..a14f4e767 100644--- a/e2e/setup.ts+++ b/e2e/setup.ts@@ -11,8 +11,8 @@ type BrowserName = "chromium" | "firefox" | "webkit"BeforeAll({ timeout: 30 * 1000 }, async function () {const name = (process.env.BROWSER || "chromium") as BrowserNamebrowser = await playwright[name].launch({- headless: true,- slowMo: 10,+ headless: process.env.HEADED !== "true",+ slowMo: process.env.HEADED === "true" ? 100 : 10,})if (!tenantName) {diff --git a/e2e/step_definitions/home.steps.ts b/e2e/step_definitions/home.steps.tsindex e03eca7c0..ac5f6dead 100644--- a/e2e/step_definitions/home.steps.ts+++ b/e2e/step_definitions/home.steps.ts@@ -52,7 +52,7 @@ Then("I should see the name field", async function (this: FiderWorld) {})Given("I click continue", async function () {- await this.page.click("button[type='submit']")+ await this.page.getByRole("button", { name: "Sign up" }).click()})Given("I click submit your feedback", async function () {@@ -72,8 +72,8 @@ Given("I enter the confirmation code", async function (this: FiderWorld) {const code = await getLatestCodeSentTo(userEmail)// Enter the code in the UI- await this.page.type("#input-code", code)- await this.page.click("button[type='submit']")+ await this.page.fill("#input-code", code)+ await this.page.getByRole("button", { name: "submit" }).click()// Wait for navigation after successful code verificationawait this.page.waitForLoadState("networkidle")@@ -85,11 +85,11 @@ Then("I should see the new post modal", async function (this: FiderWorld) {})Given("I enter my name as {string}", async function (this: FiderWorld, name: string) {- await this.page.type("#input-name", name)+ await this.page.fill("#input-name", name)})Given("I click submit", async function () {- await this.page.click("button[type='submit']")+ await this.page.getByRole("button", { name: "submit" }).click()})Then("I should see {string} as the draft post title", async function (this: FiderWorld, title: string) {diff --git a/e2e/step_definitions/user.steps.ts b/e2e/step_definitions/user.steps.tsindex 7efe85103..83469fce2 100644--- a/e2e/step_definitions/user.steps.ts+++ b/e2e/step_definitions/user.steps.ts@@ -14,13 +14,13 @@ Given("I sign in as {string}", async function (this: FiderWorld, userName: strinconst userEmail = `${userName}-${this.tenantName}@fider.io`await this.page.click(".c-menu .uppercase.text-sm")- await this.page.type(".c-signin-control #input-email", userEmail)+ await this.page.fill(".c-signin-control #input-email", userEmail)await this.page.click(".c-signin-control .c-button--primary")// Get the code from email and enter itconst code = await getLatestCodeSentTo(userEmail)- await this.page.type("#input-code", code)- await this.page.click("button[type='submit']")+ await this.page.fill("#input-code", code)+ await this.page.getByRole("button", { name: "submit" }).click()// Wait for navigation after successful code verificationawait this.page.waitForLoadState("networkidle")