We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 38fbdf3 commit 69bf0dfCopy full SHA for 69bf0df
tests/playwright-utils.ts
@@ -94,10 +94,14 @@ export const test = base.extend<{
94
authSession.set(sessionKey, session.id)
95
const cookieConfig = setCookieParser.parseString(
96
await authSessionStorage.commitSession(authSession),
97
- ) as any
98
- await page
99
- .context()
100
- .addCookies([{ ...cookieConfig, domain: 'localhost' }])
+ )
+ const newConfig = {
+ ...cookieConfig,
+ domain: 'localhost',
101
+ expires: cookieConfig.expires?.getTime(),
102
+ sameSite: cookieConfig.sameSite as 'Strict' | 'Lax' | 'None',
103
+ }
104
+ await page.context().addCookies([newConfig])
105
return user
106
})
107
await prisma.user.deleteMany({ where: { id: userId } })
0 commit comments