@umbraco/playwright-testhelpers
Version:
Test helpers for making playwright tests for Umbraco solutions
22 lines • 891 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.WelcomeDashboardUiHelper = void 0;
const test_1 = require("@playwright/test");
const UiBaseLocators_1 = require("./UiBaseLocators");
class WelcomeDashboardUiHelper extends UiBaseLocators_1.UiBaseLocators {
welcomeTab;
welcomeBox;
constructor(page) {
super(page);
this.welcomeTab = page.getByRole('tab', { name: 'Welcome' });
this.welcomeBox = page.locator('uui-box');
}
async clickWelcomeTab() {
await this.click(this.welcomeTab);
}
async doesButtonWithLabelInBoxHaveLink(label, boxName, link) {
return (0, test_1.expect)(this.welcomeBox.filter({ hasText: boxName }).getByLabel(label)).toHaveAttribute('href', link);
}
}
exports.WelcomeDashboardUiHelper = WelcomeDashboardUiHelper;
//# sourceMappingURL=WelcomeDashboardUiHelper.js.map