Skip to content

Commit 94e5e6b

Browse files
added built-in soft assertions (#97)
1 parent 1aeebb1 commit 94e5e6b

File tree

2 files changed

+25
-0
lines changed

2 files changed

+25
-0
lines changed

versioned_docs/version-2x/Modules/soft-assertion.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,15 @@ sidebar_position: 2
33
---
44

55
# @qavajs/soft-assertion
6+
7+
:::warning
8+
9+
@qavajs/soft-assertion is discouraged.
10+
Soft assertion functionality is now included into `@qavajs/core` module
11+
Please use built-in `softly` prefix
12+
13+
:::
14+
615
Module that allow to use soft asserts in qavajs tests
716

817
## Installation

versioned_docs/version-2x/intro.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,22 @@ When('I expect {string} {validation} {string}', async function(value1, validate,
8181
});
8282
```
8383

84+
### 🛠️ Soft Validation
85+
You can use the `softly` prefix before expect to continue test execution after an error.
86+
```gherkin
87+
Feature: Feature
88+
89+
Scenario: verify soft assert
90+
# first step fails, but other steps will not be skipped
91+
Then I expect '2' to softly equal '1'
92+
# pass
93+
And I expect '1' to softly equal '1'
94+
# fail
95+
And I expect '2' to softly equal '1'
96+
# skip
97+
And I expect '1' to softly equal '1'
98+
```
99+
84100
### 🛠️ Test Sharding
85101
qavajs provides ability to shard your tests between different machines. To do so pass `--shard x/y` parameter in CLI,
86102
where x - current shard, y - total number of shards.

0 commit comments

Comments
 (0)