From c4a5d8dd486bb2de952f5cd77780ca9e36120352 Mon Sep 17 00:00:00 2001 From: Kunal Date: Sat, 7 Feb 2026 17:04:05 +0000 Subject: [PATCH] test(e2e): add negative auth case (wrong OTP) --- frontend/cypress/e2e/activity_feed.cy.ts | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/frontend/cypress/e2e/activity_feed.cy.ts b/frontend/cypress/e2e/activity_feed.cy.ts index ce50e963..a16eee67 100644 --- a/frontend/cypress/e2e/activity_feed.cy.ts +++ b/frontend/cypress/e2e/activity_feed.cy.ts @@ -42,12 +42,17 @@ describe("/activity feed", () => { cy.contains(/live feed/i, { timeout: 30_000 }).should("be.visible"); } +<<<<<<< HEAD +======= + +>>>>>>> a6188f5 (test(e2e): add negative auth case (wrong OTP)) it("auth negative: wrong OTP shows an error", () => { cy.visit("/activity"); cy.contains(/sign in to view the feed/i).should("be.visible"); cy.get('[data-testid="activity-signin"]').click(); +<<<<<<< HEAD cy.get('input[type="email"], input[name="identifier"]', { timeout: 20_000 }) .first() .should("be.visible") @@ -65,6 +70,21 @@ describe("/activity feed", () => { cy.contains('button', /verify|continue|sign in/i).click(); cy.contains(/invalid|incorrect|try again/i, { timeout: 20_000 }).should("be.visible"); +======= + cy.contains(/email address/i).should("be.visible"); + cy.get('input[type="email"]').clear().type("jane+clerk_test@example.com"); + cy.contains(/continue|sign in/i).click(); + + cy.contains(/verification code|code/i).should("be.visible"); + // Wrong code + cy.get('input') + .filter('[inputmode="numeric"], [autocomplete="one-time-code"], [type="tel"], [type="text"]') + .first() + .type("000000"); + + // Clerk should display an error message. + cy.contains(/invalid|incorrect|try again/i).should("be.visible"); +>>>>>>> a6188f5 (test(e2e): add negative auth case (wrong OTP)) }); it("happy path: renders task comment cards", () => {