Skip to content

Commit ace299f

Browse files
test(e2e): move integration tests into suite directories
Each suite's tests now live under integration/tests/<suite>/, so a suite's turbo inputs are its own directory rather than every top-level test file. Tests tagged for both generic and nextjs live in generic/, and the seven tests no suite tag selects live in unscheduled/. Only the import depth changed inside the moved files.
1 parent 7a353e8 commit ace299f

69 files changed

Lines changed: 226 additions & 222 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎.claude/skills/clerk-monorepo/SKILL.md‎

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,10 @@ How the cache key is built:
150150
`@clerk/clerk-js`, `@clerk/ui` and `@clerk/testing`, plus the framework packages that suite's apps
151151
add. Turbo folds those build hashes into the suite hash, and package builds already depend on
152152
`^build`, so transitive packages such as `@clerk/shared` are covered without being listed.
153-
- `inputs` covers the harness, the top-level test files, the test directories the suite's tagged tests
154-
live in (and import from), and the templates its apps copy. Other suites' directories are not inputs.
153+
- `inputs` covers the harness, the test directories the suite's tagged tests live in (and import
154+
from), and the templates its apps copy. Other suites' directories are not inputs. Tests live under
155+
`integration/tests/<suite>/`; a test tagged for several suites lives in `generic/`, and tests no
156+
suite runs live in `unscheduled/`.
155157
- `scripts/integration-deps.test.mjs` derives both lists from `integration/presets` and the tagged
156158
tests and fails when `turbo.json` drifts. Its failure message prints the block to paste.
157159

integration/tests/billing-hooks.test.ts renamed to integration/tests/billing/billing-hooks.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { expect, test } from '@playwright/test';
22

3-
import type { FakeUser } from '../testUtils';
4-
import { createTestUtils, testAgainstRunningApps } from '../testUtils';
3+
import type { FakeUser } from '../../testUtils';
4+
import { createTestUtils, testAgainstRunningApps } from '../../testUtils';
55

66
testAgainstRunningApps({})('billing hooks @billing', ({ app }) => {
77
test.describe.configure({ mode: 'parallel' });

integration/tests/per-seat-pricing.test.ts renamed to integration/tests/billing/per-seat-pricing.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import { expect, test } from '@playwright/test';
22

3-
import type { FakeOrganization, FakeUser } from '../testUtils';
4-
import { createTestUtils, testAgainstRunningApps } from '../testUtils';
3+
import type { FakeOrganization, FakeUser } from '../../testUtils';
4+
import { createTestUtils, testAgainstRunningApps } from '../../testUtils';
55

66
const INVITEE_EMAIL = 'one+clerk_test@clerk.dev';
77

integration/tests/pricing-table.test.ts renamed to integration/tests/billing/pricing-table.test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import type { Locator } from '@playwright/test';
22
import { expect, test } from '@playwright/test';
33

4-
import type { FakeUser } from '../testUtils';
5-
import { createTestUtils, testAgainstRunningApps } from '../testUtils';
4+
import type { FakeUser } from '../../testUtils';
5+
import { createTestUtils, testAgainstRunningApps } from '../../testUtils';
66

77
testAgainstRunningApps({})('pricing table @billing', ({ app }) => {
88
test.describe.configure({ mode: 'parallel' });

integration/tests/cache-components.test.ts renamed to integration/tests/cache-components/cache-components.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { expect, test } from '@playwright/test';
22

3-
import { appConfigs } from '../presets';
4-
import type { FakeUser } from '../testUtils';
5-
import { createTestUtils, testAgainstRunningApps } from '../testUtils';
3+
import { appConfigs } from '../../presets';
4+
import type { FakeUser } from '../../testUtils';
5+
import { createTestUtils, testAgainstRunningApps } from '../../testUtils';
66

77
testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes], withPattern: ['next.cacheComponents'] })(
88
'Next.js Cache Components @cache-components',

integration/tests/client-trust.test.ts renamed to integration/tests/generic/client-trust.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { expect, test } from '@playwright/test';
22

3-
import { appConfigs } from '../presets';
4-
import type { FakeUser } from '../testUtils';
5-
import { createTestUtils, testAgainstRunningApps } from '../testUtils';
3+
import { appConfigs } from '../../presets';
4+
import type { FakeUser } from '../../testUtils';
5+
import { createTestUtils, testAgainstRunningApps } from '../../testUtils';
66

77
testAgainstRunningApps({ withEnv: [appConfigs.envs.withNeedsClientTrust] })(
88
'client trust flow @generic @nextjs',

integration/tests/components.test.ts renamed to integration/tests/generic/components.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import { expect, test } from '@playwright/test';
22

3-
import { appConfigs } from '../presets';
4-
import type { FakeOrganization, FakeUser } from '../testUtils';
5-
import { createTestUtils, testAgainstRunningApps } from '../testUtils';
3+
import { appConfigs } from '../../presets';
4+
import type { FakeOrganization, FakeUser } from '../../testUtils';
5+
import { createTestUtils, testAgainstRunningApps } from '../../testUtils';
66

77
testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })('component smoke tests @generic', ({ app }) => {
88
let fakeUser: FakeUser;

integration/tests/composed-components.test.ts renamed to integration/tests/generic/composed-components.test.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
import { type BrowserContext, expect, type Page, test } from '@playwright/test';
22

3-
import type { Application } from '../models/application';
4-
import { appConfigs } from '../presets';
5-
import { PKGLAB } from '../presets/utils';
6-
import type { FakeOrganization, FakeUser } from '../testUtils';
7-
import { createTestUtils } from '../testUtils';
8-
import { stringPhoneNumber } from '../testUtils/phoneUtils';
3+
import type { Application } from '../../models/application';
4+
import { appConfigs } from '../../presets';
5+
import { PKGLAB } from '../../presets/utils';
6+
import type { FakeOrganization, FakeUser } from '../../testUtils';
7+
import { createTestUtils } from '../../testUtils';
8+
import { stringPhoneNumber } from '../../testUtils/phoneUtils';
99

1010
/**
1111
* E2E parity coverage for the experimental composed exports from `@clerk/ui/experimental`.

integration/tests/custom-pages.test.ts renamed to integration/tests/generic/custom-pages.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* eslint-disable turbo/no-undeclared-env-vars */
22
import { expect, test } from '@playwright/test';
33

4-
import type { Application } from '../models/application';
5-
import type { CreateAppPageObjectArgs, FakeUser } from '../testUtils';
6-
import { createTestUtils, testAgainstRunningApps } from '../testUtils';
4+
import type { Application } from '../../models/application';
5+
import type { CreateAppPageObjectArgs, FakeUser } from '../../testUtils';
6+
import { createTestUtils, testAgainstRunningApps } from '../../testUtils';
77

88
const CUSTOM_PROFILE_PAGE = '/custom-user-profile';
99
const CUSTOM_BUTTON_PAGE = '/custom-user-button';

integration/tests/dev-browser-partitioned-cookies.test.ts renamed to integration/tests/generic/dev-browser-partitioned-cookies.test.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
import { expect, test } from '@playwright/test';
22
import { parsePublishableKey } from '@clerk/shared/keys';
33

4-
import { appConfigs } from '../presets';
5-
import type { FakeUser } from '../testUtils';
6-
import { createTestUtils, testAgainstRunningApps } from '../testUtils';
4+
import { appConfigs } from '../../presets';
5+
import type { FakeUser } from '../../testUtils';
6+
import { createTestUtils, testAgainstRunningApps } from '../../testUtils';
77

88
testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })(
99
'dev browser partitioned cookies @generic',

0 commit comments

Comments
 (0)