-
Notifications
You must be signed in to change notification settings - Fork 320
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add
with-session-tasks
to integration tests
- Loading branch information
1 parent
b9f8870
commit 0a1d36d
Showing
15 changed files
with
108 additions
and
97 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 |
---|---|---|
|
@@ -3,4 +3,4 @@ | |
'@clerk/types': patch | ||
--- | ||
|
||
Navigate to session tasks | ||
Navigate to session task |
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 |
---|---|---|
|
@@ -46,5 +46,9 @@ | |
"with-waitlist-mode": { | ||
"pk": "", | ||
"sk": "" | ||
}, | ||
"with-session-tasks": { | ||
"pk": "", | ||
"sk": "" | ||
} | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,44 @@ | ||
import { test } from '@playwright/test'; | ||
|
||
import { appConfigs } from '../presets'; | ||
import { testAgainstRunningApps } from '../testUtils'; | ||
import type { FakeUser } from '../testUtils'; | ||
import { createTestUtils, testAgainstRunningApps } from '../testUtils'; | ||
|
||
// TODO ORGS-566 - Write integration tests for after-auth flow | ||
testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })('after-auth flows @generic @nextjs', () => { | ||
describe('after sign-in', () => { | ||
// /sign-in -> /sign-in/select-organization | ||
it.todo('navigates to tasks'); | ||
testAgainstRunningApps({ withEnv: [appConfigs.envs.withEmailCodes] })('sign in flow @generic @nextjs', ({ app }) => { | ||
test.describe.configure({ mode: 'serial' }); | ||
|
||
// /sign-in -> /sign-in/select-organization -> /app (after-sign-in URL) | ||
it.todo('navigates to after-sign-in URL when tasks get resolved'); | ||
let fakeUser: FakeUser; | ||
|
||
// with session status pending -> accesses /sign-in -> redirects to /sign-in/select-organization | ||
it.todo('on single-session mode, sign-in redirects back to tasks when accessed with a pending session'); | ||
test.beforeAll(async () => { | ||
const u = createTestUtils({ app }); | ||
fakeUser = u.services.users.createFakeUser({ | ||
withPhoneNumber: true, | ||
withUsername: true, | ||
}); | ||
await u.services.users.createBapiUser(fakeUser); | ||
}); | ||
|
||
describe('after sign-up', () => { | ||
// /sign-up -> /sign-up/select-organization | ||
it.todo('navigates to tasks'); | ||
test.afterAll(async () => { | ||
await fakeUser.deleteIfExists(); | ||
await app.teardown(); | ||
}); | ||
|
||
// /sign-up -> /sign-up/select-organization -> /app/welcome (after-sign-up URL) | ||
it.todo('navigates to after-sign-up URL when tasks get resolved'); | ||
test.describe('after sign-in', () => { | ||
test('navigates to tasks', () => {}); | ||
|
||
// with session status pending -> accesses /sign-up -> redirects to /sign-up/select-organization | ||
it.todo('on single-session mode, sign-up redirects back to tasks when accessed with a pending session'); | ||
// with session status pending -> accesses /sign-in -> redirects to /sign-in/select-organization | ||
test('on single-session mode, sign-in redirects back to tasks when accessed with a pending session', () => {}); | ||
}); | ||
|
||
describe('when user is using the app and session transitions to active to pending', () => { | ||
// /my-dashboard/recipes -> /sign-in/select-organization | ||
it.todo('on session transition to pending with tasks, redirects to tasks'); | ||
test.describe('after sign-in', () => { | ||
test('navigates to tasks', () => {}); | ||
|
||
// /my-dashboard/recipes -> /sign-in/select-organization -> /my-dashboard/recipes | ||
it.todo('navigates to middle app origin when tasks get resolved'); | ||
// with session status pending -> accesses /sign-in -> redirects to /sign-in/select-organization | ||
test('on single-session mode, sign-up redirects back to tasks when accessed with a pending session', () => {}); | ||
}); | ||
|
||
test.describe('when user is using the app and session transitions to active to pending', () => { | ||
// /my-dashboard/recipes -> /sign-in/select-organization | ||
test('on session transition to pending with tasks, redirects to tasks', () => {}); | ||
}); | ||
}); |
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
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
Oops, something went wrong.