UNPKG

@umbraco/playwright-testhelpers

Version:

Test helpers for making playwright tests for Umbraco solutions

47 lines 1.9 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PublishedStatusUiHelper = void 0; const test_1 = require("@playwright/test"); const UiBaseLocators_1 = require("./UiBaseLocators"); class PublishedStatusUiHelper extends UiBaseLocators_1.UiBaseLocators { publishedStatusTab; refreshStatusBtn; reloadMemoryCacheBtn; rebuildDatabaseCacheBtn; snapshotInternalCacheBtn; continueBtn; publishedCacheBox; constructor(page) { super(page); this.publishedStatusTab = page.getByRole('tab', { name: 'Published Status' }); this.refreshStatusBtn = page.getByLabel('Refresh Status'); this.reloadMemoryCacheBtn = page.getByLabel('Reload Memory Cache'); this.rebuildDatabaseCacheBtn = page.getByLabel('Rebuild Database Cache'); this.snapshotInternalCacheBtn = page.getByLabel('Snapshot Internal Cache'); this.continueBtn = page.locator('#confirm').getByLabel('Continue'); this.publishedCacheBox = page.locator('[headline="Published Cache Status"]'); } async clickPublishedStatusTab() { await this.publishedStatusTab.click(); } async clickRefreshStatusButton() { await this.refreshStatusBtn.click(); } async clickReloadMemoryCacheButton() { await this.reloadMemoryCacheBtn.click(); } async clickRebuildDatabaseCacheButton() { await this.rebuildDatabaseCacheBtn.click(); } async clickSnapshotInternalCacheButton() { await this.snapshotInternalCacheBtn.click(); } async clickContinueButton() { await this.continueBtn.click(); } async isPublishedCacheStatusVisible(status) { return (0, test_1.expect)(this.publishedCacheBox.getByText(status)).toBeVisible(); } } exports.PublishedStatusUiHelper = PublishedStatusUiHelper; //# sourceMappingURL=PublishedStatusUiHelper.js.map