Skip to content

Commit 1aeebb1

Browse files
added file steps to standalone playwright (#96)
1 parent 1c1fb7c commit 1aeebb1

File tree

2 files changed

+76
-1
lines changed

2 files changed

+76
-1
lines changed

versioned_docs/version-1x/intro.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Next, you will be shown how to build your own low-code test automation framework
1111
### 📦 Installation from scratch
1212
Once you have set up a clear Node.js project, run the command
1313
```bash
14-
npm init @qavajs
14+
npm init @qavajs@1
1515
```
1616
to launch the CLI application. This will configure qavajs and install the necessary modules for your testing purposes. After the process is completed, a config.ts (or config.js) file will be generated in the project's root directory, which will be used to configure test execution.
1717

versioned_docs/version-2x/StandaloneSolutions/playwright.md

+75
Original file line numberDiff line numberDiff line change
@@ -1241,3 +1241,78 @@ And I save '$interception' response as 'response' # response will be instance of
12411241
And I expect '$response.status()' to equal '200'
12421242
```
12431243

1244+
## File Steps
1245+
---
1246+
### I expect file matching \{string} regexp appears in \{string}
1247+
1248+
Verify that file matching regexp appears in directory
1249+
1250+
| param | type | description | example |
1251+
|:-----:|:------:|:-----------------------:|:------------:|
1252+
| file | string | file name regex to wait | f.+\.txt |
1253+
| dir | string | directory path to wait | ./yourFolder |
1254+
1255+
```gherkin
1256+
When I expect file matching 'f.+\.txt' regexp appears in './test-e2e/folder'
1257+
When I expect file matching '$fileRegexp' regexp appears in '$folder'
1258+
```
1259+
1260+
---
1261+
### I expect \{string} file appears
1262+
1263+
Verify that file appears in provided location
1264+
1265+
| param | type | description | example |
1266+
|:-----:|:------:|:-----------------:|:---------------------:|
1267+
| file | string | file path to wait | ./yourFolder/file.txt |
1268+
1269+
```gherkin
1270+
When I expect './test-e2e/folder/file.txt' file appears
1271+
When I expect '$filePath' file appears
1272+
```
1273+
1274+
---
1275+
### I expect \{string} text file content \{validation} \{string}
1276+
1277+
Verify that text file content satisfy validation
1278+
1279+
| param | type | description | example |
1280+
|:--------------:|:------:|:--------------:|:-----------------------:|
1281+
| file | string | file path | ./yourFolder/file.txt |
1282+
| validationType | string | file path | to be equal, to contain |
1283+
| expectedValue | string | expected value | text, $value |
1284+
1285+
```gherkin
1286+
When I expect './folder/file.txt' text file content to be equal 'file content'
1287+
When I expect '$filePath' text file content to contain '$content'
1288+
```
1289+
1290+
---
1291+
### I save \{string} file content as \{string}
1292+
1293+
Save file content to memory as buffer
1294+
1295+
| param | type | description | example |
1296+
|:---------:|:------:|:-----------:|:----------------------:|
1297+
| file | string | file path | ./yourFolder/file.jpeg |
1298+
| memoryKey | string | memory key | fileContent, value |
1299+
1300+
```gherkin
1301+
When I save './folder/file.txt' file content as 'fileContent'
1302+
When I save '$filePath' file content as 'fileContent'
1303+
```
1304+
1305+
---
1306+
### I save \{string} text file content as \{string}
1307+
1308+
Save file content to memory as text (utf-8)
1309+
1310+
| param | type | description | example |
1311+
|:---------:|:------:|:-----------:|:---------------------:|
1312+
| file | string | file path | ./yourFolder/file.txt |
1313+
| memoryKey | string | memory key | textContent, value |
1314+
1315+
```gherkin
1316+
When I save './folder/file.txt' text file content as 'fileContent'
1317+
When I save '$filePath' text file as 'fileContent'
1318+
```

0 commit comments

Comments
 (0)