-
Notifications
You must be signed in to change notification settings - Fork 253
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(e2e): Add tests for Account Portal flows with both clerk v4 and …
…v5 (#2998) * test(e2e): Add tests for Account Portal flows with both clerk v4 and v5 * test(e2e): Add fallback to npmjs when Verdaccio cannot find a package * chore(e2e): Publish on `e2e` tag for tests * chore(e2e): Exit pre mode to release on verdaccio * chore(e2e): Exit pre mode to release on verdaccio * chore(e2e): Use different config for Verdaccio when publishing * test(e2e): Group duplicated code on AP tests * test(e2e): Add webkit project and increase the timeout to 90s * fix(shared): Fix issue when clearing the hash DB JWT in Webkit * chore(e2e): Init the webkit browser * chore(e2e): Clear Action cache * chore(e2e): Fix tests that break on webkit * chore(e2e): Run webkit tests in different jobs * chore(e2e): Exclude some webkit tests * chore(e2e): Exclude all webkit tests * chore(e2e): Remove webkit from installing on CI
- Loading branch information
Showing
21 changed files
with
460 additions
and
34 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@clerk/shared': patch | ||
--- | ||
|
||
Fix issue when clearing the hash DB JWT in Webkit |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
--- | ||
--- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
5 changes: 4 additions & 1 deletion
5
integration/templates/next-app-router-quickstart/src/app/page.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
40 changes: 40 additions & 0 deletions
40
integration/tests/next-account-portal/clerk-v4-ap-core-1.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
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 { testSignIn, testSignUp, testSSR } from './common'; | ||
|
||
test.describe('Next with ClerkJS V4 <-> Account Portal Core 1 @ap-flows', () => { | ||
test.describe.configure({ mode: 'serial' }); | ||
let app: Application; | ||
let fakeUser: FakeUser; | ||
|
||
test.beforeAll(async () => { | ||
app = await appConfigs.next.appRouterAPWithClerkNextV4.clone().commit(); | ||
await app.setup(); | ||
await app.withEnv(appConfigs.envs.withAPCore1ClerkV4); | ||
await app.dev(); | ||
const u = createTestUtils({ app }); | ||
fakeUser = u.services.users.createFakeUser(); | ||
await u.services.users.createBapiUser(fakeUser); | ||
}); | ||
|
||
test.afterAll(async () => { | ||
await fakeUser.deleteIfExists(); | ||
await app.teardown(); | ||
}); | ||
|
||
test('sign in', async ({ page, context }) => { | ||
await testSignIn({ app, page, context, fakeUser }); | ||
}); | ||
|
||
test('sign up', async ({ page, context }) => { | ||
await testSignUp({ app, page, context, fakeUser }); | ||
}); | ||
|
||
test('ssr', async ({ page, context }) => { | ||
await testSSR({ app, page, context, fakeUser }); | ||
}); | ||
}); |
40 changes: 40 additions & 0 deletions
40
integration/tests/next-account-portal/clerk-v4-ap-core-2.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
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 { testSignIn, testSignUp, testSSR } from './common'; | ||
|
||
test.describe('Next with ClerkJS V4 <-> Account Portal Core 2 @ap-flows', () => { | ||
test.describe.configure({ mode: 'serial' }); | ||
let app: Application; | ||
let fakeUser: FakeUser; | ||
|
||
test.beforeAll(async () => { | ||
app = await appConfigs.next.appRouterAPWithClerkNextV4.clone().commit(); | ||
await app.setup(); | ||
await app.withEnv(appConfigs.envs.withAPCore2ClerkV4); | ||
await app.dev(); | ||
const u = createTestUtils({ app }); | ||
fakeUser = u.services.users.createFakeUser(); | ||
await u.services.users.createBapiUser(fakeUser); | ||
}); | ||
|
||
test.afterAll(async () => { | ||
await fakeUser.deleteIfExists(); | ||
await app.teardown(); | ||
}); | ||
|
||
test('sign in', async ({ page, context }) => { | ||
await testSignIn({ app, page, context, fakeUser }); | ||
}); | ||
|
||
test('sign up', async ({ page, context }) => { | ||
await testSignUp({ app, page, context, fakeUser }); | ||
}); | ||
|
||
test('ssr', async ({ page, context }) => { | ||
await testSSR({ app, page, context, fakeUser }); | ||
}); | ||
}); |
40 changes: 40 additions & 0 deletions
40
integration/tests/next-account-portal/clerk-v5-ap-core-1.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
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 { testSignIn, testSignUp, testSSR } from './common'; | ||
|
||
test.describe('Next with ClerkJS V5 <-> Account Portal Core 1 @ap-flows', () => { | ||
test.describe.configure({ mode: 'serial' }); | ||
let app: Application; | ||
let fakeUser: FakeUser; | ||
|
||
test.beforeAll(async () => { | ||
app = await appConfigs.next.appRouterAPWithClerkNextLatest.clone().commit(); | ||
await app.setup(); | ||
await app.withEnv(appConfigs.envs.withAPCore1ClerkLatest); | ||
await app.dev(); | ||
const u = createTestUtils({ app }); | ||
fakeUser = u.services.users.createFakeUser(); | ||
await u.services.users.createBapiUser(fakeUser); | ||
}); | ||
|
||
test.afterAll(async () => { | ||
await fakeUser.deleteIfExists(); | ||
await app.teardown(); | ||
}); | ||
|
||
test('sign in', async ({ page, context }) => { | ||
await testSignIn({ app, page, context, fakeUser }); | ||
}); | ||
|
||
test('sign up', async ({ page, context }) => { | ||
await testSignUp({ app, page, context, fakeUser }); | ||
}); | ||
|
||
test('ssr', async ({ page, context }) => { | ||
await testSSR({ app, page, context, fakeUser }); | ||
}); | ||
}); |
40 changes: 40 additions & 0 deletions
40
integration/tests/next-account-portal/clerk-v5-ap-core-2.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
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 { testSignIn, testSignUp, testSSR } from './common'; | ||
|
||
test.describe('Next with ClerkJS V5 <-> Account Portal Core 2 @ap-flows', () => { | ||
test.describe.configure({ mode: 'serial' }); | ||
let app: Application; | ||
let fakeUser: FakeUser; | ||
|
||
test.beforeAll(async () => { | ||
app = await appConfigs.next.appRouterAPWithClerkNextLatest.clone().commit(); | ||
await app.setup(); | ||
await app.withEnv(appConfigs.envs.withAPCore2ClerkLatest); | ||
await app.dev(); | ||
const u = createTestUtils({ app }); | ||
fakeUser = u.services.users.createFakeUser(); | ||
await u.services.users.createBapiUser(fakeUser); | ||
}); | ||
|
||
test.afterAll(async () => { | ||
await fakeUser.deleteIfExists(); | ||
await app.teardown(); | ||
}); | ||
|
||
test('sign in', async ({ page, context }) => { | ||
await testSignIn({ app, page, context, fakeUser }); | ||
}); | ||
|
||
test('sign up', async ({ page, context }) => { | ||
await testSignUp({ app, page, context, fakeUser }); | ||
}); | ||
|
||
test('ssr', async ({ page, context }) => { | ||
await testSSR({ app, page, context, fakeUser }); | ||
}); | ||
}); |
Oops, something went wrong.