add cookie to fixture

This commit is contained in:
counterweight 2025-02-26 14:21:40 +01:00
parent c7505f5009
commit a1e07724ce
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C

View file

@ -3,9 +3,7 @@ const SessionRelatedToPublickey = require('../src/models/SessionRelatedToPublick
const NymSet = require('../src/models/NymSet');
const ContactDetailsSet = require('../src/models/ContactDetailsSet');
test.beforeEach(async () => {
// Truncate all affected tables
test.beforeEach(async ({ context }) => {
for (const someModel of [
SessionRelatedToPublickey,
NymSet,
@ -14,7 +12,7 @@ test.beforeEach(async () => {
someModel.truncate();
}
await SessionRelatedToPublickey.create({
const session = await SessionRelatedToPublickey.create({
uuid: '0195423b-f9ae-737e-98f3-880f6563ed8a',
session_uuid: '0195423c-33d7-75f8-921b-a06e6d3cb8c5',
public_key:
@ -38,6 +36,18 @@ test.beforeEach(async () => {
'+OD0/Y2IkJ99/E0KAJL/mp3kxQo4DFp1deSPnqiejlyGoeWzBiipemPVSTT/Jg/fCQbN9Pd/GJ6shxuwWECOVyB5PnMZOVJ1MPQ7I8A+63XZ0gKnSnJgry6F69f3MhEjH49JbeVJ37TbruFu/Woevo24VWz2gPXGBuyHLzeg1tyT9+7ZSygkcCrh+bchvymCoF1nNOm/UQKnwecH1wWzo8a+rNokazD1/3iey6iKmKewi+yGCgmljrB866akqBAl?iv=PAKhqTeBfYVX/muhM8xaEA==',
created_at: new Date().toISOString(),
});
await context.addCookies([
{
name: 'sessionUuid',
value: session.uuid,
domain: 'localhost',
path: '/',
httpOnly: true,
secure: false,
sameSite: 'None',
},
]);
});
export { test, expect } from '@playwright/test';