Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .claude/skills/clerk-monorepo/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -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/<suite>/`; 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.

Expand Down
Original file line number Diff line number Diff line change
@@ -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' });
Expand Down
Original file line number Diff line number Diff line change
@@ -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';

Expand Down
Original file line number Diff line number Diff line change
@@ -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' });
Expand Down
Original file line number Diff line number Diff line change
@@ -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',
Expand Down
Original file line number Diff line number Diff line change
@@ -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',
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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`.
Expand Down
Original file line number Diff line number Diff line change
@@ -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';
Expand Down
Original file line number Diff line number Diff line change
@@ -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',
Expand Down
Original file line number Diff line number Diff line change
@@ -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];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
Original file line number Diff line number Diff line change
@@ -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' });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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',
Expand Down
Original file line number Diff line number Diff line change
@@ -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' });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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',
Expand Down
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
Original file line number Diff line number Diff line change
@@ -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(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 => {
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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' });
Expand Down
Original file line number Diff line number Diff line change
@@ -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' });
Expand Down
Original file line number Diff line number Diff line change
@@ -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' });
Expand Down
Original file line number Diff line number Diff line change
@@ -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' });
Expand Down
Original file line number Diff line number Diff line change
@@ -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],
Expand Down
Original file line number Diff line number Diff line change
@@ -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' });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
Original file line number Diff line number Diff line change
@@ -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,
Expand Down
Loading
Loading