Skip to content

Commit

Permalink
Update tests (#1039)
Browse files Browse the repository at this point in the history
* fix: adds selectors to navigate to the feature

* fix: updates Dockerfile
  • Loading branch information
FritzHoing authored Jul 26, 2023
1 parent 349b984 commit ba3e90d
Show file tree
Hide file tree
Showing 18 changed files with 40 additions and 5 deletions.
12 changes: 7 additions & 5 deletions Dockerfile.e2e
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@

FROM mcr.microsoft.com/playwright:v1.30.0-focal@sha256:9e6eddb08b8566076ef778007859096bc90f8984236061c086eaede2fb60430b
FROM mcr.microsoft.com/playwright:v1.36.0-jammy@sha256:3d3619bf5e622d264f519bffd3aa321d061bf420688eda8a5143da7884b36a6b

WORKDIR /app

RUN npm install -D @playwright/[email protected]
RUN npm ci
RUN npm install -D @playwright/[email protected]
RUN npx playwright install --with-deps

# Need to be installed since the package.json is not copied
RUN npm i @terrestris/[email protected]
RUN npm i [email protected]

COPY playwright.config.js ./
COPY global-setup.js ./
COPY global-setup.ts ./
COPY ./src/e2e-tests ./e2e-tests
COPY ./playwright ./playwright
2 changes: 2 additions & 0 deletions src/e2e-tests/draw-annotation.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ test('draw-annotation', async ({

await page.goto(`https://${process.env.HOST}/client/?applicationId=${process.env.ID}`);

await page.waitForLoadState('networkidle');
await page.getByRole('button', { name: 'Draw' }).click();
await annotations(page, workerInfo);
});
1 change: 1 addition & 0 deletions src/e2e-tests/draw.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,6 @@ test('draw', async ({

await page.goto(`https://${process.env.HOST}/client/?applicationId=${process.env.ID}`);

await page.getByRole('button', {name: 'draw'}).click();
await draw(page);
});
2 changes: 2 additions & 0 deletions src/e2e-tests/drawCircle.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ test('draw-circle', async ({

await page.goto(`https://${process.env.HOST}/client/?applicationId=${process.env.ID}`);

await page.waitForLoadState('networkidle');
await page.getByRole('button', { name: 'Draw' }).click();
await drawCircle(page, workerInfo);
});
2 changes: 2 additions & 0 deletions src/e2e-tests/drawDelete.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ test('draw-delete', async ({

await page.goto(`https://${process.env.HOST}/client/?applicationId=${process.env.ID}`);

await page.waitForLoadState('networkidle');
await page.getByRole('button', { name: 'Draw' }).click();
await drawDelete(page, workerInfo);
});
2 changes: 2 additions & 0 deletions src/e2e-tests/drawEdit.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ test('draw-edit', async ({

await page.goto(`https://${process.env.HOST}/client/?applicationId=${process.env.ID}`);

await page.waitForLoadState('networkidle');
await page.getByRole('button', { name: 'Draw' }).click();
await drawEdit(page, workerInfo);
});
2 changes: 2 additions & 0 deletions src/e2e-tests/drawExport.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ test('draw-export', async ({

await page.goto(`https://${process.env.HOST}/client/?applicationId=${process.env.ID}`);

await page.waitForLoadState('networkidle');
await page.getByRole('button', { name: 'Draw' }).click();
await drawExport(page, workerInfo);
});
2 changes: 2 additions & 0 deletions src/e2e-tests/drawLine.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ test('draw-line', async ({

await page.goto(`https://${process.env.HOST}/client/?applicationId=${process.env.ID}`);

await page.waitForLoadState('networkidle');
await page.getByRole('button', { name: 'Draw' }).click();
await drawLine(page, workerInfo);
});
2 changes: 2 additions & 0 deletions src/e2e-tests/drawModifyColorScheme.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ test('draw-modify', async ({

await page.goto(`https://${process.env.HOST}/client/?applicationId=${process.env.ID}`);

await page.waitForLoadState('networkidle');
await page.getByRole('button', { name: 'Draw' }).click();
await drawModifyColorScheme(page);
});
2 changes: 2 additions & 0 deletions src/e2e-tests/drawPoint.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ test('draw-point', async ({

await page.goto(`https://${process.env.HOST}/client/?applicationId=${process.env.ID}`);

await page.waitForLoadState('networkidle');
await page.getByRole('button', { name: 'Draw' }).click();
await drawPoint(page, workerInfo);
});
2 changes: 2 additions & 0 deletions src/e2e-tests/drawPolygon.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ test('draw-polygon', async ({

await page.goto(`https://${process.env.HOST}/client/?applicationId=${process.env.ID}`);

await page.waitForLoadState('networkidle');
await page.getByRole('button', { name: 'Draw' }).click();
await drawPolygon(page, workerInfo);
});
2 changes: 2 additions & 0 deletions src/e2e-tests/drawRectangle.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ test('draw-rectangle', async ({

await page.goto(`https://${process.env.HOST}/client/?applicationId=${process.env.ID}`);

await page.waitForLoadState('networkidle');
await page.getByRole('button', { name: 'Draw' }).click();
await drawRectangle(page, workerInfo);
});
2 changes: 2 additions & 0 deletions src/e2e-tests/drawUpload.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ test('draw-upload', async ({

await page.goto(`https://${process.env.HOST}/client/?applicationId=${process.env.ID}`);

await page.waitForLoadState('networkidle');
await page.getByRole('button', { name: 'Draw' }).click();
await drawUpload(page, workerInfo);
});
2 changes: 2 additions & 0 deletions src/e2e-tests/exportPrint.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ test('draw-print', async ({

await page.goto(`https://${process.env.HOST}/client/?applicationId=${process.env.ID}`);

await page.waitForLoadState('networkidle');
await page.getByRole('button', { name: 'Export' }).click();
await exportPrint(page);
});
2 changes: 2 additions & 0 deletions src/e2e-tests/languageSelector.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ test('language-selector', async ({

await page.goto(`https://${process.env.HOST}/client/?applicationId=${process.env.ID}`);

await page.waitForLoadState('networkidle');
await page.getByRole('button', { name: 'Language selector' }).click();
await languageSelector(page);
});
2 changes: 2 additions & 0 deletions src/e2e-tests/layertree.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ test('layertree', async ({

await page.goto(`https://${process.env.HOST}/client/?applicationId=${process.env.ID}`);

await page.waitForLoadState('networkidle');
await page.getByRole('button', { name: 'Maps' }).click();
await layertree(page, workerInfo);
});
2 changes: 2 additions & 0 deletions src/e2e-tests/measure.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,5 +12,7 @@ test('measure', async ({

await page.goto(`https://${process.env.HOST}/client/?applicationId=${process.env.ID}`);

await page.waitForLoadState('networkidle');
await page.getByRole('button', { name: 'Measure' }).click();
await measure(page);
});
2 changes: 2 additions & 0 deletions src/e2e-tests/share.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,7 @@ test('share', async ({

await page.goto(`https://${process.env.HOST}/client/?applicationId=${process.env.ID}`);

await page.waitForLoadState('networkidle');
await page.getByRole('button', { name: 'Share' }).click();
await share(page, context, workerInfo);
});

0 comments on commit ba3e90d

Please sign in to comment.