Skip to content
Merged
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
17 changes: 11 additions & 6 deletions integration/tests/session-tasks-multi-session.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,12 +66,17 @@ testAgainstRunningApps({ withEnv: [appConfigs.envs.withSessionTasks] })(
await u.po.signIn.setPassword(user2.password);
await u.po.signIn.continue();

// Sign-in again back with active session
await u.po.signIn.goTo();
await u.po.signIn.setIdentifier(user1.email);
await u.po.signIn.continue();
await u.po.signIn.setPassword(user1.password);
await u.po.signIn.continue();
Comment on lines -70 to -74

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The user is already signed in, so it felt more correct to switch the session via the user button instead.

// If the subsequent session touch call happens too quickly, the backend will rate limit it and not update the session activity timestamp.
// To get around this rate limit, and realistically emulate a more human-like pace, we add an arbitrary delay here
await new Promise(resolve => setTimeout(resolve, 3000));

// Select the active session
await u.page.goToRelative('/');
await u.po.userButton.waitForMounted();
await u.po.userButton.toggleTrigger();
await u.po.userButton.waitForPopover();
await u.po.userButton.switchAccount(user1.email);
await u.po.userButton.waitForPopoverClosed();

// Navigate to protected page, with active session, where user button gets rendered
await u.page.goToRelative('/user-button');
Expand Down
Loading