UNPKG

@umbraco/playwright-testhelpers

Version:

Test helpers for making playwright tests for Umbraco solutions

29 lines 1.34 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.ProfilingUiHelper = void 0; const test_1 = require("@playwright/test"); 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 (0, test_1.expect)(this.profilingTab).toBeVisible(); await this.profilingTab.click(); } async clickActivateProfilerByDefaultToggle() { await (0, test_1.expect)(this.activateProfilerByDefaultToggle).toBeVisible(); await this.activateProfilerByDefaultToggle.click(); } async isActivateProfilerByDefaultToggleChecked(isChecked) { return (0, test_1.expect)(this.activateProfilerByDefaultCheckbox).toBeChecked({ checked: isChecked }); } } exports.ProfilingUiHelper = ProfilingUiHelper; //# sourceMappingURL=ProfilingUiHelper.js.map