Skip to content

Commit af370b7

Browse files
committed
Check for the license type on Configuration screen
1 parent 53e2776 commit af370b7

File tree

3 files changed

+18
-2
lines changed

3 files changed

+18
-2
lines changed

src/Frontend/src/components/configuration/PlatformLicense.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const loading = computed(() => {
3131
<div class="box">
3232
<div class="row">
3333
<div class="license-info">
34-
<div><b>Platform license type:</b> {{ license.license_type }}{{ license.licenseEdition }}</div>
34+
<div><b>Platform license type:</b> <span aria-label="license-type">{{ license.license_type }}{{ license.licenseEdition }}</span></div>
3535

3636
<template v-if="licenseStatus.isSubscriptionLicense">
3737
<div>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
import { screen } from "@testing-library/vue";
2+
3+
export async function licenseTypeDetails() {
4+
const licenseType = await screen.findByRole("label", { name: "license-type" });
5+
return licenseType.textContent;
6+
}

src/Frontend/test/specs/configuration/viewing-license.spec.ts

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,23 @@
1+
import { expect, vi } from "vitest";
12
import { test, describe } from "../../drivers/vitest/driver";
3+
import * as precondition from "../../preconditions";
4+
import { licenseTypeDetails } from "./questions/licenseTypeDetails";
25

36
describe("FEATURE: License", () => {
47
describe("RULE: Platform license type should be shown shown", () => {
5-
test.todo("EXAMPLE: Valid platform license type should be shown");
8+
test.todo("EXAMPLE: Valid platform license type should be shown", async ({ driver }) => {
69

710
/* SCENARIO
811
Given the platform license is valid
912
Then the platform license type is shown
1013
*/
14+
await driver.setUp(precondition.hasActiveLicense);
15+
await driver.goTo("/configuration/license");
16+
17+
expect(await licenseTypeDetails()).toBe("Commercial, Enterprise");
18+
19+
20+
1121
});
1222
describe("RULE: License expiry date should be shown", () => {
1323
test.todo("EXAMPLE: Valid license expiry date should be shown");

0 commit comments

Comments
 (0)