Skip to content

added file steps to standalone playwright #96

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 20, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion versioned_docs/version-1x/intro.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Next, you will be shown how to build your own low-code test automation framework
### 📦 Installation from scratch
Once you have set up a clear Node.js project, run the command
```bash
npm init @qavajs
npm init @qavajs@1
```
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.

Expand Down
75 changes: 75 additions & 0 deletions versioned_docs/version-2x/StandaloneSolutions/playwright.md
Original file line number Diff line number Diff line change
Expand Up @@ -1241,3 +1241,78 @@ And I save '$interception' response as 'response' # response will be instance of
And I expect '$response.status()' to equal '200'
```

## File Steps
---
### I expect file matching \{string} regexp appears in \{string}

Verify that file matching regexp appears in directory

| param | type | description | example |
|:-----:|:------:|:-----------------------:|:------------:|
| file | string | file name regex to wait | f.+\.txt |
| dir | string | directory path to wait | ./yourFolder |

```gherkin
When I expect file matching 'f.+\.txt' regexp appears in './test-e2e/folder'
When I expect file matching '$fileRegexp' regexp appears in '$folder'
```

---
### I expect \{string} file appears

Verify that file appears in provided location

| param | type | description | example |
|:-----:|:------:|:-----------------:|:---------------------:|
| file | string | file path to wait | ./yourFolder/file.txt |

```gherkin
When I expect './test-e2e/folder/file.txt' file appears
When I expect '$filePath' file appears
```

---
### I expect \{string} text file content \{validation} \{string}

Verify that text file content satisfy validation

| param | type | description | example |
|:--------------:|:------:|:--------------:|:-----------------------:|
| file | string | file path | ./yourFolder/file.txt |
| validationType | string | file path | to be equal, to contain |
| expectedValue | string | expected value | text, $value |

```gherkin
When I expect './folder/file.txt' text file content to be equal 'file content'
When I expect '$filePath' text file content to contain '$content'
```

---
### I save \{string} file content as \{string}

Save file content to memory as buffer

| param | type | description | example |
|:---------:|:------:|:-----------:|:----------------------:|
| file | string | file path | ./yourFolder/file.jpeg |
| memoryKey | string | memory key | fileContent, value |

```gherkin
When I save './folder/file.txt' file content as 'fileContent'
When I save '$filePath' file content as 'fileContent'
```

---
### I save \{string} text file content as \{string}

Save file content to memory as text (utf-8)

| param | type | description | example |
|:---------:|:------:|:-----------:|:---------------------:|
| file | string | file path | ./yourFolder/file.txt |
| memoryKey | string | memory key | textContent, value |

```gherkin
When I save './folder/file.txt' text file content as 'fileContent'
When I save '$filePath' text file as 'fileContent'
```