Skip to content

Latest commit

 

History

History
172 lines (116 loc) · 16.3 KB

File metadata and controls

172 lines (116 loc) · 16.3 KB
description Reference documentation of Conditions that are available for Currents Actions

Conditions

An Actions can have one or more condition. You can use AND or OR combinator for multiple conditions.

Fields

File

Test filename path, for example path/to/file.spec.ts.

Field Type string
Value Type string | string[] | RegexPattern[]
Supported Operators

#basic-operators
#one-to-many-operators

Supported Actions

#pre-test-actions
#post-test-actions

Test Title

Test title, for example in test definition test("should open landing page") it is should open landing page.

Field Type string
Value Type string | string[] | RegexPattern[]
Supported Operators

#basic-operators
#one-to-many-operators

Supported Actions

#pre-test-actions
#post-test-actions

Test Title Path

Full title path as an array including named describe statements. See testInfo.titlePath. To match the following example:

[
    "auth.spec.ts", // e.g. spec file name
    "Auth Controller", // e.g. test describe
    "Should login with correct credentials" // e.g. test title
]

Use a string list: :box:auth.spec.ts :box:Auth Controller :box:Should login with correct credentials

Field Type string[]
Value Type string | string[] | RegexPattern[]
Supported Operators

#basic-operators
#many-to-many-operators

Supported Actions

#pre-test-actions
#post-test-actions

Test ID

Playwright test id, matching the test case id in the Reporter API.

Field Type string
Value Type string | string[]
Supported Operators

#basic-operators
#one-to-many-operators

Supported Actions

#pre-test-actions
#post-test-actions

Tags

Test tag list. For example, if a test has the following list of tags ['a', 'b'], each value in the list will be evaluated separately.

Field Type string[]
Value Type string | string[]
Supported Operators

#basic-operators
#many-to-many-operators

Supported Actions

#pre-test-actions
#post-test-actions

Project

Playwright project name as defined in your playwright.config.ts.

Field Type string
Value Type string | string[] | RegexPattern[]
Supported Operators

#basic-operators
#one-to-many-operators

Supported Actions

#pre-test-actions
#post-test-actions

Error Message

{% hint style="info" %} Added in @currents/playwright@1.14.0 {% endhint %}

Used to match a list field (eg Test Title Path) against one or more values.

Error message thrown during the test.

Field Type string
Value Type string | string[] | RegexPattern[]
Supported Operators

#basic-operators
#one-to-many-operators

Supported Actions #post-test-actions

Git Author Email

Git commit author email. See commit-information.md to explore how Currents collects git commit information.

Field Type string
Value Type string | string[] | RegexPattern[]
Supported Operators

#basic-operators
#one-to-many-operators

Supported Actions

#pre-test-actions
#post-test-actions

Git Author Branch

Git commit author name. See commit-information.md to explore how Currents collects git commit information.

Field Type string
Value Type string | string[] | RegexPattern[]
Supported Operators

#basic-operators
#one-to-many-operators

Supported Actions

#pre-test-actions
#post-test-actions

Git Branch

Git commit branch name. See commit-information.md to explore how Currents collects git commit information.

Field Type string
Value Type string | string[] | RegexPattern[]
Supported Operators

#basic-operators
#one-to-many-operators

Supported Actions

#pre-test-actions
#post-test-actions

Git Message

Git commit message. See commit-information.md to explore how Currents collects git commit information.

Field Type string
Value Type string | string[] | RegexPattern[]
Supported Operators

#basic-operators
#one-to-many-operators

Supported Actions

#pre-test-actions
#post-test-actions

Git Remote Origin

Git remote origin URL. See commit-information.md to explore how Currents collects git commit information.

Field Type string
Value Type string | string[] | RegexPattern[]
Supported Operators

#basic-operators
#one-to-many-operators

Supported Actions

#pre-test-actions
#post-test-actions

Operators

Basic operators

OperatorDescription
isvalue is equal or RegexPattern matches
is notvalue is different or RegexPattern does not match
is anyfield returns true for JS expression !!value === true
is emptyfield returns false for JS expression !!value === true

One to Many operators

Used to match a single value field (eg Test Title), against a list of values.

OperatorDescription
inone of the values from the list matches
not innone of the values in the list match

Many to Many operators

{% hint style="info" %} Added in @currents/playwright@1.10.0 {% endhint %}

Used to match a list field (eg Test Title Path) against one or more values.

OperatorDescription
includesall of the values in the list can be found in the field
includes someat least one of the values in the list can be found in the field
missingall of the values in the list are missing from the field
missing anyany of the values in the list is missing from the field

Examples

FieldOperatorValueDescription
Test Idis1234id is exact match
Git Branchnot inmain,stableno matches
TagsincludesfeatureAtag matches
Tagsincludes somefeatA,featBat least one tag matches
Error MessageisInt(er|ra)net Error:Errror Message matches the RegexPattern