@bigbinary/neeto-playwright-commons 1.11.13 → 1.11.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.cjs.js +6 -6
- package/index.cjs.js.map +1 -1
- package/index.d.ts +8 -4
- package/index.js +6 -6
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -3599,23 +3599,23 @@ class CustomCommands {
|
|
|
3599
3599
|
})}`;
|
|
3600
3600
|
return await this.request[method](formattedUrl, requestOptions);
|
|
3601
3601
|
};
|
|
3602
|
-
this.selectOptionFromDropdown = async ({ selectValueContainer, selectMenu, value, options = {}, }) => {
|
|
3602
|
+
this.selectOptionFromDropdown = async ({ selectValueContainer = COMMON_SELECTORS.selectValueContainer, selectMenu = COMMON_SELECTORS.dropdownMenu, value, page = this.page, options = {}, }) => {
|
|
3603
3603
|
Object.assign({
|
|
3604
3604
|
visibilityTimeout: 2000,
|
|
3605
3605
|
textAssertionTimeout: 1000,
|
|
3606
3606
|
retryTimeout: 20000,
|
|
3607
3607
|
}, options);
|
|
3608
3608
|
await test$1.expect(async () => {
|
|
3609
|
-
await
|
|
3610
|
-
await test$1.expect(
|
|
3609
|
+
await page.getByTestId(selectValueContainer).click();
|
|
3610
|
+
await test$1.expect(page.getByTestId(selectMenu)).toBeVisible({
|
|
3611
3611
|
timeout: options.visibilityTimeout,
|
|
3612
3612
|
});
|
|
3613
|
-
await
|
|
3614
|
-
await
|
|
3613
|
+
await page.keyboard.type(value);
|
|
3614
|
+
await page
|
|
3615
3615
|
.getByTestId(selectMenu)
|
|
3616
3616
|
.getByText(value, { exact: true })
|
|
3617
3617
|
.click();
|
|
3618
|
-
await test$1.expect(
|
|
3618
|
+
await test$1.expect(page.getByTestId(selectValueContainer)).toContainText(value, { timeout: options.textAssertionTimeout });
|
|
3619
3619
|
}).toPass({ timeout: options.retryTimeout });
|
|
3620
3620
|
};
|
|
3621
3621
|
this.verifyFieldValue = values => {
|