external-services-automation
Version:
External services automation library for Playwright and Cucumber
28 lines (27 loc) • 1.04 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ConfirmUpdatePage = void 0;
const test_1 = require("@playwright/test");
class ConfirmUpdatePage {
constructor(page) {
this.page = page;
this.pageContainer = page
.locator('[data-testid="page-container-main"], .Box-root, [data-testid="confirm-container"]')
.first();
this.confirmButton = page.locator('button:has-text("Confirm"), ' +
'[data-testid="confirm-button"], ' +
'[data-test="confirm-button"], ' +
'a:has-text("Confirm"), ' +
'button[type="submit"]:has-text("Confirm"), ' +
'.confirm-button, ' +
'#confirm-button');
}
async clickConfirm() {
await this.confirmButton.click();
}
async isOnConfirmUpdatePage() {
await (0, test_1.expect)(this.pageContainer).toBeVisible();
await (0, test_1.expect)(this.confirmButton).toBeVisible();
}
}
exports.ConfirmUpdatePage = ConfirmUpdatePage;