32 lines
985 B
JavaScript
32 lines
985 B
JavaScript
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 records are present', async ({ page }) => {
|
|
for (const someModel of [
|
|
SessionRelatedToPublickey,
|
|
NymSet,
|
|
ContactDetailsSet,
|
|
]) {
|
|
expect(await someModel.findOne()).toBeTruthy();
|
|
}
|
|
});
|
|
|
|
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
|