diff --git a/.claude/skills/clerk-monorepo/SKILL.md b/.claude/skills/clerk-monorepo/SKILL.md index fb2bfc09ed6..8c0a322d46a 100644 --- a/.claude/skills/clerk-monorepo/SKILL.md +++ b/.claude/skills/clerk-monorepo/SKILL.md @@ -150,8 +150,10 @@ How the cache key is built: `@clerk/clerk-js`, `@clerk/ui` and `@clerk/testing`, plus the framework packages that suite's apps add. Turbo folds those build hashes into the suite hash, and package builds already depend on `^build`, so transitive packages such as `@clerk/shared` are covered without being listed. -- `inputs` covers the harness, the top-level test files, the test directories the suite's tagged tests - live in (and import from), and the templates its apps copy. Other suites' directories are not inputs. +- `inputs` covers the harness, the test directories the suite's tagged tests live in (and import + from), and the templates its apps copy. Other suites' directories are not inputs. Tests live under + `integration/tests//`; a test tagged for several suites lives in `generic/`, and tests no + suite runs live in `unscheduled/`. - `scripts/integration-deps.test.mjs` derives both lists from `integration/presets` and the tagged tests and fails when `turbo.json` drifts. Its failure message prints the block to paste. diff --git a/integration/tests/billing-hooks.test.ts b/integration/tests/billing/billing-hooks.test.ts similarity index 96% rename from integration/tests/billing-hooks.test.ts rename to integration/tests/billing/billing-hooks.test.ts index f99a40a2f48..c0d6935c3cb 100644 --- a/integration/tests/billing-hooks.test.ts +++ b/integration/tests/billing/billing-hooks.test.ts @@ -1,7 +1,7 @@ import { expect, test } from '@playwright/test'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; testAgainstRunningApps({})('billing hooks @billing', ({ app }) => { test.describe.configure({ mode: 'parallel' }); diff --git a/integration/tests/per-seat-pricing.test.ts b/integration/tests/billing/per-seat-pricing.test.ts similarity index 95% rename from integration/tests/per-seat-pricing.test.ts rename to integration/tests/billing/per-seat-pricing.test.ts index e8177c6b8af..3970e2321f9 100644 --- a/integration/tests/per-seat-pricing.test.ts +++ b/integration/tests/billing/per-seat-pricing.test.ts @@ -1,7 +1,7 @@ import { expect, test } from '@playwright/test'; -import type { FakeOrganization, FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import type { FakeOrganization, FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; const INVITEE_EMAIL = 'one+clerk_test@clerk.dev'; diff --git a/integration/tests/pricing-table.test.ts b/integration/tests/billing/pricing-table.test.ts similarity index 99% rename from integration/tests/pricing-table.test.ts rename to integration/tests/billing/pricing-table.test.ts index 4983f3d14c8..9a6665669e3 100644 --- a/integration/tests/pricing-table.test.ts +++ b/integration/tests/billing/pricing-table.test.ts @@ -1,8 +1,8 @@ import type { Locator } from '@playwright/test'; import { expect, test } from '@playwright/test'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; testAgainstRunningApps({})('pricing table @billing', ({ app }) => { test.describe.configure({ mode: 'parallel' }); diff --git a/integration/tests/cache-components.test.ts b/integration/tests/cache-components/cache-components.test.ts similarity index 98% rename from integration/tests/cache-components.test.ts rename to integration/tests/cache-components/cache-components.test.ts index 6915724b22c..275d0c088f8 100644 --- a/integration/tests/cache-components.test.ts +++ b/integration/tests/cache-components/cache-components.test.ts @@ -1,8 +1,8 @@ import { expect, test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { appConfigs } from '../../presets'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes], withPattern: ['next.cacheComponents'] })( 'Next.js Cache Components @cache-components', diff --git a/integration/tests/client-trust.test.ts b/integration/tests/generic/client-trust.test.ts similarity index 95% rename from integration/tests/client-trust.test.ts rename to integration/tests/generic/client-trust.test.ts index 0cb11bcf1c5..42e0d537afe 100644 --- a/integration/tests/client-trust.test.ts +++ b/integration/tests/generic/client-trust.test.ts @@ -1,8 +1,8 @@ import { expect, test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { appConfigs } from '../../presets'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; testAgainstRunningApps({ withEnv: [appConfigs.envs.withNeedsClientTrust] })( 'client trust flow @generic @nextjs', diff --git a/integration/tests/components.test.ts b/integration/tests/generic/components.test.ts similarity index 94% rename from integration/tests/components.test.ts rename to integration/tests/generic/components.test.ts index c8b0c71bf50..35e1b9bdc3b 100644 --- a/integration/tests/components.test.ts +++ b/integration/tests/generic/components.test.ts @@ -1,8 +1,8 @@ import { expect, test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import type { FakeOrganization, FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { appConfigs } from '../../presets'; +import type { FakeOrganization, FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })('component smoke tests @generic', ({ app }) => { let fakeUser: FakeUser; diff --git a/integration/tests/composed-components.test.ts b/integration/tests/generic/composed-components.test.ts similarity index 98% rename from integration/tests/composed-components.test.ts rename to integration/tests/generic/composed-components.test.ts index 43a5139b4b5..dd6a29206d2 100644 --- a/integration/tests/composed-components.test.ts +++ b/integration/tests/generic/composed-components.test.ts @@ -1,11 +1,11 @@ import { type BrowserContext, expect, type Page, test } from '@playwright/test'; -import type { Application } from '../models/application'; -import { appConfigs } from '../presets'; -import { PKGLAB } from '../presets/utils'; -import type { FakeOrganization, FakeUser } from '../testUtils'; -import { createTestUtils } from '../testUtils'; -import { stringPhoneNumber } from '../testUtils/phoneUtils'; +import type { Application } from '../../models/application'; +import { appConfigs } from '../../presets'; +import { PKGLAB } from '../../presets/utils'; +import type { FakeOrganization, FakeUser } from '../../testUtils'; +import { createTestUtils } from '../../testUtils'; +import { stringPhoneNumber } from '../../testUtils/phoneUtils'; /** * E2E parity coverage for the experimental composed exports from `@clerk/ui/experimental`. diff --git a/integration/tests/custom-pages.test.ts b/integration/tests/generic/custom-pages.test.ts similarity index 99% rename from integration/tests/custom-pages.test.ts rename to integration/tests/generic/custom-pages.test.ts index 8dc4e84cdbd..e7aad5fdfe8 100644 --- a/integration/tests/custom-pages.test.ts +++ b/integration/tests/generic/custom-pages.test.ts @@ -1,9 +1,9 @@ /* eslint-disable turbo/no-undeclared-env-vars */ import { expect, test } from '@playwright/test'; -import type { Application } from '../models/application'; -import type { CreateAppPageObjectArgs, FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import type { Application } from '../../models/application'; +import type { CreateAppPageObjectArgs, FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; const CUSTOM_PROFILE_PAGE = '/custom-user-profile'; const CUSTOM_BUTTON_PAGE = '/custom-user-button'; diff --git a/integration/tests/dev-browser-partitioned-cookies.test.ts b/integration/tests/generic/dev-browser-partitioned-cookies.test.ts similarity index 94% rename from integration/tests/dev-browser-partitioned-cookies.test.ts rename to integration/tests/generic/dev-browser-partitioned-cookies.test.ts index 4525b382cda..0f53af8e700 100644 --- a/integration/tests/dev-browser-partitioned-cookies.test.ts +++ b/integration/tests/generic/dev-browser-partitioned-cookies.test.ts @@ -1,9 +1,9 @@ import { expect, test } from '@playwright/test'; import { parsePublishableKey } from '@clerk/shared/keys'; -import { appConfigs } from '../presets'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { appConfigs } from '../../presets'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })( 'dev browser partitioned cookies @generic', diff --git a/integration/tests/email-code.test.ts b/integration/tests/generic/email-code.test.ts similarity index 93% rename from integration/tests/email-code.test.ts rename to integration/tests/generic/email-code.test.ts index 980894d6487..9c757df531c 100644 --- a/integration/tests/email-code.test.ts +++ b/integration/tests/generic/email-code.test.ts @@ -1,9 +1,9 @@ import { expect, test } from '@playwright/test'; -import type { Application } from '../models/application'; -import { appConfigs } from '../presets'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils } from '../testUtils'; +import type { Application } from '../../models/application'; +import { appConfigs } from '../../presets'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils } from '../../testUtils'; test.describe('sign up and sign in with email code @generic', () => { const configs = [appConfigs.next.appRouter, appConfigs.react.vite]; diff --git a/integration/tests/handshake.test.ts b/integration/tests/generic/handshake.test.ts similarity index 99% rename from integration/tests/handshake.test.ts rename to integration/tests/generic/handshake.test.ts index 7c29dee8c56..d3af2c82ddc 100644 --- a/integration/tests/handshake.test.ts +++ b/integration/tests/generic/handshake.test.ts @@ -2,10 +2,10 @@ import * as http from 'node:http'; import { expect, test } from '@playwright/test'; -import type { OrganizationSyncOptions } from '../../packages/backend/src/tokens/types'; -import type { Application } from '../models/application'; -import { appConfigs } from '../presets'; -import { generateConfig, getJwksFromSecretKey } from '../testUtils/handshake'; +import type { OrganizationSyncOptions } from '../../../packages/backend/src/tokens/types'; +import type { Application } from '../../models/application'; +import { appConfigs } from '../../presets'; +import { generateConfig, getJwksFromSecretKey } from '../../testUtils/handshake'; const PORT = 4199; diff --git a/integration/tests/impersonation-flow.test.ts b/integration/tests/generic/impersonation-flow.test.ts similarity index 93% rename from integration/tests/impersonation-flow.test.ts rename to integration/tests/generic/impersonation-flow.test.ts index aed9e581693..59b36977e82 100644 --- a/integration/tests/impersonation-flow.test.ts +++ b/integration/tests/generic/impersonation-flow.test.ts @@ -1,9 +1,9 @@ import type { User } from '@clerk/backend'; import { expect, test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { appConfigs } from '../../presets'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })('Impersonation Flow @generic', ({ app }) => { test.describe.configure({ mode: 'serial' }); diff --git a/integration/tests/last-authentication-strategy.test.ts b/integration/tests/generic/last-authentication-strategy.test.ts similarity index 98% rename from integration/tests/last-authentication-strategy.test.ts rename to integration/tests/generic/last-authentication-strategy.test.ts index ed81e9c1e7a..6464d2c0fbd 100644 --- a/integration/tests/last-authentication-strategy.test.ts +++ b/integration/tests/generic/last-authentication-strategy.test.ts @@ -2,8 +2,8 @@ import type { LastAuthenticationStrategy } from '@clerk/shared/types'; import type { Page } from '@playwright/test'; import { expect, test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { appConfigs } from '../../presets'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; const mockLastAuthenticationStrategyResponse = async ( page: Page, diff --git a/integration/tests/legal-consent.test.ts b/integration/tests/generic/legal-consent.test.ts similarity index 94% rename from integration/tests/legal-consent.test.ts rename to integration/tests/generic/legal-consent.test.ts index 6f232376b0f..1eefda6c082 100644 --- a/integration/tests/legal-consent.test.ts +++ b/integration/tests/generic/legal-consent.test.ts @@ -1,7 +1,7 @@ import { expect, test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { appConfigs } from '../../presets'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; testAgainstRunningApps({ withEnv: [appConfigs.envs.withLegalConsent] })( 'sign up flow with legal consent @generic @nextjs', diff --git a/integration/tests/navigation.test.ts b/integration/tests/generic/navigation.test.ts similarity index 94% rename from integration/tests/navigation.test.ts rename to integration/tests/generic/navigation.test.ts index d065af9bc58..0ec0a098784 100644 --- a/integration/tests/navigation.test.ts +++ b/integration/tests/generic/navigation.test.ts @@ -1,7 +1,7 @@ import { test } from '@playwright/test'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; testAgainstRunningApps({ withPattern: ['next.appRouter.withEmailCodes'] })('navigation modes @generic', ({ app }) => { test.describe.configure({ mode: 'serial' }); diff --git a/integration/tests/non-secure-context.test.ts b/integration/tests/generic/non-secure-context.test.ts similarity index 91% rename from integration/tests/non-secure-context.test.ts rename to integration/tests/generic/non-secure-context.test.ts index 268868ee868..49a9f5d908b 100644 --- a/integration/tests/non-secure-context.test.ts +++ b/integration/tests/generic/non-secure-context.test.ts @@ -16,9 +16,9 @@ import type { Server } from 'node:http'; import { test } from '@playwright/test'; -import { createProxyServer } from '../scripts/proxyServer'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { createProxyServer } from '../../scripts/proxyServer'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; // This NEEDS to be a domain that points to localhost // and is not listed in the HSTS preload list diff --git a/integration/tests/offline-session-persistence.test.ts b/integration/tests/generic/offline-session-persistence.test.ts similarity index 96% rename from integration/tests/offline-session-persistence.test.ts rename to integration/tests/generic/offline-session-persistence.test.ts index 1f49d8e227f..34058fa8080 100644 --- a/integration/tests/offline-session-persistence.test.ts +++ b/integration/tests/generic/offline-session-persistence.test.ts @@ -1,8 +1,8 @@ import { expect, test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { appConfigs } from '../../presets'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })( 'offline session persistence @generic', diff --git a/integration/tests/passkeys.test.ts b/integration/tests/generic/passkeys.test.ts similarity index 97% rename from integration/tests/passkeys.test.ts rename to integration/tests/generic/passkeys.test.ts index 77968ed22a5..c568b13e6b5 100644 --- a/integration/tests/passkeys.test.ts +++ b/integration/tests/generic/passkeys.test.ts @@ -1,10 +1,10 @@ import type { BrowserContext, Page } from '@playwright/test'; import { expect, test } from '@playwright/test'; -import type { Application } from '../models/application'; -import { appConfigs } from '../presets'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils } from '../testUtils'; +import type { Application } from '../../models/application'; +import { appConfigs } from '../../presets'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils } from '../../testUtils'; type SavedCredential = { id: string; diff --git a/integration/tests/protect-check.test.ts b/integration/tests/generic/protect-check.test.ts similarity index 97% rename from integration/tests/protect-check.test.ts rename to integration/tests/generic/protect-check.test.ts index 75f74cf6828..0a155f8c7ac 100644 --- a/integration/tests/protect-check.test.ts +++ b/integration/tests/generic/protect-check.test.ts @@ -1,10 +1,10 @@ import type { Page } from '@playwright/test'; import { expect, test } from '@playwright/test'; -import type { Application } from '../models/application'; -import { appConfigs } from '../presets'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils } from '../testUtils'; +import type { Application } from '../../models/application'; +import { appConfigs } from '../../presets'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils } from '../../testUtils'; const waitForProtectCheckSubmit = (page: Page) => page.waitForResponse( diff --git a/integration/tests/protect-service.test.ts b/integration/tests/generic/protect-service.test.ts similarity index 95% rename from integration/tests/protect-service.test.ts rename to integration/tests/generic/protect-service.test.ts index dc1f82ef304..b9c58bc9cd6 100644 --- a/integration/tests/protect-service.test.ts +++ b/integration/tests/generic/protect-service.test.ts @@ -2,8 +2,8 @@ import type { ProtectConfigJSON } from '@clerk/shared/types'; import type { Page } from '@playwright/test'; import { expect, test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { appConfigs } from '../../presets'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; const mockProtectSettings = async (page: Page, config?: ProtectConfigJSON) => { await page.route('*/**/v1/environment*', async route => { diff --git a/integration/tests/resiliency.test.ts b/integration/tests/generic/resiliency.test.ts similarity index 99% rename from integration/tests/resiliency.test.ts rename to integration/tests/generic/resiliency.test.ts index 695e61ad53c..eef56098c7f 100644 --- a/integration/tests/resiliency.test.ts +++ b/integration/tests/generic/resiliency.test.ts @@ -1,8 +1,8 @@ import { expect, test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { appConfigs } from '../../presets'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; const make429ClerkResponse = () => ({ status: 429, diff --git a/integration/tests/safari-itp.test.ts b/integration/tests/generic/safari-itp.test.ts similarity index 97% rename from integration/tests/safari-itp.test.ts rename to integration/tests/generic/safari-itp.test.ts index d764437a4d3..16b3109630f 100644 --- a/integration/tests/safari-itp.test.ts +++ b/integration/tests/generic/safari-itp.test.ts @@ -1,8 +1,8 @@ import { expect, test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { appConfigs } from '../../presets'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; /** * Tests Safari ITP (Intelligent Tracking Prevention) workaround diff --git a/integration/tests/sign-in-flow.test.ts b/integration/tests/generic/sign-in-flow.test.ts similarity index 97% rename from integration/tests/sign-in-flow.test.ts rename to integration/tests/generic/sign-in-flow.test.ts index 4aa124b9176..bfafb1ad3db 100644 --- a/integration/tests/sign-in-flow.test.ts +++ b/integration/tests/generic/sign-in-flow.test.ts @@ -1,8 +1,8 @@ import { expect, test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { appConfigs } from '../../presets'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })('sign in flow @generic @nextjs', ({ app }) => { test.describe.configure({ mode: 'serial' }); diff --git a/integration/tests/sign-out-smoke.test.ts b/integration/tests/generic/sign-out-smoke.test.ts similarity index 96% rename from integration/tests/sign-out-smoke.test.ts rename to integration/tests/generic/sign-out-smoke.test.ts index 3aa855d394b..b668ee901b9 100644 --- a/integration/tests/sign-out-smoke.test.ts +++ b/integration/tests/generic/sign-out-smoke.test.ts @@ -1,8 +1,8 @@ import { expect, test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { appConfigs } from '../../presets'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })('sign out smoke test @generic', ({ app }) => { test.describe.configure({ mode: 'serial' }); diff --git a/integration/tests/sign-up-flow.test.ts b/integration/tests/generic/sign-up-flow.test.ts similarity index 98% rename from integration/tests/sign-up-flow.test.ts rename to integration/tests/generic/sign-up-flow.test.ts index 58ef0d393e0..fa4740340d6 100644 --- a/integration/tests/sign-up-flow.test.ts +++ b/integration/tests/generic/sign-up-flow.test.ts @@ -1,7 +1,7 @@ import { expect, test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { appConfigs } from '../../presets'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })('sign up flow @generic @nextjs', ({ app }) => { test.describe.configure({ mode: 'parallel' }); diff --git a/integration/tests/update-props.test.ts b/integration/tests/generic/update-props.test.ts similarity index 92% rename from integration/tests/update-props.test.ts rename to integration/tests/generic/update-props.test.ts index 7084bb7edf3..b7a7965bf1b 100644 --- a/integration/tests/update-props.test.ts +++ b/integration/tests/generic/update-props.test.ts @@ -1,7 +1,7 @@ import { test } from '@playwright/test'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; testAgainstRunningApps({ withPattern: ['react.vite.withEmailCodes'] })('sign in flow @generic', ({ app }) => { test.describe.configure({ mode: 'serial' }); diff --git a/integration/tests/user-avatar.test.ts b/integration/tests/generic/user-avatar.test.ts similarity index 88% rename from integration/tests/user-avatar.test.ts rename to integration/tests/generic/user-avatar.test.ts index 66e7684fda9..99b048c7291 100644 --- a/integration/tests/user-avatar.test.ts +++ b/integration/tests/generic/user-avatar.test.ts @@ -1,8 +1,8 @@ import { test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { appConfigs } from '../../presets'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes], diff --git a/integration/tests/user-profile.test.ts b/integration/tests/generic/user-profile.test.ts similarity index 97% rename from integration/tests/user-profile.test.ts rename to integration/tests/generic/user-profile.test.ts index 540e6e095c1..b916d1fb762 100644 --- a/integration/tests/user-profile.test.ts +++ b/integration/tests/generic/user-profile.test.ts @@ -1,10 +1,10 @@ import { expect, test } from '@playwright/test'; -import type { Application } from '../models/application'; -import { appConfigs } from '../presets'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils } from '../testUtils'; -import { stringPhoneNumber } from '../testUtils/phoneUtils'; +import type { Application } from '../../models/application'; +import { appConfigs } from '../../presets'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils } from '../../testUtils'; +import { stringPhoneNumber } from '../../testUtils/phoneUtils'; test.describe('user profile @generic', () => { test.describe.configure({ mode: 'serial' }); diff --git a/integration/tests/whatsapp-phone-code.test.ts b/integration/tests/generic/whatsapp-phone-code.test.ts similarity index 97% rename from integration/tests/whatsapp-phone-code.test.ts rename to integration/tests/generic/whatsapp-phone-code.test.ts index 7716eab4511..5b3c20f4bdd 100644 --- a/integration/tests/whatsapp-phone-code.test.ts +++ b/integration/tests/generic/whatsapp-phone-code.test.ts @@ -2,10 +2,10 @@ import type { Page } from '@playwright/test'; import { expect, test } from '@playwright/test'; -import type { Application } from '../models/application'; -import { appConfigs } from '../presets'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils } from '../testUtils'; +import type { Application } from '../../models/application'; +import { appConfigs } from '../../presets'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils } from '../../testUtils'; const clickSendCodeViaSmsInstead = async (page: Page, verificationHeading: RegExp) => { await page.getByRole('heading', { name: verificationHeading }).waitFor(); diff --git a/integration/tests/api-keys-component.test.ts b/integration/tests/machine/api-keys-component.test.ts similarity index 99% rename from integration/tests/api-keys-component.test.ts rename to integration/tests/machine/api-keys-component.test.ts index 4dda3e8b234..75ac837377f 100644 --- a/integration/tests/api-keys-component.test.ts +++ b/integration/tests/machine/api-keys-component.test.ts @@ -1,10 +1,10 @@ import type { Page } from '@playwright/test'; import { expect, test } from '@playwright/test'; -import type { Application } from '../models/application'; -import { appConfigs } from '../presets'; -import type { FakeOrganization, FakeUser } from '../testUtils'; -import { createTestUtils } from '../testUtils'; +import type { Application } from '../../models/application'; +import { appConfigs } from '../../presets'; +import type { FakeOrganization, FakeUser } from '../../testUtils'; +import { createTestUtils } from '../../testUtils'; const mockAPIKeysEnvironmentSettings = async ( page: Page, diff --git a/integration/tests/next-machine.test.ts b/integration/tests/machine/next-machine.test.ts similarity index 96% rename from integration/tests/next-machine.test.ts rename to integration/tests/machine/next-machine.test.ts index faaffe5944c..472464499ee 100644 --- a/integration/tests/next-machine.test.ts +++ b/integration/tests/machine/next-machine.test.ts @@ -2,10 +2,10 @@ import type { User } from '@clerk/backend'; import { TokenType } from '@clerk/backend/internal'; import { expect, test } from '@playwright/test'; -import type { Application } from '../models/application'; -import { appConfigs } from '../presets'; -import { createTestUtils } from '../testUtils'; -import type { FakeMachineNetwork, MachineAuthTestAdapter } from '../testUtils/machineAuthHelpers'; +import type { Application } from '../../models/application'; +import { appConfigs } from '../../presets'; +import { createTestUtils } from '../../testUtils'; +import type { FakeMachineNetwork, MachineAuthTestAdapter } from '../../testUtils/machineAuthHelpers'; import { createFakeMachineNetwork, createJwtM2MToken, @@ -13,8 +13,8 @@ import { registerApiKeyAuthTests, registerM2MAuthTests, registerOAuthAuthTests, -} from '../testUtils/machineAuthHelpers'; -import type { FakeAPIKey, FakeUser } from '../testUtils/usersService'; +} from '../../testUtils/machineAuthHelpers'; +import type { FakeAPIKey, FakeUser } from '../../testUtils/usersService'; const adapter: MachineAuthTestAdapter = { baseConfig: appConfigs.next.appRouter, diff --git a/integration/tests/content-security-policy.test.ts b/integration/tests/nextjs/content-security-policy.test.ts similarity index 86% rename from integration/tests/content-security-policy.test.ts rename to integration/tests/nextjs/content-security-policy.test.ts index 638d260ee77..c589eb1caf6 100644 --- a/integration/tests/content-security-policy.test.ts +++ b/integration/tests/nextjs/content-security-policy.test.ts @@ -1,6 +1,6 @@ import { test } from '@playwright/test'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; testAgainstRunningApps({ withPattern: ['next.appRouter.withEmailCodes'] })( 'Content Security Policy @nextjs', diff --git a/integration/tests/dynamic-keys.test.ts b/integration/tests/nextjs/dynamic-keys.test.ts similarity index 95% rename from integration/tests/dynamic-keys.test.ts rename to integration/tests/nextjs/dynamic-keys.test.ts index 21b27dcc50c..236a6496a71 100644 --- a/integration/tests/dynamic-keys.test.ts +++ b/integration/tests/nextjs/dynamic-keys.test.ts @@ -1,8 +1,8 @@ import { expect, test } from '@playwright/test'; -import type { Application } from '../models/application'; -import { appConfigs } from '../presets'; -import { createTestUtils } from '../testUtils'; +import type { Application } from '../../models/application'; +import { appConfigs } from '../../presets'; +import { createTestUtils } from '../../testUtils'; test.describe('dynamic keys @nextjs', () => { test.describe.configure({ mode: 'serial' }); diff --git a/integration/tests/next-build.test.ts b/integration/tests/nextjs/next-build.test.ts similarity index 98% rename from integration/tests/next-build.test.ts rename to integration/tests/nextjs/next-build.test.ts index 697384b9922..f9dea3c670e 100644 --- a/integration/tests/next-build.test.ts +++ b/integration/tests/nextjs/next-build.test.ts @@ -1,8 +1,8 @@ import { expect, test } from '@playwright/test'; -import type { Application } from '../models/application'; -import { appConfigs } from '../presets'; -import { PKGLAB } from '../presets/utils'; +import type { Application } from '../../models/application'; +import { appConfigs } from '../../presets'; +import { PKGLAB } from '../../presets/utils'; type RenderingModeTestCase = { name: string; diff --git a/integration/tests/next-middleware-keyless.test.ts b/integration/tests/nextjs/next-middleware-keyless.test.ts similarity index 91% rename from integration/tests/next-middleware-keyless.test.ts rename to integration/tests/nextjs/next-middleware-keyless.test.ts index d699b7790f8..36a2111008a 100644 --- a/integration/tests/next-middleware-keyless.test.ts +++ b/integration/tests/nextjs/next-middleware-keyless.test.ts @@ -1,7 +1,7 @@ import { expect, test } from '@playwright/test'; -import type { Application } from '../models/application'; -import { appConfigs } from '../presets'; +import type { Application } from '../../models/application'; +import { appConfigs } from '../../presets'; const commonSetup = appConfigs.next.appRouter.clone(); diff --git a/integration/tests/oauth-flows.test.ts b/integration/tests/nextjs/oauth-flows.test.ts similarity index 98% rename from integration/tests/oauth-flows.test.ts rename to integration/tests/nextjs/oauth-flows.test.ts index 51024988e17..ffafa3d512b 100644 --- a/integration/tests/oauth-flows.test.ts +++ b/integration/tests/nextjs/oauth-flows.test.ts @@ -2,13 +2,13 @@ import { createClerkClient } from '@clerk/backend'; import type { Page } from '@playwright/test'; import { expect, test } from '@playwright/test'; -import { environmentConfig } from '../models/environment'; -import { appConfigs } from '../presets'; -import { resolveInstanceKeys } from '../presets/envs'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; -import { withRetry } from '../testUtils/retryableClerkClient'; -import { createUserService } from '../testUtils/usersService'; +import { environmentConfig } from '../../models/environment'; +import { appConfigs } from '../../presets'; +import { resolveInstanceKeys } from '../../presets/envs'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; +import { withRetry } from '../../testUtils/retryableClerkClient'; +import { createUserService } from '../../testUtils/usersService'; const grantOAuthConsent = async (page: Page) => { const allowAccessButton = page.getByRole('button', { name: 'Allow' }); diff --git a/integration/tests/prefetch-ui.test.ts b/integration/tests/nextjs/prefetch-ui.test.ts similarity index 90% rename from integration/tests/prefetch-ui.test.ts rename to integration/tests/nextjs/prefetch-ui.test.ts index 33b0b6a6991..6973752d1f5 100644 --- a/integration/tests/prefetch-ui.test.ts +++ b/integration/tests/nextjs/prefetch-ui.test.ts @@ -1,7 +1,7 @@ import { expect, test } from '@playwright/test'; -import type { Application } from '../models/application'; -import { appConfigs } from '../presets'; +import type { Application } from '../../models/application'; +import { appConfigs } from '../../presets'; test.describe('prefetchUI disabled @nextjs', () => { test.describe.configure({ mode: 'serial' }); diff --git a/integration/tests/protect-jwt-v2.test.ts b/integration/tests/nextjs/protect-jwt-v2.test.ts similarity index 98% rename from integration/tests/protect-jwt-v2.test.ts rename to integration/tests/nextjs/protect-jwt-v2.test.ts index 3d2f1d36bae..1a9d4034c1a 100644 --- a/integration/tests/protect-jwt-v2.test.ts +++ b/integration/tests/nextjs/protect-jwt-v2.test.ts @@ -1,9 +1,9 @@ import type { OrganizationMembershipRole } from '@clerk/backend'; import { expect, test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import type { FakeOrganization, FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { appConfigs } from '../../presets'; +import type { FakeOrganization, FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; testAgainstRunningApps({ withEnv: [appConfigs.envs.withBillingJwtV2], diff --git a/integration/tests/protect.test.ts b/integration/tests/nextjs/protect.test.ts similarity index 97% rename from integration/tests/protect.test.ts rename to integration/tests/nextjs/protect.test.ts index a103546beb7..afa4718fb62 100644 --- a/integration/tests/protect.test.ts +++ b/integration/tests/nextjs/protect.test.ts @@ -1,9 +1,9 @@ import type { OrganizationMembershipRole } from '@clerk/backend'; import { expect, test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import type { FakeOrganization, FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { appConfigs } from '../../presets'; +import type { FakeOrganization, FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; testAgainstRunningApps({ withEnv: [appConfigs.envs.withCustomRoles, appConfigs.envs.withBillingJwtV2], diff --git a/integration/tests/redirects.test.ts b/integration/tests/nextjs/redirects.test.ts similarity index 95% rename from integration/tests/redirects.test.ts rename to integration/tests/nextjs/redirects.test.ts index 90cd9ada1e2..8304340eec4 100644 --- a/integration/tests/redirects.test.ts +++ b/integration/tests/nextjs/redirects.test.ts @@ -1,8 +1,8 @@ import { test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { appConfigs } from '../../presets'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })('redirect props @nextjs', ({ app }) => { test.describe.configure({ mode: 'serial' }); diff --git a/integration/tests/reverification.test.ts b/integration/tests/nextjs/reverification.test.ts similarity index 97% rename from integration/tests/reverification.test.ts rename to integration/tests/nextjs/reverification.test.ts index e84631bcc11..10a642f982e 100644 --- a/integration/tests/reverification.test.ts +++ b/integration/tests/nextjs/reverification.test.ts @@ -1,11 +1,11 @@ import type { OrganizationMembershipRole } from '@clerk/backend'; import { expect, test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import type { FakeOrganization, FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; -import { stringPhoneNumber } from '../testUtils/phoneUtils'; -import { fakerPhoneNumber } from '../testUtils/usersService'; +import { appConfigs } from '../../presets'; +import type { FakeOrganization, FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; +import { stringPhoneNumber } from '../../testUtils/phoneUtils'; +import { fakerPhoneNumber } from '../../testUtils/usersService'; const utils = [ 'action', diff --git a/integration/tests/session-tasks-eject-flow.test.ts b/integration/tests/nextjs/session-tasks-eject-flow.test.ts similarity index 93% rename from integration/tests/session-tasks-eject-flow.test.ts rename to integration/tests/nextjs/session-tasks-eject-flow.test.ts index bc7ef2baa1c..631a1d9677b 100644 --- a/integration/tests/session-tasks-eject-flow.test.ts +++ b/integration/tests/nextjs/session-tasks-eject-flow.test.ts @@ -1,9 +1,9 @@ import { test } from '@playwright/test'; -import type { Application } from '../models/application'; -import { appConfigs } from '../presets'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils } from '../testUtils'; +import type { Application } from '../../models/application'; +import { appConfigs } from '../../presets'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils } from '../../testUtils'; test.describe('session tasks eject flow @nextjs', () => { test.describe.configure({ mode: 'serial' }); diff --git a/integration/tests/session-tasks-multi-session.test.ts b/integration/tests/nextjs/session-tasks-multi-session.test.ts similarity index 95% rename from integration/tests/session-tasks-multi-session.test.ts rename to integration/tests/nextjs/session-tasks-multi-session.test.ts index 6a77bb5d99c..ad419f33d04 100644 --- a/integration/tests/session-tasks-multi-session.test.ts +++ b/integration/tests/nextjs/session-tasks-multi-session.test.ts @@ -1,8 +1,8 @@ import { test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { appConfigs } from '../../presets'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; testAgainstRunningApps({ withEnv: [appConfigs.envs.withSessionTasks] })( 'session tasks multi-session flow @nextjs', diff --git a/integration/tests/session-tasks-setup-mfa.test.ts b/integration/tests/nextjs/session-tasks-setup-mfa.test.ts similarity index 97% rename from integration/tests/session-tasks-setup-mfa.test.ts rename to integration/tests/nextjs/session-tasks-setup-mfa.test.ts index af35b70d6de..96bfabe1bd1 100644 --- a/integration/tests/session-tasks-setup-mfa.test.ts +++ b/integration/tests/nextjs/session-tasks-setup-mfa.test.ts @@ -1,9 +1,9 @@ import { expect, test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; -import { stringPhoneNumber } from '../testUtils/phoneUtils'; -import { fakerPhoneNumber } from '../testUtils/usersService'; +import { appConfigs } from '../../presets'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; +import { stringPhoneNumber } from '../../testUtils/phoneUtils'; +import { fakerPhoneNumber } from '../../testUtils/usersService'; testAgainstRunningApps({ withEnv: [appConfigs.envs.withSessionTasksSetupMfa] })( 'session tasks setup-mfa flow @nextjs', diff --git a/integration/tests/session-tasks-sign-in-reset-password.test.ts b/integration/tests/nextjs/session-tasks-sign-in-reset-password.test.ts similarity index 96% rename from integration/tests/session-tasks-sign-in-reset-password.test.ts rename to integration/tests/nextjs/session-tasks-sign-in-reset-password.test.ts index 4322773bc43..72de5af5e26 100644 --- a/integration/tests/session-tasks-sign-in-reset-password.test.ts +++ b/integration/tests/nextjs/session-tasks-sign-in-reset-password.test.ts @@ -1,8 +1,8 @@ import { expect, test } from '@playwright/test'; -import { hash } from '../models/helpers'; -import { appConfigs } from '../presets'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { hash } from '../../models/helpers'; +import { appConfigs } from '../../presets'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; testAgainstRunningApps({ withEnv: [appConfigs.envs.withSessionTasksResetPassword] })( 'session tasks after sign-in reset password flow @nextjs', diff --git a/integration/tests/session-tasks-sign-in.test.ts b/integration/tests/nextjs/session-tasks-sign-in.test.ts similarity index 91% rename from integration/tests/session-tasks-sign-in.test.ts rename to integration/tests/nextjs/session-tasks-sign-in.test.ts index abb7d623b54..80065de42f8 100644 --- a/integration/tests/session-tasks-sign-in.test.ts +++ b/integration/tests/nextjs/session-tasks-sign-in.test.ts @@ -1,12 +1,12 @@ import { createClerkClient } from '@clerk/backend'; import { test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import { resolveInstanceKeys } from '../presets/envs'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; -import { withRetry } from '../testUtils/retryableClerkClient'; -import { createUserService } from '../testUtils/usersService'; +import { appConfigs } from '../../presets'; +import { resolveInstanceKeys } from '../../presets/envs'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; +import { withRetry } from '../../testUtils/retryableClerkClient'; +import { createUserService } from '../../testUtils/usersService'; testAgainstRunningApps({ withEnv: [appConfigs.envs.withSessionTasks] })( 'session tasks after sign-in flow @nextjs', diff --git a/integration/tests/session-tasks-sign-up.test.ts b/integration/tests/nextjs/session-tasks-sign-up.test.ts similarity index 90% rename from integration/tests/session-tasks-sign-up.test.ts rename to integration/tests/nextjs/session-tasks-sign-up.test.ts index 94146b53f5c..726acf88b22 100644 --- a/integration/tests/session-tasks-sign-up.test.ts +++ b/integration/tests/nextjs/session-tasks-sign-up.test.ts @@ -1,13 +1,13 @@ import { createClerkClient } from '@clerk/backend'; import { expect, test } from '@playwright/test'; -import { environmentConfig } from '../models/environment'; -import { appConfigs } from '../presets'; -import { resolveInstanceKeys } from '../presets/envs'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; -import { withRetry } from '../testUtils/retryableClerkClient'; -import { createUserService } from '../testUtils/usersService'; +import { environmentConfig } from '../../models/environment'; +import { appConfigs } from '../../presets'; +import { resolveInstanceKeys } from '../../presets/envs'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; +import { withRetry } from '../../testUtils/retryableClerkClient'; +import { createUserService } from '../../testUtils/usersService'; testAgainstRunningApps({ withEnv: [appConfigs.envs.withSessionTasks] })( 'session tasks after sign-up flow @nextjs', diff --git a/integration/tests/shared-ui-variant.test.ts b/integration/tests/nextjs/shared-ui-variant.test.ts similarity index 92% rename from integration/tests/shared-ui-variant.test.ts rename to integration/tests/nextjs/shared-ui-variant.test.ts index 3ca6641f855..c1c01a4170a 100644 --- a/integration/tests/shared-ui-variant.test.ts +++ b/integration/tests/nextjs/shared-ui-variant.test.ts @@ -1,7 +1,7 @@ import { expect, test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { appConfigs } from '../../presets'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; testAgainstRunningApps({ withEnv: [appConfigs.envs.withSharedUIVariant] })( 'shared React variant @nextjs', diff --git a/integration/tests/sign-in-or-up-component.test.ts b/integration/tests/nextjs/sign-in-or-up-component.test.ts similarity index 83% rename from integration/tests/sign-in-or-up-component.test.ts rename to integration/tests/nextjs/sign-in-or-up-component.test.ts index aaeb4a7a01d..889c6df81e5 100644 --- a/integration/tests/sign-in-or-up-component.test.ts +++ b/integration/tests/nextjs/sign-in-or-up-component.test.ts @@ -1,8 +1,8 @@ import { expect, test } from '@playwright/test'; -import type { Application } from '../models/application'; -import { appConfigs } from '../presets'; -import { createTestUtils } from '../testUtils'; +import type { Application } from '../../models/application'; +import { appConfigs } from '../../presets'; +import { createTestUtils } from '../../testUtils'; test.describe('sign-in-or-up component initialization flow @nextjs', () => { test.describe.configure({ mode: 'parallel' }); diff --git a/integration/tests/sign-in-or-up-flow.test.ts b/integration/tests/nextjs/sign-in-or-up-flow.test.ts similarity index 99% rename from integration/tests/sign-in-or-up-flow.test.ts rename to integration/tests/nextjs/sign-in-or-up-flow.test.ts index 5d1e7dde6b0..31c6f7b1e76 100644 --- a/integration/tests/sign-in-or-up-flow.test.ts +++ b/integration/tests/nextjs/sign-in-or-up-flow.test.ts @@ -1,7 +1,7 @@ import { expect, test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import { createTestUtils, type FakeUser, testAgainstRunningApps } from '../testUtils'; +import { appConfigs } from '../../presets'; +import { createTestUtils, type FakeUser, testAgainstRunningApps } from '../../testUtils'; testAgainstRunningApps({ withEnv: [appConfigs.envs.withSignInOrUpFlow] })('sign-in-or-up flow @nextjs', ({ app }) => { test.describe.configure({ mode: 'serial' }); diff --git a/integration/tests/sign-in-or-up-restricted-mode.test.ts b/integration/tests/nextjs/sign-in-or-up-restricted-mode.test.ts similarity index 85% rename from integration/tests/sign-in-or-up-restricted-mode.test.ts rename to integration/tests/nextjs/sign-in-or-up-restricted-mode.test.ts index 42fefc92f31..641d924cf7a 100644 --- a/integration/tests/sign-in-or-up-restricted-mode.test.ts +++ b/integration/tests/nextjs/sign-in-or-up-restricted-mode.test.ts @@ -1,9 +1,9 @@ import { expect, test } from '@playwright/test'; -import type { Application } from '../models/application'; -import { appConfigs } from '../presets'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils } from '../testUtils'; +import type { Application } from '../../models/application'; +import { appConfigs } from '../../presets'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils } from '../../testUtils'; test.describe('sign-in-or-up restricted mode @nextjs', () => { test.describe.configure({ mode: 'serial' }); diff --git a/integration/tests/testing-token.test.ts b/integration/tests/nextjs/testing-token.test.ts similarity index 99% rename from integration/tests/testing-token.test.ts rename to integration/tests/nextjs/testing-token.test.ts index ca18fe85a82..be92ff33446 100644 --- a/integration/tests/testing-token.test.ts +++ b/integration/tests/nextjs/testing-token.test.ts @@ -4,7 +4,7 @@ import type { AddressInfo } from 'node:net'; import { expect, type Page, test } from '@playwright/test'; -import { setupTestingTokens } from '../testUtils/setupTestingTokens'; +import { setupTestingTokens } from '../../testUtils/setupTestingTokens'; test.describe('OAuth testing tokens @nextjs', () => { let provider: Server; diff --git a/integration/tests/transitions.test.ts b/integration/tests/nextjs/transitions.test.ts similarity index 98% rename from integration/tests/transitions.test.ts rename to integration/tests/nextjs/transitions.test.ts index a80b3d8706c..27b0856b2bd 100644 --- a/integration/tests/transitions.test.ts +++ b/integration/tests/nextjs/transitions.test.ts @@ -2,9 +2,9 @@ import { parsePublishableKey } from '@clerk/shared/keys'; import { clerkSetup } from '@clerk/testing/playwright'; import { test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import type { FakeOrganization, FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { appConfigs } from '../../presets'; +import type { FakeOrganization, FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; /* These tests try to verify some existing transition behaviors. They are not comprehensive, and do not necessarily diff --git a/integration/tests/transitive-state.test.ts b/integration/tests/nextjs/transitive-state.test.ts similarity index 98% rename from integration/tests/transitive-state.test.ts rename to integration/tests/nextjs/transitive-state.test.ts index 1026d593476..5f4e0d92fb5 100644 --- a/integration/tests/transitive-state.test.ts +++ b/integration/tests/nextjs/transitive-state.test.ts @@ -2,9 +2,9 @@ import { parsePublishableKey } from '@clerk/shared/keys'; import { clerkSetup } from '@clerk/testing/playwright'; import { expect, test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import type { FakeOrganization, FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { appConfigs } from '../../presets'; +import type { FakeOrganization, FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; /* These tests verify that useAuth emits the correct transitive state sequence when switching diff --git a/integration/tests/unsafeMetadata.test.ts b/integration/tests/nextjs/unsafeMetadata.test.ts similarity index 98% rename from integration/tests/unsafeMetadata.test.ts rename to integration/tests/nextjs/unsafeMetadata.test.ts index 72e2770b5ab..6c573842f8d 100644 --- a/integration/tests/unsafeMetadata.test.ts +++ b/integration/tests/nextjs/unsafeMetadata.test.ts @@ -1,7 +1,7 @@ import { expect, test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { appConfigs } from '../../presets'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })('unsafeMetadata @nextjs', ({ app }) => { test.describe.configure({ mode: 'parallel' }); diff --git a/integration/tests/middleware-placement.test.ts b/integration/tests/quickstart/middleware-placement.test.ts similarity index 96% rename from integration/tests/middleware-placement.test.ts rename to integration/tests/quickstart/middleware-placement.test.ts index 31db473590b..f4357e54309 100644 --- a/integration/tests/middleware-placement.test.ts +++ b/integration/tests/quickstart/middleware-placement.test.ts @@ -1,11 +1,11 @@ import { expect, test } from '@playwright/test'; import path from 'path'; -import type { Application } from '../models/application'; -import { stateFile } from '../models/stateFile'; -import { appConfigs } from '../presets'; -import { fs } from '../scripts'; -import { createTestUtils } from '../testUtils'; +import type { Application } from '../../models/application'; +import { stateFile } from '../../models/stateFile'; +import { appConfigs } from '../../presets'; +import { fs } from '../../scripts'; +import { createTestUtils } from '../../testUtils'; function parseSemverMajor(range?: string): number | undefined { if (!range) { diff --git a/integration/tests/next-quickstart-keyless.test.ts b/integration/tests/quickstart/next-quickstart-keyless.test.ts similarity index 89% rename from integration/tests/next-quickstart-keyless.test.ts rename to integration/tests/quickstart/next-quickstart-keyless.test.ts index ef9df6cf772..7dbd994c73c 100644 --- a/integration/tests/next-quickstart-keyless.test.ts +++ b/integration/tests/quickstart/next-quickstart-keyless.test.ts @@ -2,11 +2,11 @@ import * as path from 'node:path'; import { expect, test } from '@playwright/test'; -import type { Application } from '../models/application'; -import { appConfigs } from '../presets'; -import { fs } from '../scripts'; -import { createTestUtils } from '../testUtils'; -import { mockClaimedInstanceEnvironmentCall } from '../testUtils/keylessHelpers'; +import type { Application } from '../../models/application'; +import { appConfigs } from '../../presets'; +import { fs } from '../../scripts'; +import { createTestUtils } from '../../testUtils'; +import { mockClaimedInstanceEnvironmentCall } from '../../testUtils/keylessHelpers'; const commonSetup = appConfigs.next.appRouterQuickstart.clone(); diff --git a/integration/tests/next-quickstart.test.ts b/integration/tests/quickstart/next-quickstart.test.ts similarity index 95% rename from integration/tests/next-quickstart.test.ts rename to integration/tests/quickstart/next-quickstart.test.ts index 4101f47cfff..3173343f571 100644 --- a/integration/tests/next-quickstart.test.ts +++ b/integration/tests/quickstart/next-quickstart.test.ts @@ -1,8 +1,8 @@ import { expect, test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { appConfigs } from '../../presets'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodesQuickstart] })('nextjs @quickstart', ({ app }) => { test.describe.configure({ mode: 'serial' }); diff --git a/integration/tests/snapshots/appearance.test.ts-snapshots/appearance-prop-all-clerk-themes-render-1-chrome-darwin.png b/integration/tests/snapshots/unscheduled/appearance.test.ts-snapshots/appearance-prop-all-clerk-themes-render-1-chrome-darwin.png similarity index 100% rename from integration/tests/snapshots/appearance.test.ts-snapshots/appearance-prop-all-clerk-themes-render-1-chrome-darwin.png rename to integration/tests/snapshots/unscheduled/appearance.test.ts-snapshots/appearance-prop-all-clerk-themes-render-1-chrome-darwin.png diff --git a/integration/tests/appearance.test.ts b/integration/tests/unscheduled/appearance.test.ts similarity index 91% rename from integration/tests/appearance.test.ts rename to integration/tests/unscheduled/appearance.test.ts index 1773312833d..047c077ce90 100644 --- a/integration/tests/appearance.test.ts +++ b/integration/tests/unscheduled/appearance.test.ts @@ -1,8 +1,8 @@ import { expect, test } from '@playwright/test'; -import type { Application } from '../models/application'; -import { appConfigs } from '../presets'; -import { createTestUtils } from '../testUtils'; +import type { Application } from '../../models/application'; +import { appConfigs } from '../../presets'; +import { createTestUtils } from '../../testUtils'; test.describe('appearance prop', () => { test.describe.configure({ mode: 'parallel' }); diff --git a/integration/tests/bundled-ui.test.ts b/integration/tests/unscheduled/bundled-ui.test.ts similarity index 96% rename from integration/tests/bundled-ui.test.ts rename to integration/tests/unscheduled/bundled-ui.test.ts index 7b11fa6d8f7..3157e10e880 100644 --- a/integration/tests/bundled-ui.test.ts +++ b/integration/tests/unscheduled/bundled-ui.test.ts @@ -1,8 +1,8 @@ import { expect, test } from '@playwright/test'; -import { appConfigs } from '../presets'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import { appConfigs } from '../../presets'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; testAgainstRunningApps({ withPattern: ['next.appRouterBundledUI.*'] })( 'bundled UI smoke tests @bundled-ui', diff --git a/integration/tests/db-jwt.test.ts b/integration/tests/unscheduled/db-jwt.test.ts similarity index 94% rename from integration/tests/db-jwt.test.ts rename to integration/tests/unscheduled/db-jwt.test.ts index d6ced6b2e11..ec4bdbcdf46 100644 --- a/integration/tests/db-jwt.test.ts +++ b/integration/tests/unscheduled/db-jwt.test.ts @@ -1,9 +1,9 @@ import { test } from '@playwright/test'; -import type { Application } from '../models/application'; -import { appConfigs } from '../presets'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils } from '../testUtils'; +import type { Application } from '../../models/application'; +import { appConfigs } from '../../presets'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils } from '../../testUtils'; test.describe('Dev browser test', () => { const configs = []; diff --git a/integration/tests/email-link.test.ts b/integration/tests/unscheduled/email-link.test.ts similarity index 96% rename from integration/tests/email-link.test.ts rename to integration/tests/unscheduled/email-link.test.ts index 76001647a6d..c6014f86589 100644 --- a/integration/tests/email-link.test.ts +++ b/integration/tests/unscheduled/email-link.test.ts @@ -1,9 +1,9 @@ import type { Browser, BrowserContext, Page } from '@playwright/test'; import { test } from '@playwright/test'; -import type { Application } from '../models/application'; -import { appConfigs } from '../presets'; -import { createTestUtils } from '../testUtils'; +import type { Application } from '../../models/application'; +import { appConfigs } from '../../presets'; +import { createTestUtils } from '../../testUtils'; test.describe('sign up and sign in using email link', () => { const configs = []; diff --git a/integration/tests/restricted-mode.test.ts b/integration/tests/unscheduled/restricted-mode.test.ts similarity index 94% rename from integration/tests/restricted-mode.test.ts rename to integration/tests/unscheduled/restricted-mode.test.ts index 92dae0dbbfe..108120ed501 100644 --- a/integration/tests/restricted-mode.test.ts +++ b/integration/tests/unscheduled/restricted-mode.test.ts @@ -1,9 +1,9 @@ import { expect, test } from '@playwright/test'; -import type { Application } from '../models/application'; -import { appConfigs } from '../presets'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils } from '../testUtils'; +import type { Application } from '../../models/application'; +import { appConfigs } from '../../presets'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils } from '../../testUtils'; test.describe('Sign-up restricted mode', () => { test.describe.configure({ mode: 'serial' }); diff --git a/integration/tests/sign-in-or-up-email-links-flow.test.ts b/integration/tests/unscheduled/sign-in-or-up-email-links-flow.test.ts similarity index 94% rename from integration/tests/sign-in-or-up-email-links-flow.test.ts rename to integration/tests/unscheduled/sign-in-or-up-email-links-flow.test.ts index 77a856f20c9..1515f21c848 100644 --- a/integration/tests/sign-in-or-up-email-links-flow.test.ts +++ b/integration/tests/unscheduled/sign-in-or-up-email-links-flow.test.ts @@ -1,7 +1,7 @@ import { expect, test } from '@playwright/test'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils, testAgainstRunningApps } from '../testUtils'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils, testAgainstRunningApps } from '../../testUtils'; testAgainstRunningApps({ withEnv: [] })('sign-in-or-up email links flow', ({ app }) => { test.describe.configure({ mode: 'serial' }); diff --git a/integration/tests/waitlist-mode.test.ts b/integration/tests/unscheduled/waitlist-mode.test.ts similarity index 96% rename from integration/tests/waitlist-mode.test.ts rename to integration/tests/unscheduled/waitlist-mode.test.ts index 1961e0ea449..15024960a19 100644 --- a/integration/tests/waitlist-mode.test.ts +++ b/integration/tests/unscheduled/waitlist-mode.test.ts @@ -1,9 +1,9 @@ import { expect, test } from '@playwright/test'; -import type { Application } from '../models/application'; -import { appConfigs } from '../presets'; -import type { FakeUser } from '../testUtils'; -import { createTestUtils } from '../testUtils'; +import type { Application } from '../../models/application'; +import { appConfigs } from '../../presets'; +import type { FakeUser } from '../../testUtils'; +import { createTestUtils } from '../../testUtils'; test.describe('Waitlist mode', () => { test.describe.configure({ mode: 'parallel' }); diff --git a/scripts/integration-hash-matrix.mjs b/scripts/integration-hash-matrix.mjs index 2997e1bdbdb..74354e0d184 100644 --- a/scripts/integration-hash-matrix.mjs +++ b/scripts/integration-hash-matrix.mjs @@ -10,7 +10,7 @@ const scenarios = [ ['shared', 'packages/shared/src/index.ts'], ['expo', 'packages/expo/src/index.ts'], ['mosaic', 'packages/mosaic/src/global.d.ts'], - ['test file', 'integration/tests/sign-in-flow.test.ts'], + ['test file', 'integration/tests/generic/sign-in-flow.test.ts'], ['vue test', 'integration/tests/vue/components.test.ts'], ['expo-native', 'integration/expo-native/README.md'], ]; diff --git a/turbo.json b/turbo.json index 990a630e98e..e202c4d52a5 100644 --- a/turbo.json +++ b/turbo.json @@ -261,7 +261,7 @@ "integration/{certs,cleanup,configs,deployments,models,presets,scripts,testUtils}/**", "integration/tests/*", "integration/tests/snapshots/**", - "integration/tests/session-token-cache/**", + "integration/tests/{generic,session-token-cache}/**", "integration/templates/*", "integration/templates/{custom-flows-react-vite,next-app-router,react-vite,vue-vite}/**" ], @@ -342,7 +342,7 @@ "integration/{certs,cleanup,configs,deployments,models,presets,scripts,testUtils}/**", "integration/tests/*", "integration/tests/snapshots/**", - "integration/tests/{nextjs,session-token-cache}/**", + "integration/tests/{generic,nextjs,session-token-cache}/**", "integration/templates/*", "integration/templates/{next-app-router,react-vite}/**" ], @@ -357,7 +357,7 @@ "integration/{certs,cleanup,configs,deployments,models,presets,scripts,testUtils}/**", "integration/tests/*", "integration/tests/snapshots/**", - "integration/tests/{nextjs,session-token-cache}/**", + "integration/tests/{generic,nextjs,session-token-cache}/**", "integration/templates/*", "integration/templates/{next-app-router,react-vite}/**" ], @@ -379,6 +379,7 @@ "integration/{certs,cleanup,configs,deployments,models,presets,scripts,testUtils}/**", "integration/tests/*", "integration/tests/snapshots/**", + "integration/tests/quickstart/**", "integration/templates/*", "integration/templates/next-app-router-quickstart/**" ], @@ -577,7 +578,7 @@ "integration/{certs,cleanup,configs,deployments,models,presets,scripts,testUtils}/**", "integration/tests/*", "integration/tests/snapshots/**", - "integration/tests/astro/**", + "integration/tests/{astro,billing}/**", "integration/templates/*", "integration/templates/{astro-node,next-app-router,vue-vite}/**" ], @@ -604,7 +605,7 @@ "integration/{certs,cleanup,configs,deployments,models,presets,scripts,testUtils}/**", "integration/tests/*", "integration/tests/snapshots/**", - "integration/tests/{astro,express,fastify,hono,nuxt,react-router,tanstack-start}/**", + "integration/tests/{astro,express,fastify,hono,machine,nuxt,react-router,tanstack-start}/**", "integration/templates/*", "integration/templates/{astro-node,express-vite,fastify-vite,hono-vite,next-app-router,nuxt-node,react-router-node,tanstack-react-start}/**" ], @@ -619,7 +620,7 @@ "integration/{certs,cleanup,configs,deployments,models,presets,scripts,testUtils}/**", "integration/tests/*", "integration/tests/snapshots/**", - "integration/tests/custom-flows/**", + "integration/tests/{custom-flows,generic}/**", "integration/templates/*", "integration/templates/{custom-flows-react-vite,react-vite}/**" ], @@ -634,6 +635,7 @@ "integration/{certs,cleanup,configs,deployments,models,presets,scripts,testUtils}/**", "integration/tests/*", "integration/tests/snapshots/**", + "integration/tests/cache-components/**", "integration/templates/*", "integration/templates/next-cache-components/**" ],