E2E: remove Clerk bypass and sign in via Clerk in Cypress
This commit is contained in:
@@ -2,8 +2,7 @@ import { defineConfig } from "cypress";
|
||||
|
||||
export default defineConfig({
|
||||
e2e: {
|
||||
// Use loopback to avoid network/proxy flakiness in CI.
|
||||
baseUrl: "http://127.0.0.1:3000",
|
||||
baseUrl: "http://localhost:3000",
|
||||
video: false,
|
||||
screenshotOnRunFailure: true,
|
||||
specPattern: "cypress/e2e/**/*.cy.{ts,tsx,js,jsx}",
|
||||
|
||||
@@ -28,6 +28,7 @@ describe("/activity feed", () => {
|
||||
.clear()
|
||||
.type("jane+clerk_test@example.com");
|
||||
|
||||
<<<<<<< HEAD
|
||||
cy.contains('button', /continue|sign in/i).click();
|
||||
|
||||
cy.get('input', { timeout: 20_000 })
|
||||
@@ -40,6 +41,18 @@ describe("/activity feed", () => {
|
||||
|
||||
// Back to app
|
||||
cy.contains(/live feed/i, { timeout: 30_000 }).should("be.visible");
|
||||
=======
|
||||
// OTP / verification code
|
||||
cy.contains(/verification code|code/i).should("be.visible");
|
||||
cy
|
||||
.get('input')
|
||||
.filter('[inputmode="numeric"], [autocomplete="one-time-code"], [type="tel"], [type="text"]')
|
||||
.first()
|
||||
.type("424242");
|
||||
|
||||
cy.contains('button', /verify|continue|sign in/i).click();
|
||||
cy.contains(/live feed/i).should('be.visible');
|
||||
>>>>>>> 446cfb2 (E2E: remove Clerk bypass and sign in via Clerk in Cypress)
|
||||
}
|
||||
|
||||
<<<<<<< HEAD
|
||||
@@ -82,6 +95,8 @@ describe("/activity feed", () => {
|
||||
.first()
|
||||
.type("000000");
|
||||
|
||||
cy.contains('button', /verify|continue|sign in/i).click();
|
||||
|
||||
// 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))
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
"use client";
|
||||
|
||||
import type { ReactNode } from "react";
|
||||
|
||||
// NOTE: We intentionally keep this file very small and dependency-free.
|
||||
// It provides CI/secretless-build safe fallbacks for Clerk hooks/components.
|
||||
|
||||
import type { ReactNode, ComponentProps } from "react";
|
||||
|
||||
import {
|
||||
ClerkProvider,
|
||||
SignedIn as ClerkSignedIn,
|
||||
@@ -15,8 +15,6 @@ import {
|
||||
useUser as clerkUseUser,
|
||||
} from "@clerk/nextjs";
|
||||
|
||||
import type { ComponentProps } from "react";
|
||||
|
||||
import { isLikelyValidClerkPublishableKey } from "@/auth/clerkKey";
|
||||
|
||||
export function isClerkEnabled(): boolean {
|
||||
|
||||
Reference in New Issue
Block a user