Skip to content

Commit 2b579de

Browse files
Merge pull request #1 from qavajs/initial-branch
Initial branch
2 parents 3c1f481 + d168915 commit 2b579de

File tree

9 files changed

+2417
-1
lines changed

9 files changed

+2417
-1
lines changed

.github/workflows/npm-publish.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
2+
# For more information see: https://help.github.com/actions/language-and-framework-guides/publishing-nodejs-packages
3+
4+
name: Node.js Package
5+
6+
on:
7+
release:
8+
types: [created]
9+
10+
jobs:
11+
build:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v2
15+
- uses: actions/setup-node@v2
16+
with:
17+
node-version: 16
18+
- run: npm ci
19+
20+
publish-npm:
21+
needs: build
22+
runs-on: ubuntu-latest
23+
steps:
24+
- uses: actions/checkout@v2
25+
- uses: actions/setup-node@v2
26+
with:
27+
node-version: 16
28+
registry-url: https://registry.npmjs.org/
29+
- run: npm ci
30+
- run: npm run build
31+
- run: npm publish --access public
32+
env:
33+
NODE_AUTH_TOKEN: ${{secrets.npm_token}}

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
node_modules/
2+
lib/

README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,16 @@
11
# steps-memory
2-
steps to memory verifications
2+
Steps to perform memory verifications
3+
4+
```javascript
5+
module.exports = {
6+
default: {
7+
require: [
8+
'@qavajs/steps-config-loader',
9+
'@qavajs/steps-memory'
10+
],
11+
12+
}
13+
}
14+
```
15+
## Steps
16+
[validation steps](docs/validation_steps.md)

docs/validation_steps.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Validation Steps
2+
3+
---
4+
### I expect {text} {validation} {text} ✅
5+
6+
Verify that value from memory satisfies validation against other value
7+
8+
| param | type | description | example |
9+
|:----------:|:--------:|:----------------------------:|:-------------------------------------:|
10+
| value1 | any | value1 | 42, $value, $currentDate() |
11+
| validation | Function | function to verify condition | to be equal, to be above, to be below |
12+
| value2 | any | value2 | 42, $value, $currentDate() |
13+
14+
example:
15+
```gherkin
16+
Then I expect '$value' equals to '$anotherValue'
17+
Then I expect '$value' does not contain '56'
18+
```
19+
20+
---
21+
### I expect every element in {text} array {validation} {text} ✅
22+
23+
Verify that every element in array satisfies validation against other value
24+
25+
| param | type | description | example |
26+
|:--------------:|:--------:|:----------------------------:|:-------------------------------------:|
27+
| arr | any | array to validate | $value, $currentDate() |
28+
| validation | Function | function to verify condition | to be equal, to be above, to be below |
29+
| expectedValue | any | expected value | 42, $value, $currentDate() |
30+
31+
example:
32+
```gherkin
33+
Then I expect every element in '$arr' array to be above '$expectedValue'
34+
Then I expect every element in '$arr' array to be above '50'
35+
```

index.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
require('./lib/index.js');

0 commit comments

Comments
 (0)