diff --git a/tests/createOffer.spec.js b/tests/createOffer.spec.js index 06d68e7..609cf71 100644 --- a/tests/createOffer.spec.js +++ b/tests/createOffer.spec.js @@ -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