UNPKG

@umbraco/playwright-testhelpers

Version:

Test helpers for making playwright tests for Umbraco solutions

27 lines 1.22 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.locator("[label='Activate the profiler by default'] input[type='checkbox']"); } async clickProfilingTab() { await this.click(this.profilingTab); } async clickActivateProfilerByDefaultToggle() { await this.click(this.activateProfilerByDefaultToggle); } async isActivateProfilerByDefaultToggleChecked(isChecked) { return (0, test_1.expect)(this.activateProfilerByDefaultCheckbox).toBeChecked({ checked: isChecked }); } } exports.ProfilingUiHelper = ProfilingUiHelper; //# sourceMappingURL=ProfilingUiHelper.js.map