UNPKG

external-services-automation

Version:

External services automation library for Playwright and Cucumber

29 lines (28 loc) 1.07 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ConfirmCodePage = void 0; const test_1 = require("@playwright/test"); class ConfirmCodePage { constructor(page) { this.page = page; this.pageTitle = page.locator('h1:has-text("Almost there — check your inbox")'); this.codeInput = page.locator('input[name="p_confirmation_code"]'); this.continueButton = page.locator('button[type="submit"]:has-text("Continue")'); } async enterConfirmationCode(code) { await this.codeInput.fill(code); } async clickContinue() { await this.continueButton.click(); } async submitConfirmationCode(code) { await this.enterConfirmationCode(code); await this.clickContinue(); } async isOnConfirmCodePage() { await (0, test_1.expect)(this.pageTitle).toBeVisible(); await (0, test_1.expect)(this.codeInput).toBeVisible(); await (0, test_1.expect)(this.continueButton).toBeVisible(); } } exports.ConfirmCodePage = ConfirmCodePage;