Skip to content

Commit 6c771a4

Browse files
committed
Removed coverage setup from Playwright tests and CI
1 parent 49f98bb commit 6c771a4

25 files changed

+65
-183
lines changed

.github/workflows/coverage.yaml

Lines changed: 0 additions & 52 deletions
This file was deleted.

.github/workflows/end_to_end_tests.yaml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,3 @@ jobs:
3636

3737
- name: Run Playwright tests
3838
run: npx playwright test --workers=1
39-
40-
- uses: actions/upload-artifact@v3
41-
with:
42-
name: playwright-coverage
43-
path: coverage-playwright/
44-
retention-days: 30
45-
46-
env:
47-
ENABLE_COVERAGE: "true"

.github/workflows/unit_tests.yaml

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,4 @@ jobs:
2626
run: npm install
2727

2828
- name: Run vitest tests
29-
run: npx vitest run --coverage.enabled --coverage.provider=istanbul --coverage.include=src --coverage.reporter=json --coverage.all
30-
31-
- uses: actions/upload-artifact@v3
32-
with:
33-
name: unit-coverage
34-
path: coverage-unit/
35-
retention-days: 30
36-
37-
env:
38-
ENABLE_COVERAGE: "true"
29+
run: npx vitest run

.nycrc

Lines changed: 0 additions & 3 deletions
This file was deleted.

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
*Note: Numbers like (\#123) point to closed Pull Requests on the fractal-web repository.*
22

3+
# Unreleased
4+
5+
* Removed coverage setup from Playwright tests and CI (\#399).
6+
37
# 0.8.2
48

59
* Improvements on worflow task form (\#393):

docs/development/tests.md

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,24 +18,15 @@ To execute the tests seeing the browser add the `--headed` flag or the `--debug`
1818

1919
## Coverage
2020

21+
> Warning: code coverage results are not reliable at the moment
22+
2123
Coverage for the unit tests:
2224

2325
```
24-
ENABLE_COVERAGE=true npx vitest run --coverage.enabled --coverage.provider=istanbul --coverage.include=src --coverage.reporter=json --coverage.all
26+
npx vitest --coverage
2527
```
2628

27-
Warning: coverage takes some time using the option `--coverage.all`.
28-
29-
Coverage for the playwright tests is automatically collected when running `ENABLE_COVERAGE=true npx playwright test`.
30-
31-
To generate a merged html report:
32-
33-
```
34-
mkdir coverage-all
35-
cp coverage-playwright/* coverage-all
36-
cp coverage-unit/* coverage-all
37-
npx nyc report --report-dir ./coverage-html --temp-dir ./coverage-all --reporter=html --exclude-after-remap false
38-
```
29+
Warning: coverage takes some time, since we are using the option `{ all: true }`.
3930

4031
### Local `fractal-server` instance
4132

playwright.config.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export default defineConfig({
3939

4040
webServer: [
4141
{
42-
command: './tests/start-test-server.sh 1.4.2a5',
42+
command: './tests/start-test-server.sh 1.4.2',
4343
port: 8000,
4444
waitForPort: true,
4545
stdout: 'pipe',

tests/add_single_task.spec.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { expect, test, waitPageLoading } from './base_test.js';
1+
import { expect, test } from '@playwright/test';
2+
import { waitPageLoading } from './utils.js';
23
import { fileURLToPath } from 'url';
34
import path from 'path';
45

@@ -10,7 +11,7 @@ test('Add single tasks', async ({ page }) => {
1011
await waitPageLoading(page);
1112

1213
await test.step('Select "Add a single task" form', async () => {
13-
await page.getByLabel('Single task').click({ force: true });
14+
await page.getByText('Single task').click();
1415
});
1516

1617
const createBtn = page.getByRole('button', { name: /^Create$/ });

tests/admin_jobs.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import { expect, test, waitPageLoading } from './base_test.js';
1+
import { expect, test } from '@playwright/test';
2+
import { waitPageLoading } from './utils.js';
23
import { PageWithWorkflow } from './workflow_fixture.js';
34
import * as fs from 'fs';
45

tests/auth.setup.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { test as setup } from '@playwright/test';
2-
import { waitPageLoading } from './base_test';
2+
import { waitPageLoading } from './utils.js';
33

44
const authFile = 'tests/.auth/user.json';
55

0 commit comments

Comments
 (0)