Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions _playwright-tests/test-utils/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@
"@types/pg": "^8.11.11"
},
"peerDependencies": {
"@playwright/test": "^1.49.1"
"@playwright/test": "^1.49.1",
"@currents/playwright": "^1.7.0"
},
"_comment": "↑ @playwright/test is a peer dependency, it uses the consuming project's installation"
"_comment": "↑ @playwright/test and @currents/playwright are peer dependencies, using the consuming project's installation"
}
18 changes: 18 additions & 0 deletions _playwright-tests/test-utils/src/fixtures/currents.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
import {
CurrentsFixtures,
CurrentsWorkerFixtures,
fixtures as currentsFixtures,
} from '@currents/playwright';
import { test as base } from '@playwright/test';

/**
* Currents.dev fixtures for automatic coverage collection and upload.
*
* When tests use this fixture and Currents is configured in playwright.config.ts,
* coverage data from window.__coverage__ will be automatically collected
* and uploaded to Currents.dev.
*/
export const currentsTest = base.extend<CurrentsFixtures, CurrentsWorkerFixtures>({
...currentsFixtures.baseFixtures,
...currentsFixtures.coverageFixtures,
});
1 change: 1 addition & 0 deletions _playwright-tests/test-utils/src/fixtures/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ export * from './blockAnalytics';
export * from './cleanup';
export * from './client';
export * from './coverage';
export * from './currents';
export * from './db';
export * from './tokenRefresh';
export * from './test';
Expand Down
6 changes: 4 additions & 2 deletions _playwright-tests/test-utils/src/fixtures/test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,20 @@ import { blockAnalyticsTest } from './blockAnalytics';
import { cleanupTest } from './cleanup';
import { clientTest } from './client';
import { coverageTest } from './coverage';
import { currentsTest } from './currents';
import { databaseTest } from './db';
import { unusedRepoUrlTest } from './unusedRepoUrl';
import { tokenRefreshTest } from './tokenRefresh';
import { unusedRepoUrlTest } from './unusedRepoUrl';

export const test = mergeTests(
currentsTest,
blockAnalyticsTest,
clientTest,
cleanupTest,
coverageTest,
databaseTest,
unusedRepoUrlTest,
tokenRefreshTest,
unusedRepoUrlTest,
);

export { expect } from '@playwright/test';