external-services-automation
Version:
External services automation library for Playwright and Cucumber
21 lines (20 loc) • 913 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.CurrentSubscriptionPage = void 0;
const test_1 = require("@playwright/test");
class CurrentSubscriptionPage {
constructor(page) {
this.page = page;
this.pageContainer = page.locator('[data-testid="page-container-main"]');
this.planName = page.locator('[class*="Text-fontSize--20"]:has-text("plan")').first();
this.updateSubscriptionButton = page.locator('[data-test="update-subscription"]');
this.currentSubscriptionPageTitle = page.locator('//span[text()= "Current subscription"]');
}
async navigateToUpdateSubscription() {
await this.updateSubscriptionButton.click();
}
async isOnCurrentSubscriptionPage() {
await (0, test_1.expect)(this.currentSubscriptionPageTitle).toBeVisible();
}
}
exports.CurrentSubscriptionPage = CurrentSubscriptionPage;