UNPKG

@umbraco/playwright-testhelpers

Version:

Test helpers for making playwright tests for Umbraco solutions

46 lines 1.86 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PublishedStatusUiHelper = void 0; 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.click(this.publishedStatusTab); } async clickRefreshStatusButton() { await this.click(this.refreshStatusBtn); } async clickReloadMemoryCacheButton() { await this.click(this.reloadMemoryCacheBtn); } async clickRebuildDatabaseCacheButton() { await this.click(this.rebuildDatabaseCacheBtn); } async clickSnapshotInternalCacheButton() { await this.click(this.snapshotInternalCacheBtn); } async clickContinueButton() { await this.click(this.continueBtn); } async isPublishedCacheStatusVisible(status) { return await this.isVisible(this.publishedCacheBox.getByText(status)); } } exports.PublishedStatusUiHelper = PublishedStatusUiHelper; //# sourceMappingURL=PublishedStatusUiHelper.js.map