-
+
License
@@ -61,27 +61,29 @@ function preventIfDisabled(e: Event) {
:class="{ active: isRouteSelected(routeLinks.throughput.setup.root) || isRouteSelected(routeLinks.throughput.setup.mask.link) || isRouteSelected(routeLinks.throughput.setup.diagnostics.link), disabled: notConnected }"
@click.capture="preventIfDisabled"
class="nav-item"
+ role="tab"
+ aria-label="usage-setup"
>
Usage Setup
-
+
MassTransit Connector
-
+
Health Check Notifications
-
+
Retry Redirects ({{ redirectCount }})
-
+
Connections
-
+
Endpoint Connection
diff --git a/src/Frontend/test/mocks/license-response-template.ts b/src/Frontend/test/mocks/license-response-template.ts
deleted file mode 100644
index 3f3380b689..0000000000
--- a/src/Frontend/test/mocks/license-response-template.ts
+++ /dev/null
@@ -1,13 +0,0 @@
-import LicenseInfo, { LicenseStatus } from "@/resources/LicenseInfo";
-
-export const activeLicenseResponse = {
- registered_to: "ACME Software",
- edition: "Enterprise",
- expiration_date: "",
- upgrade_protection_expiration: "2050-01-01T00:00:00.0000000Z",
- license_type: "Commercial",
- instance_name: "Particular.ServiceControl",
- trial_license: false,
- license_status: LicenseStatus.Valid,
- status: "valid",
-};
diff --git a/src/Frontend/test/preconditions/hasLicense.ts b/src/Frontend/test/preconditions/hasLicense.ts
deleted file mode 100644
index 8d20621ff5..0000000000
--- a/src/Frontend/test/preconditions/hasLicense.ts
+++ /dev/null
@@ -1,59 +0,0 @@
-import { activeLicenseResponse } from "../mocks/license-response-template";
-import { SetupFactoryOptions } from "../driver";
-import LicenseInfo, { LicenseStatus } from "@/resources/LicenseInfo";
-import { useLicense } from "@/composables/serviceLicense";
-
-const { license } = useLicense();
-
-export const hasActiveLicense = ({ driver }: SetupFactoryOptions) => {
- const serviceControlInstanceUrl = window.defaultConfig.service_control_url;
- driver.mockEndpoint(`${serviceControlInstanceUrl}license`, {
- body: activeLicenseResponse,
- });
- return activeLicenseResponse;
-};
-
-export enum LicenseType {
- Subscription,
- Trial,
- UpgradeProtection,
-}
-
-export const hasExpiredLicense = (licenseType: LicenseType, licenseExtensionUrl: string = "https://particular.net/extend-your-trial?p=servicepulse") => createLicenseMockedResponse(licenseType, false, licenseExtensionUrl);
-export const hasExpiringLicense = (licenseType: LicenseType, licenseExtensionUrl: string = "https://particular.net/extend-your-trial?p=servicepulse") => createLicenseMockedResponse(licenseType, true, licenseExtensionUrl);
-
-const createLicenseMockedResponse =
- (liceseType: LicenseType, expiring = false, licenseExtensionUrl: string) =>
- ({ driver }: SetupFactoryOptions) => {
- const serviceControlInstanceUrl = window.defaultConfig.service_control_url;
- let status: LicenseStatus;
-
- switch (liceseType) {
- case LicenseType.Subscription:
- status = expiring ? LicenseStatus.ValidWithExpiringSubscription : LicenseStatus.InvalidDueToExpiredSubscription;
- break;
- case LicenseType.Trial:
- status = expiring ? LicenseStatus.ValidWithExpiringTrial : LicenseStatus.InvalidDueToExpiredTrial;
- break;
- case LicenseType.UpgradeProtection:
- status = expiring ? LicenseStatus.ValidWithExpiringUpgradeProtection : LicenseStatus.InvalidDueToExpiredUpgradeProtection;
- break;
- }
-
- //We need to reset the global state to ensure the warning toast is always triggered by the value changing between multiple test runs. See documented issue and proposed solution https://github.com/Particular/ServicePulse/issues/1905
- license.license_status = LicenseStatus.Unavailable;
-
- driver.mockEndpoint(`${serviceControlInstanceUrl}license`, {
- body: {
- registered_to: "ACME Software",
- edition: "Enterprise",
- expiration_date: "",
- upgrade_protection_expiration: "2050-01-01T00:00:00.0000000Z",
- license_type: status === LicenseStatus.ValidWithExpiringTrial || status === LicenseStatus.InvalidDueToExpiredTrial ? "Trial" : "Commercial",
- instance_name: "Particular.ServiceControl",
- trial_license: status === LicenseStatus.ValidWithExpiringTrial || status === LicenseStatus.InvalidDueToExpiredTrial,
- license_status: status,
- license_extension_url: licenseExtensionUrl,
- },
- });
- };
diff --git a/src/Frontend/test/preconditions/index.ts b/src/Frontend/test/preconditions/index.ts
index 89b816c283..b2a0bcc10c 100644
--- a/src/Frontend/test/preconditions/index.ts
+++ b/src/Frontend/test/preconditions/index.ts
@@ -1,4 +1,4 @@
-export * from "../preconditions/hasLicense";
+export * from "../preconditions/licensing";
export { hasServiceControlMainInstance } from "../preconditions/hasServiceControlMainInstance";
export { hasServiceControlMonitoringInstance } from "../preconditions/hasServiceControlMonitoringInstance";
export { hasServiceControlMonitoringInstanceUrl } from "../preconditions/hasServiceControlMonitoringInstanceUrl";
@@ -15,6 +15,7 @@ export * from "./hasMonitoredEndpointDetails";
export * from "../preconditions/hasHeartbeatEndpoints";
export { serviceControlWithMonitoring } from "./serviceControlWithMonitoring";
export * from "./recoverability";
+export * from "./licensing";
export { hasLicensingReportAvailable } from "../preconditions/hasLicensingReportAvailable";
export { hasLicensingSettingTest } from "../preconditions/hasLicensingSettingTest";
export { hasLicensingEndpoints } from "../preconditions/hasLicensingEndpoints";
diff --git a/src/Frontend/test/preconditions/licensing.ts b/src/Frontend/test/preconditions/licensing.ts
new file mode 100644
index 0000000000..066a8e61f5
--- /dev/null
+++ b/src/Frontend/test/preconditions/licensing.ts
@@ -0,0 +1,90 @@
+import { SetupFactoryOptions } from "../driver";
+import LicenseInfo, { LicenseStatus, LicenseType } from "@/resources/LicenseInfo";
+import { useLicense } from "@/composables/serviceLicense";
+
+const { license } = useLicense();
+const licenseResponseTemplate = {
+ registered_to: "ACME Software",
+ edition: "Enterprise",
+ expiration_date: "2026-01-23T00:00:00.0000000Z",
+ upgrade_protection_expiration: "",
+ license_type: "Commercial",
+ instance_name: "Particular.ServiceControl",
+ trial_license: false,
+ license_status: LicenseStatus.Valid,
+ license_extension_url: "",
+ status: "valid",
+};
+export const hasActiveLicense = ({ driver }: SetupFactoryOptions) => {
+ const serviceControlInstanceUrl = window.defaultConfig.service_control_url;
+ driver.mockEndpoint(`${serviceControlInstanceUrl}license`, {
+ body: licenseResponseTemplate,
+ });
+ return licenseResponseTemplate;
+};
+export const hasExpiredLicense = (licenseType: LicenseType, expiredDays: number = 10, extensionUrl: string = "") => getLicenseMockedResponse(licenseType, expiredDays, extensionUrl, true);
+export const hasExpiringLicense = (licenseType: LicenseType, expiringInDays: number = 10, extensionUrl: string = "") => getLicenseMockedResponse(licenseType, expiringInDays, extensionUrl, false);
+
+const getLicenseMockedResponse =
+ (licenseType: LicenseType, expiringInDays: number, extensionUrl: string, isExpired: boolean) =>
+ ({ driver }: SetupFactoryOptions) => {
+ const serviceControlInstanceUrl = window.defaultConfig.service_control_url;
+ const customISOString = getCustomDateISOString(expiringInDays, isExpired);
+
+ let status: LicenseStatus;
+ let trialLicense = false;
+ let upgradeProtectionExpiration = "";
+ let expirationDate = "";
+ let licenseExtensionUrl = extensionUrl;
+
+ switch (licenseType) {
+ case LicenseType.Subscription:
+ status = isExpired ? LicenseStatus.InvalidDueToExpiredSubscription : LicenseStatus.ValidWithExpiringSubscription;
+ expirationDate = customISOString;
+ break;
+ case LicenseType.Trial:
+ status = isExpired ? LicenseStatus.InvalidDueToExpiredTrial : LicenseStatus.ValidWithExpiringTrial;
+ expirationDate = customISOString;
+ trialLicense = true;
+ licenseExtensionUrl = extensionUrl ? extensionUrl : "https://particular.net/extend-your-trial?p=servicepulse";
+ break;
+ case LicenseType.UpgradeProtection:
+ status = isExpired ? LicenseStatus.InvalidDueToExpiredUpgradeProtection : LicenseStatus.ValidWithExpiringUpgradeProtection;
+ upgradeProtectionExpiration = customISOString;
+ licenseExtensionUrl = extensionUrl ? extensionUrl : "https://particular.net/extend-your-trial?p=servicepulse";
+ break;
+ }
+
+ //We need to reset the global state to ensure the warning toast is always triggered by the value changing between multiple test runs. See documented issue and proposed solution https://github.com/Particular/ServicePulse/issues/1905
+ license.license_status = LicenseStatus.Unavailable;
+
+ const response = {
+ ...licenseResponseTemplate,
+ license_type: status === LicenseStatus.ValidWithExpiringTrial || status === LicenseStatus.InvalidDueToExpiredTrial ? "Trial" : "Commercial",
+ trial_license: trialLicense,
+ expiration_date: expirationDate,
+ upgrade_protection_expiration: upgradeProtectionExpiration,
+ license_status: status,
+ license_extension_url: licenseExtensionUrl,
+ };
+ console.log(response);
+ driver.mockEndpoint(`${serviceControlInstanceUrl}license`, {
+ body: response,
+ });
+ return response;
+ };
+
+function getCustomDateISOString(daysCount: number, isExpired: boolean) {
+ const today = new Date();
+ const customDate = new Date(today);
+
+ if (isExpired) {
+ customDate.setDate(today.getDate() - daysCount);
+ } else {
+ customDate.setDate(today.getDate() + daysCount);
+ }
+
+ const nativeISOString = customDate.toISOString(); // e.g., "2026-02-02T14:23:45.123Z"
+ const customISOString = nativeISOString.replace(/\.\d+Z$/, (match) => match.slice(0, -1).padEnd(8, "0") + "Z");
+ return customISOString;
+}
diff --git a/src/Frontend/test/specs/configuration/questions/licenseExpired.ts b/src/Frontend/test/specs/configuration/questions/licenseExpired.ts
new file mode 100644
index 0000000000..55afaafaf3
--- /dev/null
+++ b/src/Frontend/test/specs/configuration/questions/licenseExpired.ts
@@ -0,0 +1,6 @@
+import { screen } from "@testing-library/vue";
+
+export async function licenseExpired() {
+ const licenseExpiredText = await screen.findByRole("note", { name: "license-expired" });
+ return licenseExpiredText.textContent?.trim();
+}
diff --git a/src/Frontend/test/specs/configuration/questions/licenseExpiryDate.ts b/src/Frontend/test/specs/configuration/questions/licenseExpiryDate.ts
new file mode 100644
index 0000000000..d435c4d407
--- /dev/null
+++ b/src/Frontend/test/specs/configuration/questions/licenseExpiryDate.ts
@@ -0,0 +1,6 @@
+import { screen } from "@testing-library/vue";
+
+export async function licenseExpiryDate() {
+ const licenseExpiryDateElement = await screen.findByRole("note", { name: "license-expiry-date" });
+ return licenseExpiryDateElement;
+}
diff --git a/src/Frontend/test/specs/configuration/questions/licenseExpiryDaysLeft.ts b/src/Frontend/test/specs/configuration/questions/licenseExpiryDaysLeft.ts
new file mode 100644
index 0000000000..d4407975b2
--- /dev/null
+++ b/src/Frontend/test/specs/configuration/questions/licenseExpiryDaysLeft.ts
@@ -0,0 +1,6 @@
+import { screen } from "@testing-library/vue";
+
+export async function licenseExpiryDaysLeft() {
+ const licenseExpiryDaysLeftElement = await screen.findByRole("note", { name: "license-days-left" });
+ return licenseExpiryDaysLeftElement;
+}
diff --git a/src/Frontend/test/specs/configuration/questions/licenseTabs.ts b/src/Frontend/test/specs/configuration/questions/licenseTabs.ts
new file mode 100644
index 0000000000..7fc5a0d123
--- /dev/null
+++ b/src/Frontend/test/specs/configuration/questions/licenseTabs.ts
@@ -0,0 +1,12 @@
+import { screen } from "@testing-library/vue";
+
+export async function licenseTabList() {
+ const tabs = await screen.findAllByRole("tab");
+ return tabs;
+}
+export async function licenseTabNames() {
+ const tabs = await licenseTabList();
+ // Check the names of the tabs
+ const tabNames = tabs.map((tab) => tab.textContent?.trim());
+ return tabNames;
+}
diff --git a/src/Frontend/test/specs/configuration/questions/licenseTypeDetails.ts b/src/Frontend/test/specs/configuration/questions/licenseTypeDetails.ts
new file mode 100644
index 0000000000..09fdf1ee44
--- /dev/null
+++ b/src/Frontend/test/specs/configuration/questions/licenseTypeDetails.ts
@@ -0,0 +1,6 @@
+import { screen } from "@testing-library/vue";
+
+export async function licenseTypeDetails() {
+ const licenseType = await screen.findByRole("note", { name: "license-type" });
+ return licenseType.textContent;
+}
diff --git a/src/Frontend/test/specs/configuration/viewing-license.spec.ts b/src/Frontend/test/specs/configuration/viewing-license.spec.ts
index 218762bbf7..52b033c523 100644
--- a/src/Frontend/test/specs/configuration/viewing-license.spec.ts
+++ b/src/Frontend/test/specs/configuration/viewing-license.spec.ts
@@ -1,70 +1,114 @@
+import { expect } from "vitest";
import { test, describe } from "../../drivers/vitest/driver";
+import * as precondition from "../../preconditions";
+import { licenseTypeDetails } from "./questions/licenseTypeDetails";
+import { licenseExpiryDate } from "./questions/licenseExpiryDate";
+import { licenseExpiryDaysLeft } from "./questions/licenseExpiryDaysLeft";
+import { licenseExpired } from "./questions/licenseExpired";
+import { waitFor } from "@testing-library/vue";
+import { LicenseType } from "@/resources/LicenseInfo";
+import { licenseTabList, licenseTabNames } from "./questions/licenseTabs";
describe("FEATURE: License", () => {
- describe("RULE: Platform license type should be shown shown", () => {
- test.todo("EXAMPLE: Valid platform license type should be shown");
-
- /* SCENARIO
- Given the platform license is valid
- Then the platform license type is shown
- */
+ describe("RULE: Platform license type should be shown", () => {
+ test("EXAMPLE: The platform is running a commercial license", async ({ driver }) => {
+ await driver.setUp(precondition.serviceControlWithMonitoring);
+ await driver.setUp(precondition.hasActiveLicense);
+ await driver.goTo("/configuration/license");
+ await waitFor(async () => {
+ expect(await licenseTypeDetails()).toBe("Commercial, Enterprise");
+ });
+ });
});
- describe("RULE: License expiry date should be shown", () => {
- test.todo("EXAMPLE: Valid license expiry date should be shown");
- /* SCENARIO
- Given a valid platform license
- Then the license expiry date is shown
- */
+ describe("RULE: License expiry date should be shown", () => {
+ test("EXAMPLE: Valid license expiry date is shown", async ({ driver }) => {
+ await driver.setUp(precondition.serviceControlWithMonitoring);
+ await driver.setUp(precondition.hasActiveLicense);
+ await driver.goTo("/configuration/license");
+ await waitFor(async () => {
+ expect(await licenseExpiryDate()).toBeVisible();
+ });
+ });
});
- describe("RULE: Remaining license period should be displayed", () => {
- test.todo("EXAMPLE: An expired license should show 'expired'");
-
- /* SCENARIO
- Expired license
-
- Given an expired platform license
- Then "expired" is shown
- */
-
- test.todo("EXAMPLE: License expiring with 10 days should show 'expiring in X days'");
- /* SCENARIO
- License expiring soon
- Given a platform license with an expiry date within 10 days
- Then "expiring in X days" is shown
- */
-
- test.todo("EXAMPLE: License expiring tomorrow should show 'expiring tomorrow'");
- /* SCENARIO
- License expiring tomorrow
-
- Given a platform license which expires tomorrow
- Then "expiring tomorrow" is shown
- */
-
- test.todo("EXAMPLE: License expiring today should show 'expiring today'");
- /* SCENARIO
- License expiring today
-
- Given a platform license which expires today
- Then "expiring today" is shown
- */
-
- test.todo("EXAMPLE: License expiring in more than 10 days should show 'X days left");
- /* SCENARIO
- License expiring in the future
+ describe("RULE: License expired", () => {
+ test("EXAMPLE: An expired license", async ({ driver }) => {
+ await driver.setUp(precondition.serviceControlWithMonitoring);
+ await driver.setUp(precondition.hasExpiredLicense(LicenseType.Subscription, 5)); //license expired 6 days before
+ await driver.goTo("/configuration/license");
+ await waitFor(async () => {
+ expect(await licenseExpired()).toBe("Your license expired. Please update the license to continue using the Particular Service Platform.");
+ });
+ });
+ test("EXAMPLE: Visiting the configuration page with an expired license", async ({ driver }) => {
+ await driver.setUp(precondition.serviceControlWithMonitoring);
+ await driver.setUp(precondition.hasExpiredLicense(LicenseType.Subscription, 5)); //license expired 6 days before
+ await driver.goTo("/configuration/license");
+ await waitFor(async () => {
+ expect(await licenseTabList()).toHaveLength(2);
+ expect(await licenseTabNames()).toEqual(expect.arrayContaining(["License", "Usage Setup"]));
+ });
+ });
+ });
- Given a platform license which expires more than 10 days from now
- Then "X days left" is shown
- */
+ describe("RULE: License expiring soon must be displayed", () => {
+ test("EXAMPLE: License expiring in 11 days", async ({ driver }) => {
+ await driver.setUp(precondition.serviceControlWithMonitoring);
+ await driver.setUp(precondition.hasExpiringLicense(LicenseType.Subscription, 10));
+ await driver.goTo("/configuration/license");
+ await waitFor(async () => {
+ expect(await licenseExpiryDaysLeft()).toBeVisible();
+ expect((await licenseExpiryDaysLeft()).textContent).toContain("expiring in 11 days");
+ });
+ });
+ test("EXAMPLE: License expiring tomorrow", async ({ driver }) => {
+ await driver.setUp(precondition.serviceControlWithMonitoring);
+ await driver.setUp(precondition.hasExpiringLicense(LicenseType.Subscription, 0));
+ await driver.goTo("/configuration/license");
+ await waitFor(async () => {
+ expect(await licenseExpiryDaysLeft()).toBeVisible();
+ expect((await licenseExpiryDaysLeft()).textContent).toContain("expiring tomorrow");
+ });
+ });
+ test("EXAMPLE: License expiring today", async ({ driver }) => {
+ await driver.setUp(precondition.serviceControlWithMonitoring);
+ await driver.setUp(precondition.hasExpiringLicense(LicenseType.Subscription, -1));
+ await driver.goTo("/configuration/license");
+ await waitFor(async () => {
+ expect(await licenseExpiryDaysLeft()).toBeVisible();
+ expect((await licenseExpiryDaysLeft()).textContent).toContain("expiring today");
+ });
+ });
});
- describe("RULE: Non-license options should be hidden if license has expired", () => {
- test.todo("EXAMPLE: Only 'LICENSE' tab is visible when license has expired");
- /* SCENARIO
- Given an expired license
- Then "LICENSE" is the only visible tab in the Configuration screen
- */
+ describe("RULE: Upgrade Protection license expiring soon must be displayed with a reference to how much time is left and a warning:'Once upgrade protection expires, you'll no longer have access to support or new product versions. '", () => {
+ test("EXAMPLE: Upgrade Protection license expiring in 11 days", async ({ driver }) => {
+ await driver.setUp(precondition.serviceControlWithMonitoring);
+ await driver.setUp(precondition.hasExpiringLicense(LicenseType.UpgradeProtection, 10));
+ await driver.goTo("/configuration/license");
+ await waitFor(async () => {
+ expect(await licenseExpiryDaysLeft()).toBeVisible();
+ expect((await licenseExpiryDaysLeft()).textContent).toContain("11 days left");
+ });
+ });
+ test("EXAMPLE: Upgrade Protection license expiring tomorrow", async ({ driver }) => {
+ await driver.setUp(precondition.serviceControlWithMonitoring);
+ await driver.setUp(precondition.hasExpiringLicense(LicenseType.UpgradeProtection, 0));
+ await driver.goTo("/configuration/license");
+ await waitFor(async () => {
+ expect(await licenseExpiryDaysLeft()).toBeVisible();
+ expect((await licenseExpiryDaysLeft()).textContent).toContain("1 day left");
+ });
+ });
+ test("EXAMPLE: Upgrade Protection license expiring today", async ({ driver }) => {
+ await driver.setUp(precondition.serviceControlWithMonitoring);
+ await driver.setUp(precondition.hasExpiringLicense(LicenseType.UpgradeProtection, -1));
+ await driver.goTo("/configuration/license");
+ await waitFor(async () => {
+ expect(await licenseExpiryDaysLeft()).toBeVisible();
+ expect((await licenseExpiryDaysLeft()).textContent).toContain("expired");
+ });
+ });
});
});
diff --git a/src/Frontend/test/specs/licensing/license-enforcement.spec.ts b/src/Frontend/test/specs/licensing/license-enforcement.spec.ts
index 4e929a3587..7924c71348 100644
--- a/src/Frontend/test/specs/licensing/license-enforcement.spec.ts
+++ b/src/Frontend/test/specs/licensing/license-enforcement.spec.ts
@@ -5,6 +5,7 @@ import { expiredLicenseMessageWithValue } from "./questions/expiredLicenseMessag
import { viewYourLicenseButton } from "./questions/viewYourLicenseButton";
import { extendYourLicenseButton } from "./questions/extendYourLicenseButton";
import { getAlertNotifications } from "./questions/alertNotifications";
+import { LicenseType } from "@/resources/LicenseInfo";
import flushPromises from "flush-promises";
describe("FEATURE: EXPIRING license detection", () => {
@@ -13,7 +14,7 @@ describe("FEATURE: EXPIRING license detection", () => {
test(`EXAMPLE: Expiring trial with ${licenseExtensionUrl} as license extension url `, async ({ driver }) => {
//Arrange
await driver.setUp(precondition.serviceControlWithMonitoring);
- await driver.setUp(precondition.hasExpiringLicense(precondition.LicenseType.Trial, licenseExtensionUrl));
+ await driver.setUp(precondition.hasExpiringLicense(LicenseType.Trial, 10, licenseExtensionUrl));
await driver.goTo("monitoring");
@@ -27,8 +28,8 @@ describe("FEATURE: EXPIRING license detection", () => {
});
[
- { description: "Expiring upgrade protection", licenseType: precondition.LicenseType.UpgradeProtection, textMatch: /once upgrade protection expires, you'll no longer have access to support or new product versions/i },
- { description: "Expiring platform subscription", licenseType: precondition.LicenseType.Subscription, textMatch: /Once the license expires you'll no longer be able to continue using the Particular Service Platform/i },
+ { description: "Expiring upgrade protection", licenseType: LicenseType.UpgradeProtection, textMatch: /once upgrade protection expires, you'll no longer have access to support or new product versions/i },
+ { description: "Expiring platform subscription", licenseType: LicenseType.Subscription, textMatch: /Once the license expires you'll no longer be able to continue using the Particular Service Platform/i },
].forEach(({ description, licenseType, textMatch }) => {
test(`EXAMPLE: ${description}`, async ({ driver }) => {
//Arrange
@@ -53,7 +54,7 @@ describe("FEATURE: EXPIRED license detection", () => {
test("EXAMPLE: Expired trial", async ({ driver }) => {
//Arrange
await driver.setUp(precondition.serviceControlWithMonitoring);
- await driver.setUp(precondition.hasExpiredLicense(precondition.LicenseType.Trial));
+ await driver.setUp(precondition.hasExpiredLicense(LicenseType.Trial));
//Act
await driver.goTo("monitoring");
@@ -73,7 +74,7 @@ describe("FEATURE: EXPIRED license detection", () => {
test("EXAMPLE: Expired platform subscription", async ({ driver }) => {
//Arrange
await driver.setUp(precondition.serviceControlWithMonitoring);
- await driver.setUp(precondition.hasExpiredLicense(precondition.LicenseType.Subscription));
+ await driver.setUp(precondition.hasExpiredLicense(LicenseType.Subscription));
//Act
await driver.goTo("monitoring");
@@ -93,7 +94,7 @@ describe("FEATURE: EXPIRED license detection", () => {
test("EXAMPLE: Expired upgrade protection", async ({ driver }) => {
//Arrange
await driver.setUp(precondition.serviceControlWithMonitoring);
- await driver.setUp(precondition.hasExpiredLicense(precondition.LicenseType.UpgradeProtection));
+ await driver.setUp(precondition.hasExpiredLicense(LicenseType.UpgradeProtection));
//Act
await driver.goTo("monitoring");
diff --git a/src/Frontend/test/specs/licensing/trial-license-notifications.spec.ts b/src/Frontend/test/specs/licensing/trial-license-notifications.spec.ts
index 3a7ff95a10..07d70f1805 100644
--- a/src/Frontend/test/specs/licensing/trial-license-notifications.spec.ts
+++ b/src/Frontend/test/specs/licensing/trial-license-notifications.spec.ts
@@ -3,6 +3,7 @@ import { expect } from "vitest";
import { test, describe } from "../../drivers/vitest/driver";
import * as precondition from "../../preconditions";
import { getTrialBar } from "./questions/trialLicenseBar";
+import { LicenseType } from "@/resources/LicenseInfo";
import flushPromises from "flush-promises";
describe("FEATURE: Trial license notifications", () => {
@@ -11,7 +12,7 @@ describe("FEATURE: Trial license notifications", () => {
test(`EXAMPLE: ${viewname}`, async ({ driver }) => {
//Arrange
await driver.setUp(precondition.serviceControlWithMonitoring);
- await driver.setUp(precondition.hasExpiringLicense(precondition.LicenseType.Trial));
+ await driver.setUp(precondition.hasExpiringLicense(LicenseType.Trial));
await driver.goTo(viewname);
@@ -28,7 +29,7 @@ describe("FEATURE: Trial license notifications", () => {
test(`EXAMPLE: ${viewname}`, async ({ driver }) => {
//Arrange
await driver.setUp(precondition.serviceControlWithMonitoring);
- await driver.setUp(precondition.hasExpiringLicense(precondition.LicenseType.Subscription));
+ await driver.setUp(precondition.hasExpiringLicense(LicenseType.Subscription));
await driver.goTo(viewname);