@umbraco/playwright-testhelpers
Version:
Test helpers for making playwright tests for Umbraco solutions
31 lines • 1.26 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.ProfilingUiHelper = void 0;
const UiBaseLocators_1 = require("./UiBaseLocators");
class ProfilingUiHelper extends UiBaseLocators_1.UiBaseLocators {
profilingTab;
activateProfilerByDefaultToggle;
activateProfilerByDefaultCheckbox;
constructor(page) {
super(page);
this.profilingTab = page.getByRole('tab', { name: 'Profiling' });
this.activateProfilerByDefaultToggle = page.locator("[label='Activate the profiler by default'] #toggle");
this.activateProfilerByDefaultCheckbox = page.getByLabel('Activate the profiler by default');
}
async clickProfilingTab() {
await this.click(this.profilingTab);
}
async clickActivateProfilerByDefaultToggle() {
await this.click(this.activateProfilerByDefaultToggle);
}
async isActivateProfilerByDefaultToggleChecked(isChecked) {
if (isChecked) {
await this.waitForChecked(this.activateProfilerByDefaultCheckbox);
}
else {
await this.waitForUnchecked(this.activateProfilerByDefaultCheckbox);
}
}
}
exports.ProfilingUiHelper = ProfilingUiHelper;
//# sourceMappingURL=ProfilingUiHelper.js.map