Skip to content

Commit 6c5b025

Browse files
committed
feat: Rename rules to fixtures
1 parent d6ce0d1 commit 6c5b025

File tree

5 files changed

+24
-22
lines changed

5 files changed

+24
-22
lines changed

basic/8-rules.spec.ts basic/8-actions.spec.ts

+13-13
Original file line numberDiff line numberDiff line change
@@ -2,20 +2,20 @@ import { expect } from "@playwright/test";
22
import { test } from "./base.ts";
33

44
/**
5-
* All tests in this file are matched with a Currents Quarantine Rule based on filename.
6-
* See the `rules` fixture in `base.ts` to see how the rules fixtures were configured,
7-
* and the docs for more information on how to configure rules: https://docs.currents.dev/guides/automation-rules
5+
* All tests in this file are matched with a Currents Quarantine Action based on filename.
6+
* See the `action` fixture in `base.ts` to see how the action fixtures were configured,
7+
* and the docs for more information on how to configure actions: https://docs.currents.dev/guides/currents-actions
88
*
99
*/
1010

1111
/**
1212
* This is a failing test that will be quarantined by the file based rule
1313
*
14-
* | field | operation | value | - | action |
15-
* | ----- | --------- | --------------- | --- | ---------- |
16-
* | File | is | 8-rules.spec.ts | -> | Quarantine |
14+
* | field | operation | value | - | action |
15+
* | ----- | --------- | ----------------- | --- | ---------- |
16+
* | File | is | 8-actions.spec.ts | -> | Quarantine |
1717
*/
18-
test("rules quarantine test", async ({ page }) => {
18+
test("action quarantine test", async ({ page }) => {
1919
await page.goto("https://demo.playwright.dev/todomvc");
2020

2121
// Use locators to represent a selector and re-use them
@@ -28,14 +28,14 @@ test("rules quarantine test", async ({ page }) => {
2828
});
2929

3030
/**
31-
* This tests will be completely skipped by a rule that matches fileName + test name
31+
* This tests will be completely skipped by an Action that matches fileName + test name
3232
*
33-
* | field | operation | value | - | action |
34-
* | ----- | --------- | --------------- | ---- | ---------- |
35-
* | File | is | 8-rules.spec.ts | And | |
36-
* | Title | is | rules skip test | -> | Skip |
33+
* | field | operation | value | - | action |
34+
* | ----- | --------- | ----------------- | ---- | ---------- |
35+
* | File | is | 8-actions.spec.ts | And | |
36+
* | Title | is | action skip test | -> | Skip |
3737
*/
38-
test("rules skip test", async ({ page }) => {
38+
test("action skip test", async ({ page }) => {
3939
await page.goto("https://demo.playwright.dev/todomvc");
4040

4141
// Use locators to represent a selector and re-use them

basic/base.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,5 @@ import { test as base } from "@playwright/test";
77

88
export const test = base.extend<CurrentsFixtures, CurrentsWorkerFixtures>({
99
...fixtures.baseFixtures,
10-
...fixtures.rulesFixtures,
10+
...fixtures.actionFixtures,
1111
});

basic/pw.config.shared.ts

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ const config = defineConfig<CurrentsFixtures, CurrentsWorkerFixtures>({
1919
trace: "on",
2020
video: "on",
2121
screenshot: "on",
22+
// We can disable Currents fixtures if no project ID is provided
23+
currentsFixturesEnabled: !!process.env.CURRENTS_PROJECT_ID,
2224
},
2325

2426
projects: [

package-lock.json

+7-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"@argos-ci/cli": "^2.4.3",
1414
"@argos-ci/playwright": "^3.6.1",
1515
"@axe-core/playwright": "^4.4.4",
16-
"@currents/playwright": "^1.9.0-beta.0",
16+
"@currents/playwright": "^1.9.0-beta.2",
1717
"@playwright/test": "^1.49.0",
1818
"@types/express": "^4.17.13",
1919
"@typescript-eslint/eslint-plugin": "^5.22.0",

0 commit comments

Comments
 (0)