Add release channel selector components, subject autocomplete, and related tests

- Implement components for `ReleaseChannelSelector`, including panel and sidebar variants.
- Add `ReleaseAssignmentSubjectAutocomplete` for user, subuser, and customer search functionality.
- Update i18n phrases for channel selector and subject assignment.
- Enhance unit and E2E tests for release channel availability, switching, and runtime configuration.
- Modify modules for channel-related state handling and runtime refresh mechanics.
This commit is contained in:
Jeppe Bundgaard
2026-05-20 10:31:49 +02:00
parent 100e477a95
commit 3715da8fd3
35 changed files with 2090 additions and 601 deletions
+13 -16
View File
@@ -17,15 +17,11 @@ const unavailableRuntime = {
description: "Early production validation before broader rollout.",
enabled: true,
default_channel: false,
frontend_base_url: null,
api_base_url: null,
},
versions: { frontend: null, api: null },
frontend_base_url: null,
api_base_url: null,
versions: { frontend: null, api: null, bundle_id: null },
availability: {
configured: false,
missing: ["frontend_base_url", "api_base_url"],
missing: ["release_bundle", "frontend_version", "api_version"],
status: "unconfigured",
},
capture_policy: {
@@ -36,15 +32,13 @@ const unavailableRuntime = {
},
};
const availableRuntime = (frontendBaseUrl) => ({
const availableRuntime = () => ({
...unavailableRuntime,
channel: {
...unavailableRuntime.channel,
frontend_base_url: frontendBaseUrl,
api_base_url: "https://api-canary.example.test",
versions: {
frontend: { version_label: "frontend-canary", commit_sha: "c0ffee" },
api: { version_label: "api-canary", commit_sha: "feedface" },
bundle_id: 31,
},
frontend_base_url: frontendBaseUrl,
api_base_url: "https://api-canary.example.test",
availability: {
configured: true,
missing: [],
@@ -81,8 +75,9 @@ test("users assigned to an unconfigured release channel can ignore the guard tem
await expect(guard).toBeVisible();
await expect(guard).toContainText("Release channel is not ready");
await expect(guard).toContainText("Canary");
await expect(page.getByTestId("release-channel-missing")).toContainText("Frontend URL");
await expect(page.getByTestId("release-channel-missing")).toContainText("API URL");
await expect(page.getByTestId("release-channel-missing")).toContainText("Release bundle");
await expect(page.getByTestId("release-channel-missing")).toContainText("Frontend version");
await expect(page.getByTestId("release-channel-missing")).toContainText("API version");
await expect(page.getByTestId("release-channel-next-check")).toContainText("Checking again in");
await page.getByTestId("release-channel-ignore").click();
@@ -129,7 +124,9 @@ test("users assigned to an unconfigured release channel can check again when it
const guard = page.getByTestId("release-channel-unavailable-page");
await expect(guard).toBeVisible();
releaseRuntime = availableRuntime(new URL(page.url()).origin);
const currentUrl = page.url();
releaseRuntime = availableRuntime();
await page.getByTestId("release-channel-check-again").click();
await expect(guard).toHaveCount(0);
await expect(page).toHaveURL(currentUrl);
});