Skip to content
This repository has been archived by the owner on Nov 30, 2022. It is now read-only.

[WIP?] e2e test for selections. #141

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Binary file added test/e2e/__artifacts__/baseline/selection.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
20 changes: 20 additions & 0 deletions test/e2e/selection.spec.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
const host = process.env.CI === 'true' ? 'localhost' : 'host.docker.internal';
const engine = process.env.CI === 'true' ? 'localhost' : 'qix-engine';
const app = process.env.DocID || 'drugcases.qvf';

const url = `http://${host}:1234/?engine_url=ws://${engine}:9076/${app}`;
const OPTS = {
artifactsPath: 'test/e2e/__artifacts__/',
};

describe('catwalk', () => {
it('should render the selections correctly', async () => {
await page.goto(url, { timeout: 60000, waitUntil: 'networkidle0' });
await page.waitFor(4000);
await page.click('[fieldz=Key_Ind_Drug]');
await page.click('[title="\'10003554-1\' (No numerical representation)"]');
await page.waitFor(1000);
const img = await page.screenshot({ fullPage: true });
return expect(img).to.matchImageOf('selection', OPTS);
});
});