add: full multi-tenancy control
This commit is contained in:
18
packages/Webkul/Admin/tests/e2e-pw/utils/components.ts
Normal file
18
packages/Webkul/Admin/tests/e2e-pw/utils/components.ts
Normal file
@@ -0,0 +1,18 @@
|
||||
/**
|
||||
* Confirm the modal dialog.
|
||||
*/
|
||||
export function confirmModal(message, page) {
|
||||
return new Promise(async (resolve, reject) => {
|
||||
await page.waitForSelector("text=" + message);
|
||||
const agreeButton = await page.locator(
|
||||
'button.primary-button:has-text("Agree")'
|
||||
);
|
||||
|
||||
if (await agreeButton.isVisible()) {
|
||||
await agreeButton.click();
|
||||
resolve(true);
|
||||
} else {
|
||||
reject("Agree button not found or not visible.");
|
||||
}
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user