Check that premium user has subdomain

This commit is contained in:
John Whitlock 2024-09-09 13:21:46 -05:00
Родитель aeb6974f8c
Коммит 367e8634fc
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 082C735D154FB750
2 изменённых файлов: 6 добавлений и 1 удалений

Просмотреть файл

@ -56,6 +56,7 @@ export class DashboardPage {
readonly customMaskDoneButton: Locator;
readonly maskCardBottomMeta: Locator;
readonly maskCardTrackersCount: Locator;
readonly chooseSubdomain: Locator;
constructor(page: Page) {
this.page = page;
@ -128,6 +129,7 @@ export class DashboardPage {
this.dashBoardWithoutMasksEmail = page.locator(
'//section[starts-with(@class, "profile_no-premium-header")]',
);
this.chooseSubdomain = page.locator("id=mpp-choose-subdomain");
// mask card elements
this.maskCard = page.getByRole("button", { name: "Generate new mask" });
@ -218,6 +220,9 @@ export class DashboardPage {
if (numberOfMasks === 0) {
return;
}
// Check that the subdomain has been set for the premium user
expect(await this.chooseSubdomain.count()).toBe(0);
await this.generateNewMaskPremiumButton.click();
await this.premiumDomainMask.click();

Просмотреть файл

@ -40,7 +40,7 @@ test.describe("Premium - General Functionalities, Desktop", () => {
);
});
test("Verify that a premium user can generate a custom mask @health_check", async ({
test("Verify that a premium user can generate a custom mask @health_check", async ({
dashboardPage,
}) => {
// When there are zero masks, a random mask must be generated first