add cookie to fixture

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

View file

@ -1,9 +1,10 @@
const { test, expect } = require('./test-setup');
const SessionRelatedToPublickey = require('../src/models/SessionRelatedToPublickey');
const NymSet = require('../src/models/NymSet');
const ContactDetailsSet = require('../src/models/ContactDetailsSet');
test('Mock ecords are present', async ({ page }) => {
test('Mock records are present', async ({ page }) => {
for (const someModel of [
SessionRelatedToPublickey,
NymSet,
@ -13,6 +14,19 @@ test('Mock ecords are present', async ({ page }) => {
}
});
test('Session cookie is there', async ({ page }) => {
await page.goto('http://localhost');
const cookiesInPage = await page.context().cookies();
expect(cookiesInPage).toHaveLength(1);
expect(cookiesInPage[0].name).toBe('sessionUuid');
});
test('Offers is reachable', async ({ page }) => {
await page.goto('http://localhost/offers');
console.log(await page.innerHTML('html'));
});
// Check that UI controls are manageable with a few test cases.
// Check that the offer is created after submitting