Skip to content
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
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
## 0.0.17
- :rocket: added _I force click_ step
- :beetle: added support of memory values in _I click '$value' text in 'collection' collection_

## 0.0.16
- :beetle: fixed optional params templates in wait steps
Expand Down
162 changes: 94 additions & 68 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
},
"homepage": "https://github.com/qavajs/steps-playwright#readme",
"devDependencies": {
"@cucumber/cucumber": "^9.0.1",
"@qavajs/cli": "^0.0.19",
"@qavajs/console-formatter": "^0.2.0",
"@cucumber/cucumber": "^9.1.0",
"@qavajs/cli": "^0.0.20",
"@qavajs/console-formatter": "^0.2.1",
"@qavajs/memory": "^1.2.0",
"@qavajs/po-playwright": "^0.0.7",
"@qavajs/po-playwright": "^0.0.8",
"@qavajs/webstorm-adapter": "^8.0.0",
"@qavajs/xunit-formatter": "^0.0.3",
"@types/chai": "^4.3.4",
Expand All @@ -38,8 +38,8 @@
"typescript": "^5.0.2"
},
"dependencies": {
"@playwright/test": "^1.31.2",
"@playwright/test": "^1.32.1",
"@qavajs/validation": "^0.0.4",
"playwright": "^1.31.2"
"playwright": "^1.32.1"
}
}
4 changes: 3 additions & 1 deletion src/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -184,12 +184,14 @@ When('I select {int}(st|nd|rd|th) option from {string} dropdown', async function
* @param {string} expectedText - text to click
* @param {string} alias - collection to search text
* @example I click 'google' text in 'Search Engines' collection
* @example I click '$someVarWithText' text in 'Search Engines' collection
*/
When(
'I click {string} text in {string} collection',
async function (value: string, alias: string) {
const resolvedValue = await getValue(value);
const collection = await getElement(alias);
await collection.getByText(value).click();
await collection.getByText(resolvedValue).click();
}
);

Expand Down
2 changes: 1 addition & 1 deletion src/waits.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ When(
async function (waitType: string, value: string, timeout: number | null) {
const wait = getValueWait(waitType);
const expectedValue = await getValue(value);
const getValueFn = () => page.url();
const getValueFn = async () => page.url();
await wait(getValueFn, expectedValue, timeout ? timeout : config.browser.timeout.page);
}
);
Expand Down
Loading