diff --git a/landing-zone-configurator/app/apps/web/src/navigation.ts b/landing-zone-configurator/app/apps/web/src/navigation.ts
index 94513e69..b65998c9 100644
--- a/landing-zone-configurator/app/apps/web/src/navigation.ts
+++ b/landing-zone-configurator/app/apps/web/src/navigation.ts
@@ -78,7 +78,7 @@ function readRoute() {
? "apply"
: path === "/deployments/plan"
? "plan"
- : "preparation";
+ : "plan";
return {
view,
selected: template ?? standaloneTemplate,
@@ -93,7 +93,7 @@ export function useNavigation(restoreEditor: boolean) {
view: "editor" as const,
selected: standaloneTemplate,
step: "basics" as const,
- deploymentStep: "preparation" as const,
+ deploymentStep: "plan" as const,
}
: readRoute(),
);
@@ -130,7 +130,7 @@ export function useNavigation(restoreEditor: boolean) {
: view === "deployments"
? detail === "plan" || detail === "apply"
? `/deployments/${detail}`
- : "/deployments"
+ : "/deployments/plan"
: view === "credentials"
? "/credentials"
: view === "repositories"
diff --git a/landing-zone-configurator/app/e2e/configuration-audit-save.spec.ts b/landing-zone-configurator/app/e2e/configuration-audit-save.spec.ts
index e5d0b120..ea6e2b59 100644
--- a/landing-zone-configurator/app/e2e/configuration-audit-save.spec.ts
+++ b/landing-zone-configurator/app/e2e/configuration-audit-save.spec.ts
@@ -143,6 +143,14 @@ test("normal save preserves managed audit through the saved list and a separatel
},
});
});
+ await page.route("**/api/v1/plans", (r) =>
+ r.fulfill({
+ json:
+ r.request().method() === "POST"
+ ? { id: "99999999-2222-4333-8444-555555555555" }
+ : { runs: [] },
+ }),
+ );
await page.goto("/configurations");
await page
.getByRole("button", {
@@ -185,7 +193,7 @@ test("normal save preserves managed audit through the saved list and a separatel
});
await page
.getByRole("button", {
- name: `Deployment vorbereiten: ${stored.name}`,
+ name: `Plan erstellen: ${stored.name}`,
exact: true,
})
.click();
@@ -207,26 +215,25 @@ test("normal save preserves managed audit through the saved list and a separatel
await expect(storage.getByText(/Revision 16/)).toBeVisible();
await storage
.getByRole("button", {
- name: `Deployment vorbereiten: ${stored.name}`,
+ name: `Plan erstellen: ${stored.name}`,
exact: true,
})
.click();
- await expect(page).toHaveURL(/\/deployments$/);
- await page
- .getByLabel(
- "Ich bestätige: Diese Vorbereitung verwendet den aktuellen Accelerator-Stand für Plattformverträge.",
- { exact: false },
- )
- .check();
- await page
- .getByRole("button", {
- name: "Zugang prüfen und Vorbereitung speichern",
+ await expect(page).toHaveURL(/\/deployments\/plan$/);
+ const plan = page.getByRole("dialog", {
+ name: "Plan erstellen",
+ exact: true,
+ });
+ await plan
+ .getByRole("checkbox", {
+ name: "Ich bestätige Zielorganisation und State-Zuordnung für diesen Plan.",
exact: true,
})
+ .check();
+ await plan
+ .getByRole("button", { name: "Plan erstellen", exact: true })
.click();
- await expect(
- page.getByText("Vorbereitung gespeichert.", { exact: false }),
- ).toBeVisible();
+ await expect(plan).toHaveCount(0);
expect(preparations).toHaveLength(1);
expect(writes).toBe(1);
});
diff --git a/landing-zone-configurator/app/e2e/configurator.spec.ts b/landing-zone-configurator/app/e2e/configurator.spec.ts
index f1727e90..b32dd5e3 100644
--- a/landing-zone-configurator/app/e2e/configurator.spec.ts
+++ b/landing-zone-configurator/app/e2e/configurator.spec.ts
@@ -3923,50 +3923,37 @@ for (const format of ["legacy", "common"] as const) {
await page
.getByRole("button", { name: fork.fullName, exact: true })
.click();
- await page.getByRole("button", { name: /Deployment vorbereiten/ }).click();
- await expect(page).toHaveURL(/\/deployments$/);
+ await page.getByRole("button", { name: /Plan erstellen/ }).click();
+ await expect(page).toHaveURL(/\/deployments\/plan$/);
+ const dialog = page.getByRole("dialog", {
+ name: "Plan erstellen",
+ exact: true,
+ });
await expect(
- page.getByText(draft.organization, { exact: true }),
+ dialog.getByText(draft.organization, { exact: true }),
).toBeVisible();
- await page.getByLabel("Persönlicher Zugang").selectOption(profileId);
- await page
- .getByRole("button", { name: "Zugang prüfen und Vorbereitung speichern" })
- .click();
- await expect(page.getByRole("status")).toContainText(
- "Es wurde kein Plan oder Apply ausgeführt",
- );
- await page.reload();
- await page
- .getByLabel("Vorbereitung auswählen", { exact: true })
- .selectOption(record.id);
await expect(
- page.getByText("Vorbereitet · Apply erst nach Planprüfung und Freigabe", {
- exact: true,
- }),
- ).toBeVisible();
-
- await page
- .getByRole("button", { name: "Weiter zu Plan", exact: true })
- .click();
- await page
- .getByLabel("Gespeicherte Vorbereitung", { exact: true })
- .selectOption(record.id);
- const startPlan = page.getByRole("button", {
- name: "Plattform planen",
- exact: true,
- includeHidden: true,
- });
- await expect(startPlan).toBeDisabled();
- await page
+ dialog.getByLabel("Deployment-Zugang", { exact: true }),
+ ).toHaveValue(profileId);
+ await expect(
+ dialog.getByRole("button", { name: "Plan erstellen", exact: true }),
+ ).toBeDisabled();
+ expect(stored).toBe(false);
+ await dialog
.getByRole("checkbox", {
- name: /Ich bestätige: Zielorganisation und State-Zuordnung/,
+ name: "Ich bestätige Zielorganisation und State-Zuordnung für diesen Plan.",
+ exact: true,
})
.check();
- await startPlan.click();
+ await dialog
+ .getByRole("button", { name: "Plan erstellen", exact: true })
+ .click();
await expect(
page.getByRole("status").filter({ hasText: /Plan wird berechnet/ }),
).toBeVisible();
- await expect(startPlan).toBeDisabled();
+ await expect(
+ page.getByRole("button", { name: "Neuen Plan erstellen", exact: true }),
+ ).toBeDisabled();
await expect(
page
.locator(".plan-runs")
@@ -3978,17 +3965,14 @@ for (const format of ["legacy", "common"] as const) {
page.getByText("Änderungen geplant – nichts angewendet."),
).toBeVisible();
await expect(page.getByText("12", { exact: true })).toBeVisible();
- await page
- .getByRole("navigation", { name: "Konfiguration", exact: true })
- .getByRole("button", { name: "Vorbereitung", exact: true })
- .click();
- await page
- .getByLabel("Vorbereitung auswählen", { exact: true })
- .selectOption(record.id);
- await page.getByText("Versionsnachweise", { exact: true }).click();
- await expect(page.getByText(head, { exact: true })).toBeVisible();
+ await expect(
+ page.getByLabel("Gespeicherte Vorbereitung", { exact: true }),
+ ).toHaveCount(0);
+ await expect(
+ page.getByRole("button", { name: /Vorbereitung entfernen/ }),
+ ).toHaveCount(0);
await page.screenshot({
- path: testInfo.outputPath("preparation.png"),
+ path: testInfo.outputPath("direct-plan-history.png"),
fullPage: true,
});
expect(
@@ -3996,16 +3980,6 @@ for (const format of ["legacy", "common"] as const) {
() => window.document.documentElement.scrollWidth <= innerWidth,
),
).toBe(true);
- page.once("dialog", (dialog) => dialog.accept());
- await page.getByRole("button", { name: /Vorbereitung entfernen/ }).click();
- await expect(page.getByRole("alert")).toContainText(
- "besitzt Plan-Nachweise",
- );
- await expect(
- page.getByText("Vorbereitet · Apply erst nach Planprüfung und Freigabe", {
- exact: true,
- }),
- ).toHaveCount(1);
});
}
@@ -4116,8 +4090,26 @@ test.describe("explicit saved-plan approval", () => {
},
}),
);
+ const currentDraft = editCommonInput(
+ editCommonInput(
+ createEditorConfiguration("standalone", configurationId),
+ "organization_id",
+ organizationId,
+ ),
+ "owner_email",
+ "platform@company.test",
+ );
+ const current = {
+ id: configurationId,
+ name: "Datenbank-Plattform",
+ revision: 7,
+ draft: currentDraft,
+ };
await page.route("**/api/v1/configurations", (route) =>
- route.fulfill({ json: { configurations: [] } }),
+ route.fulfill({ json: { configurations: [current] } }),
+ );
+ await page.route(`**/api/v1/configurations/${configurationId}`, (route) =>
+ route.fulfill({ json: { configuration: current } }),
);
await page.route("**/api/v1/credentials", (route) =>
route.fulfill({
@@ -4367,19 +4359,22 @@ test.describe("explicit saved-plan approval", () => {
exact: true,
});
await tabs
- .getByRole("button", { name: "Prepare deployment", exact: true })
+ .getByRole("button", { name: "Create plan", exact: true })
.click();
await expect(
- page.getByRole("heading", { name: "Preparation", level: 1 }),
+ page.getByRole("dialog", { name: "Create plan", exact: true }),
).toBeVisible();
- await page
- .getByRole("combobox", { name: "Select preparation", exact: true })
- .selectOption(preparationId);
await expect(
- page.getByRole("heading", { name: preparation.name, exact: true }),
- ).toBeVisible();
- await expect(page.getByText(/Plan history|Apply history/)).toHaveCount(0);
- await tabs.getByRole("button", { name: "Plan", exact: true }).click();
+ page.getByRole("button", { name: "Preparation", exact: true }),
+ ).toHaveCount(0);
+ await page
+ .getByRole("dialog")
+ .getByRole("button", { name: "Close", exact: true })
+ .click();
+ await page
+ .getByRole("navigation", { name: "Main navigation", exact: true })
+ .getByRole("button", { name: "Deployments", exact: true })
+ .click();
await expect(
page.getByRole("heading", { name: "Plan", level: 1 }),
).toBeVisible();
@@ -4613,26 +4608,24 @@ test.describe("explicit saved-plan approval", () => {
});
await expect(tabs).toContainText("Revision 7");
await tabs
- .getByRole("button", { name: "Deployment vorbereiten", exact: true })
+ .getByRole("button", { name: "Plan erstellen", exact: true })
.click();
await expect(
- page.getByLabel("Gespeicherte Konfiguration", { exact: true }),
- ).toHaveValue(configurationId);
- await tabs.getByRole("button", { name: "Plan", exact: true }).click();
- await page.getByText("Neuen Plan erstellen", { exact: true }).click();
- const preparationSelection = page.getByLabel("Gespeicherte Vorbereitung", {
- exact: true,
- });
- await expect(preparationSelection.locator("option")).toHaveText([
- "Bitte auswählen",
- "Revision 7 - 44444444 - Datenbank-Plattform",
- "Revision 6 - 66666666 - Datenbank-Plattform",
- "Revision 7 - 55555555 - Datenbank-Plattform",
- ]);
- await preparationSelection.selectOption(previousPreparation.id);
- await expect(preparationSelection).toHaveValue(previousPreparation.id);
- await preparationSelection.selectOption(repeatedPreparation.id);
- await expect(preparationSelection).toHaveValue(repeatedPreparation.id);
+ page
+ .getByRole("dialog")
+ .getByText("Aktueller gespeicherter Stand", { exact: true }),
+ ).toBeVisible();
+ await expect(
+ page.getByLabel("Gespeicherte Vorbereitung", { exact: true }),
+ ).toHaveCount(0);
+ await page
+ .getByRole("dialog")
+ .getByRole("button", { name: "Schließen", exact: true })
+ .click();
+ await page
+ .getByRole("navigation", { name: "Hauptnavigation", exact: true })
+ .getByRole("button", { name: "Deployments", exact: true })
+ .click();
expect(
await page.evaluate(
() => document.documentElement.scrollWidth <= innerWidth,
@@ -4667,7 +4660,7 @@ test.describe("explicit saved-plan approval", () => {
page.getByRole("button", { name: "Freigegebenen Plan anwenden" }),
).toHaveCount(0);
await expect(
- page.getByRole("button", { name: "Plattform planen", exact: true }),
+ page.getByRole("button", { name: "Neuen Plan erstellen", exact: true }),
).toHaveCount(0);
await page.reload();
await expect(tabs).toContainText("Revision 7");
@@ -4716,8 +4709,11 @@ test.describe("explicit saved-plan approval", () => {
await expect(name).toHaveValue("Meine Plattform");
await name.fill("Meine Plattform geändert");
await expect(
- tabs.getByRole("button", { name: "Deployment vorbereiten", exact: true }),
- ).toBeDisabled();
+ tabs.getByRole("button", {
+ name: "Speichern und Plan erstellen",
+ exact: true,
+ }),
+ ).toBeEnabled();
await page
.getByRole("navigation", { name: "Hauptnavigation", exact: true })
.getByRole("button", { name: "Deployments", exact: true })
@@ -4743,16 +4739,26 @@ test.describe("explicit saved-plan approval", () => {
})
.click();
await expect(name).toHaveValue("Meine Plattform geändert");
- await page
- .getByRole("button", {
- name: "Speichern und zur Bereitstellung",
- exact: true,
- })
+ const storage = page.getByRole("region", {
+ name: "Konfiguration speichern",
+ exact: true,
+ });
+ await storage
+ .getByRole("button", { name: "Konfiguration speichern", exact: true })
.click();
- await expect(page).toHaveURL(/\/deployments$/);
await expect(tabs).toContainText("Revision 8");
+ await storage
+ .getByRole("button", { name: "Plan erstellen", exact: true })
+ .click();
+ await expect(
+ page.getByRole("dialog", { name: "Plan erstellen", exact: true }),
+ ).toBeVisible();
expect(saves).toBe(1);
expect(cloudMutations).toEqual([]);
+ await page
+ .getByRole("dialog")
+ .getByRole("button", { name: "Schließen", exact: true })
+ .click();
expect(
await page.evaluate(
() => document.documentElement.scrollWidth <= innerWidth,
@@ -4940,76 +4946,54 @@ test.describe("explicit saved-plan approval", () => {
},
});
});
- await page.goto("/deployments");
- await expect(page).toHaveURL(/\/deployments$/);
- for (const reload of [false, true]) {
- if (reload) await page.reload();
- if (useS3) {
- await expect(
- page.getByText(/Organisationsarbeitsbereichen sind noch nicht/),
- ).toHaveCount(0);
- await expect(
- page.getByLabel("Gespeicherte Konfiguration", { exact: true }),
- ).toHaveValue(reload ? configurationId : "");
- if (!reload) {
- await page
- .getByLabel("Gespeicherte Konfiguration", { exact: true })
- .selectOption(configurationId);
- }
- await expect(page.getByLabel("Persönlicher Zugang")).toHaveValue("");
- await page
- .getByLabel("Persönlicher Zugang")
- .selectOption(credentialId);
- }
+ await page.goto("/configurations");
+ await page
+ .getByRole("button", {
+ name: `Plan erstellen: ${configuration.name}`,
+ exact: true,
+ })
+ .click();
+ const dialog = page.getByRole("dialog", {
+ name: "Plan erstellen",
+ exact: true,
+ });
+ await expect(
+ page.getByLabel("Gespeicherte Vorbereitung", { exact: true }),
+ ).toHaveCount(0);
+ await expect(
+ dialog.getByLabel("Deployment-Zugang", { exact: true }),
+ ).toHaveValue(useS3 ? "" : credentialId);
+ await dialog
+ .getByLabel("Deployment-Zugang", { exact: true })
+ .selectOption(credentialId);
+ expect(stored).toBe(false);
+ expect(planned).toBe(false);
+ await dialog
+ .getByText("State-Zuordnung und Ausführungsdetails", { exact: true })
+ .click();
+ if (useS3) {
await expect(
- page.getByLabel("Gespeicherte Konfiguration", { exact: true }),
- ).toHaveValue(configurationId);
- await expect(page.getByLabel("Persönlicher Zugang")).toHaveValue(
- credentialId,
- );
- expect(stored).toBe(false);
- expect(planned).toBe(false);
- }
- await page.getByText(/^State-Backend ·/).click();
- if (!useS3) {
+ dialog.getByLabel("Backend der Landing Zone", { exact: true }),
+ ).toHaveValue(backendId);
await expect(
- page.getByText("Accelerator-Standard", { exact: true }),
- ).toBeVisible();
+ dialog.getByLabel("Backend der Landing Zone", { exact: true }),
+ ).toBeDisabled();
+ } else {
await expect(
- page.getByText("Management-State-Bucket · Anlage im ersten Apply", {
+ dialog.getByText("Management-State-Bucket · Anlage im ersten Apply", {
exact: true,
}),
).toBeVisible();
await expect(
- page.getByText("terraform.tfstate", { exact: true }),
- ).toBeVisible();
- await expect(
- page.getByLabel("S3 Access Key", { exact: true }),
+ dialog.getByLabel("S3 Access Key", { exact: true }),
).not.toBeVisible();
}
- if (useS3) {
- await expect(
- page.getByLabel("Backend der Landing Zone", { exact: true }),
- ).toHaveValue(backendId);
- await expect(
- page.getByLabel("Backend der Landing Zone", { exact: true }),
- ).toBeDisabled();
- }
- await page.getByLabel("Persönlicher Zugang").selectOption(credentialId);
- if (currentSource) {
- await expect(
- page.getByRole("button", {
- name: "Zugang prüfen und Vorbereitung speichern",
- }),
- ).toBeDisabled();
- expect(stored).toBe(false);
- expect(planned).toBe(false);
- await page
- .getByRole("checkbox", {
- name: /^Ich bestätige: Diese Vorbereitung verwendet/,
- })
- .check();
- }
+ await dialog
+ .getByRole("checkbox", {
+ name: "Ich bestätige Zielorganisation und State-Zuordnung für diesen Plan.",
+ exact: true,
+ })
+ .check();
if (currentSource) {
for (const [code, message] of [
[
@@ -5027,53 +5011,24 @@ test.describe("explicit saved-plan approval", () => {
],
] as const) {
preparationError = code;
- await page
- .getByRole("button", {
- name: "Zugang prüfen und Vorbereitung speichern",
- })
+ await dialog
+ .getByRole("button", { name: "Plan erstellen", exact: true })
.click();
- await expect(page.getByRole("alert")).toContainText(message);
+ await expect(dialog.getByRole("alert")).toContainText(message);
expect(stored).toBe(false);
expect(planned).toBe(false);
+ await expect(
+ dialog.getByLabel("Deployment-Zugang", { exact: true }),
+ ).toHaveValue(credentialId);
}
preparationError = null;
- await page
- .getByRole("button", { name: "Vorbereitungen aktualisieren" })
- .click();
- await expect(
- page.getByLabel("Gespeicherte Konfiguration", { exact: true }),
- ).toHaveValue(configurationId);
- await expect(page.getByLabel("Persönlicher Zugang")).toHaveValue(
- credentialId,
- );
- await expect(
- page.getByRole("checkbox", {
- name: /^Ich bestätige: Diese Vorbereitung verwendet/,
- }),
- ).toBeChecked();
}
- await page
- .getByRole("button", {
- name: "Zugang prüfen und Vorbereitung speichern",
- })
- .click();
- await expect(page.getByRole("status")).toContainText(
- "Es wurde kein Plan oder Apply ausgeführt",
- );
- await page
- .getByRole("button", { name: "Weiter zu Plan", exact: true })
- .click();
- await page
- .getByLabel("Gespeicherte Vorbereitung", { exact: true })
- .selectOption(preparationId);
- await page
- .getByRole("checkbox", {
- name: /Ich bestätige: Zielorganisation und State-Zuordnung/,
- })
- .check();
- await page
- .getByRole("button", { name: "Plattform planen", exact: true })
+ await dialog
+ .getByRole("button", { name: "Plan erstellen", exact: true })
.click();
+ await expect(dialog).toHaveCount(0);
+ expect(stored).toBe(true);
+ expect(planned).toBe(true);
await page
.getByRole("button", { name: "Weiter zu Apply", exact: true })
.click();
@@ -5103,6 +5058,9 @@ test.describe("explicit saved-plan approval", () => {
page,
}, testInfo) => {
const githubRequests = await setup(page);
+ await page.route("**/api/v1/plans", (route) =>
+ route.fulfill({ json: { runs: [] } }),
+ );
const backendId = "77777777-2222-4333-8444-555555555555";
const descriptor = {
bucket: "customer-tfstate",
@@ -5144,7 +5102,12 @@ test.describe("explicit saved-plan approval", () => {
}),
);
await page.goto("/deployments");
- await page.getByText(/^State-Backend ·/).click();
+ await page
+ .getByRole("button", { name: "Neuen Plan erstellen", exact: true })
+ .click();
+ await page
+ .getByText("State-Zuordnung und Ausführungsdetails", { exact: true })
+ .click();
await page
.getByText("Bestehendes S3-Backend registrieren", { exact: true })
.click();
@@ -5184,12 +5147,19 @@ test.describe("explicit saved-plan approval", () => {
expect(text).not.toContain("test-secret-value");
expect(text).not.toContain("test-access-id");
await page.reload();
- await page.getByText(/^State-Backend ·/).click();
+ await page
+ .getByRole("button", { name: "Neuen Plan erstellen", exact: true })
+ .click();
+ await page
+ .getByText("State-Zuordnung und Ausführungsdetails", { exact: true })
+ .click();
await page
.getByText("Bestehendes S3-Backend registrieren", { exact: true })
.click();
await expect(
- page.getByText("customer-tfstate / terraform.tfstate", { exact: true }),
+ page
+ .getByRole("paragraph")
+ .filter({ hasText: /^customer-tfstate \/ terraform\.tfstate$/ }),
).toBeVisible();
expect(githubRequests).toEqual([]);
expect(
@@ -5734,8 +5704,9 @@ test.describe("explicit saved-plan approval", () => {
.click();
await page.getByText("Neuen Plan erstellen", { exact: true }).click();
await page
- .getByLabel("Gespeicherte Vorbereitung", { exact: true })
- .selectOption(preparationId);
+ .getByRole("dialog")
+ .getByRole("button", { name: "Schließen", exact: true })
+ .click();
await page
.getByRole("navigation", { name: "Konfiguration", exact: true })
.getByRole("button", { name: "Apply", exact: true })
@@ -5801,8 +5772,9 @@ test.describe("explicit saved-plan approval", () => {
.click();
await page.getByText("Neuen Plan erstellen", { exact: true }).click();
await page
- .getByLabel("Gespeicherte Vorbereitung", { exact: true })
- .selectOption(preparationId);
+ .getByRole("dialog")
+ .getByRole("button", { name: "Schließen", exact: true })
+ .click();
await page
.getByRole("navigation", { name: "Konfiguration", exact: true })
.getByRole("button", { name: "Apply", exact: true })
@@ -5972,16 +5944,8 @@ test.describe("explicit saved-plan approval", () => {
mutations.push(request.url());
});
await page.goto("/deployments/plan");
- await page
- .getByLabel("Gespeicherte Vorbereitung", { exact: true })
- .selectOption(preparationId);
- await page
- .getByRole("checkbox", {
- name: /Ich bestätige: Zielorganisation und State-Zuordnung/,
- })
- .check();
const planButton = page.getByRole("button", {
- name: "Plattform planen",
+ name: "Neuen Plan erstellen",
exact: true,
});
await expect(planButton).toBeDisabled();
@@ -5997,7 +5961,7 @@ test.describe("explicit saved-plan approval", () => {
"New plans are blocked until the failed apply and its state have been reviewed and reconciled.",
);
await expect(
- page.getByRole("button", { name: "Plan platform", exact: true }),
+ page.getByRole("button", { name: "Create new plan", exact: true }),
).toBeDisabled();
expect(mutations).toEqual([]);
expect(
@@ -6249,19 +6213,10 @@ test.describe("explicit saved-plan approval", () => {
expect(reconciled).toBe(false);
} else {
await expect(page).toHaveURL(/\/deployments\/plan$/);
- await page
- .getByLabel("Gespeicherte Vorbereitung", { exact: true })
- .selectOption(preparationId);
const planButton = page.getByRole("button", {
- name: "Plattform planen",
+ name: "Neuen Plan erstellen",
exact: true,
});
- await expect(planButton).toBeDisabled();
- await page
- .getByRole("checkbox", {
- name: /Ich bestätige: Zielorganisation und State-Zuordnung/,
- })
- .check();
await expect(planButton).toBeEnabled();
}
expect(actions).toEqual(["checkpoint", "reconcile"]);
@@ -6301,41 +6256,14 @@ test.describe("explicit saved-plan approval", () => {
});
await expect(tabs.getByRole("button")).toHaveText([
"Konfiguration bearbeiten",
- "Vorbereitung",
"Plan",
"Apply",
"Verlauf",
"Stilllegen",
]);
- await expect(
- page.getByRole("button", { name: "Plattform planen", exact: true }),
- ).not.toBeVisible();
- await expect(
- page.getByRole("button", { name: "Freigegebenen Plan anwenden" }),
- ).toHaveCount(0);
- await page
- .getByLabel("Vorbereitung auswählen", { exact: true })
- .selectOption(preparationId);
- await expect(
- page.getByText("Anmeldung erfolgreich · Organisation lesbar", {
- exact: true,
- }),
- ).toBeVisible();
- await page.screenshot({
- path: testInfo.outputPath("deployment-preparation.png"),
- });
- await page
- .getByRole("button", { name: "Weiter zu Plan", exact: true })
- .click();
- await expect(page).toHaveURL(/\/deployments\/plan$/);
await expect(
page.getByLabel("Gespeicherte Vorbereitung", { exact: true }),
- ).toHaveValue(preparationId);
- await expect(
- page.getByRole("button", {
- name: "Gespeicherte Konfiguration auswählen",
- }),
- ).not.toBeVisible();
+ ).toHaveCount(0);
await expect(
page.getByRole("button", { name: "Freigegebenen Plan anwenden" }),
).toHaveCount(0);
@@ -6358,7 +6286,7 @@ test.describe("explicit saved-plan approval", () => {
});
await expect(approval).not.toBeChecked();
await expect(
- page.getByRole("button", { name: "Plattform planen", exact: true }),
+ page.getByRole("button", { name: "Neuen Plan erstellen", exact: true }),
).not.toBeVisible();
await expect(
page.getByLabel("Gespeicherte Konfiguration", { exact: true }),
@@ -6472,7 +6400,6 @@ test.describe("explicit saved-plan approval", () => {
});
});
await page.goto("/deployments/plan");
- await page.getByText("Neuen Plan erstellen", { exact: true }).click();
await expect(page.locator(".plan-runs > article")).toHaveCount(2);
await expect(
page
@@ -6480,7 +6407,7 @@ test.describe("explicit saved-plan approval", () => {
.getByText(/Apply: Wiederherstellung erforderlich/),
).toBeVisible();
await expect(
- page.getByRole("button", { name: "Plattform planen", exact: true }),
+ page.getByRole("button", { name: "Neuen Plan erstellen", exact: true }),
).toBeDisabled();
const history = page
.locator(".plan-runs > details")
@@ -6578,7 +6505,9 @@ test.describe("explicit saved-plan approval", () => {
page.getByText("Apply derzeit gesperrt", { exact: true }),
).toBeVisible();
await expect(
- page.getByText(/Für Firewall-HA fehlt ein gebundener/),
+ page.getByText(
+ /Für Firewall-HA fehlt ein OPNsense-Administrationszugang/,
+ ),
).toBeVisible();
await page
.getByRole("button", { name: "Weiter zu Apply", exact: true })
@@ -6597,14 +6526,16 @@ test.describe("explicit saved-plan approval", () => {
await page.reload();
await expect(apply).toBeDisabled();
await expect(
- page.getByText(/Für Firewall-HA fehlt ein gebundener/),
+ page.getByText(
+ /Für Firewall-HA fehlt ein OPNsense-Administrationszugang/,
+ ),
).toBeVisible();
await page.getByLabel("Sprache", { exact: true }).selectOption("en");
await expect(
page.getByText("Apply currently blocked", { exact: true }),
).toBeVisible();
await expect(
- page.getByText(/Firewall HA requires bound OPNsense administration/),
+ page.getByText(/Firewall HA needs OPNsense administration/),
).toBeVisible();
await page.getByLabel("Language", { exact: true }).selectOption("de");
plan.applyAllowed = true;
diff --git a/landing-zone-configurator/app/e2e/direct-plan.spec.ts b/landing-zone-configurator/app/e2e/direct-plan.spec.ts
new file mode 100644
index 00000000..fa5df65b
--- /dev/null
+++ b/landing-zone-configurator/app/e2e/direct-plan.spec.ts
@@ -0,0 +1,414 @@
+import { platformUpgradeAcceleratorCommit } from "@lzc/contracts";
+import { createEditorConfiguration, editCommonInput } from "@lzc/domain";
+import { expect, type Page, test } from "./fixtures";
+
+const userId = "11111111-1111-4111-8111-111111111111",
+ tenantId = "22222222-2222-4222-8222-222222222222",
+ orgId = "33333333-3333-4333-8333-333333333333",
+ configId = "44444444-4444-4444-8444-444444444444",
+ credentialId = "55555555-5555-4555-8555-555555555555",
+ prepId = "66666666-6666-4666-8666-666666666666",
+ runId = "77777777-7777-4777-8777-777777777777";
+async function setup(
+ page: Page,
+ options: {
+ credentials?: boolean;
+ failedApply?: boolean;
+ locked?: boolean;
+ } = {},
+) {
+ let revision = 1;
+ let draft = {
+ ...editCommonInput(
+ editCommonInput(
+ createEditorConfiguration("standalone", configId),
+ "organization_id",
+ orgId,
+ ),
+ "owner_email",
+ "platform@company.test",
+ ),
+ name: "Direct plan platform",
+ };
+ let profiles =
+ options.credentials === false
+ ? []
+ : [
+ {
+ id: credentialId,
+ name: "Deployment service account",
+ state: "stored",
+ },
+ ];
+ const mutations: { path: string; body: Record
}[] = [];
+ const preparation = () => ({
+ id: prepId,
+ name: draft.name,
+ credentialId,
+ createdAt: new Date().toISOString(),
+ manifest: {
+ source: { kind: "database", configurationId: configId, revision },
+ organization: { id: orgId, name: "Test organization" },
+ accelerator: { commit: platformUpgradeAcceleratorCommit },
+ check: { status: "passed" },
+ },
+ });
+ let runs: Record[] = options.failedApply
+ ? [
+ {
+ id: runId,
+ preparationId: prepId,
+ operation: "apply",
+ status: options.locked ? "recovery_required" : "failed",
+ createdAt: new Date().toISOString(),
+ errorCode: "apply_failed",
+ retryCheckpointRequired: options.locked === true,
+ },
+ ]
+ : [];
+ await page.route("**/auth/status", (r) =>
+ r.fulfill({ json: { github: false, stackit: true, primary: "stackit" } }),
+ );
+ await page.route("**/api/v1/session", (r) =>
+ r.fulfill({
+ json: {
+ user: { id: userId, login: "platform@example.test" },
+ tenant: {
+ id: tenantId,
+ kind: "organisation",
+ roles: ["platform-engineer"],
+ },
+ csrfToken: "direct-plan-csrf",
+ expiresAt: new Date(Date.now() + 3600000).toISOString(),
+ },
+ }),
+ );
+ await page.route("**/api/v1/configurations", (r) =>
+ r.fulfill({
+ json: { configurations: [{ id: configId, name: draft.name, revision }] },
+ }),
+ );
+ await page.route(`**/api/v1/configurations/${configId}`, async (r) => {
+ if (r.request().method() === "PUT") {
+ const body = r.request().postDataJSON();
+ expect(body.revision).toBe(revision);
+ revision++;
+ draft = body.draft;
+ mutations.push({ path: "save", body });
+ }
+ await r.fulfill({
+ json: {
+ configuration: { id: configId, name: draft.name, revision, draft },
+ },
+ });
+ });
+ await page.route("**/api/v1/credentials", async (r) => {
+ if (r.request().method() === "POST") {
+ const body = r.request().postDataJSON();
+ expect(r.request().headers()["x-lzc-csrf"]).toBe("direct-plan-csrf");
+ profiles = [{ id: credentialId, name: body.name, state: "stored" }];
+ mutations.push({ path: "credential", body });
+ return r.fulfill({
+ status: 201,
+ json: { stored: true, profileId: credentialId },
+ });
+ }
+ await r.fulfill({ json: { profiles } });
+ });
+ await page.route("**/api/v1/backends*", (r) =>
+ r.fulfill(
+ new URL(r.request().url()).search
+ ? { status: 404, json: { error: "backend_not_found" } }
+ : { json: { backends: [] } },
+ ),
+ );
+ await page.route("**/api/v1/preparations", (r) => {
+ if (r.request().method() === "POST") {
+ const body = r.request().postDataJSON();
+ expect(body).toEqual({
+ source: "database",
+ configurationId: configId,
+ revision,
+ credentialId,
+ platformUpgrade: {
+ confirm: true,
+ acceleratorCommit: platformUpgradeAcceleratorCommit,
+ },
+ });
+ mutations.push({ path: "prepare", body });
+ return r.fulfill({ status: 201, json: preparation() });
+ }
+ return r.fulfill({
+ json: {
+ preparations:
+ options.failedApply || mutations.some((m) => m.path === "prepare")
+ ? [preparation()]
+ : [],
+ capabilities: {
+ platformUpgradeEnabled: true,
+ runnerAcceleratorCommit: platformUpgradeAcceleratorCommit,
+ },
+ },
+ });
+ });
+ await page.route("**/api/v1/plans", (r) => {
+ if (r.request().method() === "POST") {
+ const body = r.request().postDataJSON();
+ expect(body).toEqual({
+ preparationId: prepId,
+ confirmStateBinding: true,
+ });
+ mutations.push({ path: "plan", body });
+ runs = [
+ {
+ id: crypto.randomUUID(),
+ preparationId: prepId,
+ operation: "plan",
+ status: "failed",
+ createdAt: new Date().toISOString(),
+ errorCode: "plan_failed",
+ },
+ ...runs,
+ ];
+ return r.fulfill({ status: 201, json: runs[0] });
+ }
+ return r.fulfill({ json: { runs } });
+ });
+ return { mutations, revision: () => revision };
+}
+async function openSavedPlan(page: Page) {
+ await page.goto("/configurations");
+ await page
+ .getByRole("button", {
+ name: "Plan erstellen: Direct plan platform",
+ exact: true,
+ })
+ .click();
+ return page.getByRole("dialog", { name: "Plan erstellen", exact: true });
+}
+async function confirmAndStart(page: Page) {
+ const dialog = page.getByRole("dialog");
+ await dialog
+ .getByRole("checkbox", {
+ name: "Ich bestätige Zielorganisation und State-Zuordnung für diesen Plan.",
+ exact: true,
+ })
+ .check();
+ await dialog
+ .getByRole("button", { name: /^(Speichern und )?Plan erstellen$/ })
+ .click();
+ await expect(dialog).toHaveCount(0);
+}
+test("starts directly from the saved configuration, retains exact bindings and offers retry after a failed Plan", async ({
+ page,
+}, testInfo) => {
+ const state = await setup(page);
+ const dialog = await openSavedPlan(page);
+ await expect(
+ dialog.getByLabel("Deployment-Zugang", { exact: true }),
+ ).toHaveValue(credentialId);
+ await expect(
+ dialog.getByRole("button", { name: "Plan erstellen", exact: true }),
+ ).toBeDisabled();
+ await expect(
+ page.getByRole("button", { name: "Vorbereitung", exact: true }),
+ ).toHaveCount(0);
+ expect(state.mutations).toEqual([]);
+ await confirmAndStart(page);
+ await expect(
+ page.getByText("OpenTofu konnte keinen vollständigen Plan erstellen.", {
+ exact: false,
+ }),
+ ).toBeVisible();
+ await page
+ .getByRole("button", { name: "Neuen Plan erstellen", exact: true })
+ .click();
+ await expect(dialog).toBeVisible();
+ await page.screenshot({
+ path: testInfo.outputPath("direct-plan.png"),
+ fullPage: true,
+ });
+ expect(state.mutations.map((m) => m.path)).toEqual(["prepare", "plan"]);
+ await dialog.getByRole("button", { name: "Schließen", exact: true }).click();
+ expect(
+ await page.evaluate(
+ () => document.documentElement.scrollWidth <= innerWidth,
+ ),
+ ).toBe(true);
+});
+test("adds credentials inside the plan dialog and selects the returned profile without navigating away", async ({
+ page,
+}) => {
+ const state = await setup(page, { credentials: false });
+ const dialog = await openSavedPlan(page);
+ await dialog
+ .getByRole("button", { name: "Zugang hinzufügen", exact: true })
+ .click();
+ await dialog
+ .getByRole("textbox", { name: "Profilname", exact: true })
+ .fill("New deployment account");
+ await dialog
+ .getByLabel("Service-Account-Schlüssel (JSON)", { exact: true })
+ .setInputFiles({
+ name: "synthetic-key.json",
+ mimeType: "application/json",
+ buffer: Buffer.from(JSON.stringify({ synthetic: "key-for-mocked-api" })),
+ });
+ await dialog
+ .getByRole("button", { name: "Zugang sicher speichern", exact: true })
+ .click();
+ await expect(
+ dialog.getByLabel("Deployment-Zugang", { exact: true }),
+ ).toHaveValue(credentialId);
+ await expect(page).toHaveURL(/\/deployments\/plan$/);
+ await expect(
+ dialog.getByLabel("Service-Account-Schlüssel (JSON)", { exact: true }),
+ ).toHaveCount(0);
+ await confirmAndStart(page);
+ expect(state.mutations.map((m) => m.path)).toEqual([
+ "credential",
+ "prepare",
+ "plan",
+ ]);
+});
+test("saves an edited configuration only after explicit confirmation and plans the resulting revision", async ({
+ page,
+}) => {
+ const state = await setup(page);
+ await page.goto("/configurations");
+ await page
+ .getByRole("button", {
+ name: "Konfiguration öffnen: Direct plan platform",
+ exact: true,
+ })
+ .click();
+ await page
+ .getByRole("textbox", { name: "Name der Konfiguration", exact: true })
+ .fill("Direct plan platform edited");
+ const tabs = page.getByRole("navigation", {
+ name: "Konfiguration",
+ exact: true,
+ });
+ await tabs
+ .getByRole("button", { name: "Speichern und Plan erstellen", exact: true })
+ .click();
+ expect(state.mutations).toEqual([]);
+ await expect(
+ page
+ .getByRole("dialog")
+ .getByText("Direct plan platform edited", { exact: true }),
+ ).toBeVisible();
+ await confirmAndStart(page);
+ expect(state.revision()).toBe(2);
+ expect(state.mutations.map((m) => m.path)).toEqual([
+ "save",
+ "prepare",
+ "plan",
+ ]);
+});
+for (const locked of [false, true])
+ test(`Apply retry ${locked ? "requires explicit checkpoint reconciliation" : "creates a fresh Plan without replaying an old Apply"}`, async ({
+ page,
+ }) => {
+ const state = await setup(page, { failedApply: true, locked });
+ const recovery: string[] = [];
+ await page.route(`**/api/v1/plans/${runId}/checkpoint`, (r) => {
+ recovery.push("checkpoint");
+ return r.fulfill({
+ json: {
+ stateVersion: "1",
+ checkpointSha256: "a".repeat(64),
+ serial: 1,
+ lockHeld: true,
+ pendingMigration: false,
+ recoveryAvailable: false,
+ canResume: true,
+ resources: [],
+ },
+ });
+ });
+ await page.route(`**/api/v1/plans/${runId}/reconcile`, (r) => {
+ expect(r.request().postDataJSON()).toMatchObject({
+ confirmRetainState: true,
+ stateVersion: "1",
+ checkpointSha256: "a".repeat(64),
+ });
+ recovery.push("reconcile");
+ return r.fulfill({ json: { id: runId, reconciled: true } });
+ });
+ await page.goto("/deployments/apply");
+ await page
+ .getByRole("button", { name: "Apply erneut versuchen", exact: true })
+ .click();
+ if (locked) {
+ const review = page.getByRole("region", {
+ name: "Recovery-Abgleich",
+ exact: true,
+ });
+ await expect(
+ review.getByText("State-Version", { exact: true }),
+ ).toBeVisible();
+ expect(state.mutations).toEqual([]);
+ expect(recovery).toEqual(["checkpoint"]);
+ await review
+ .getByRole("checkbox", { name: /Ich habe den Checkpoint geprüft/ })
+ .check();
+ await review
+ .getByRole("button", { name: "Erneute Planung freigeben", exact: true })
+ .click();
+ }
+ const dialog = page.getByRole("dialog", {
+ name: "Apply erneut versuchen",
+ exact: true,
+ });
+ await expect(dialog).toBeVisible();
+ await expect(
+ dialog.getByLabel("Deployment-Zugang", { exact: true }),
+ ).toHaveValue(credentialId);
+ expect(state.mutations).toEqual([]);
+ await confirmAndStart(page);
+ expect(state.mutations.map((m) => m.path)).toEqual(["prepare", "plan"]);
+ expect(recovery).toEqual(locked ? ["checkpoint", "reconcile"] : []);
+ });
+
+test("Apply retry requires a deliberate credential choice when the previous profile is unavailable", async ({
+ page,
+}) => {
+ const state = await setup(page, { failedApply: true });
+ const replacement = "88888888-8888-4888-8888-888888888888";
+ await page.route("**/api/v1/credentials", (route) =>
+ route.fulfill({
+ json: {
+ profiles: [
+ { id: replacement, name: "Replacement account", state: "stored" },
+ ],
+ },
+ }),
+ );
+ await page.goto("/deployments/apply");
+ await page
+ .getByRole("button", { name: "Apply erneut versuchen", exact: true })
+ .click();
+ const dialog = page.getByRole("dialog", {
+ name: "Apply erneut versuchen",
+ exact: true,
+ });
+ const credential = dialog.getByLabel("Deployment-Zugang", { exact: true });
+ await expect(credential).toHaveValue("");
+ await expect(
+ dialog.getByText(
+ "Der bisherige Zugang ist nicht mehr verfügbar. Wähle einen Zugang oder lege ihn hier an.",
+ { exact: true },
+ ),
+ ).toBeVisible();
+ await dialog.getByRole("checkbox").check();
+ await expect(
+ dialog.getByRole("button", { name: "Plan erstellen", exact: true }),
+ ).toBeDisabled();
+ expect(state.mutations).toEqual([]);
+ await credential.selectOption(replacement);
+ await expect(
+ dialog.getByRole("button", { name: "Plan erstellen", exact: true }),
+ ).toBeEnabled();
+ expect(state.mutations).toEqual([]);
+});
diff --git a/landing-zone-configurator/app/e2e/platform-owner-flow.spec.ts b/landing-zone-configurator/app/e2e/platform-owner-flow.spec.ts
index de4befc0..e0210fdc 100644
--- a/landing-zone-configurator/app/e2e/platform-owner-flow.spec.ts
+++ b/landing-zone-configurator/app/e2e/platform-owner-flow.spec.ts
@@ -366,14 +366,21 @@ test("Configurations resumes editing and only confirms losing a changed draft",
.click();
await expect(name).toHaveValue("Unsaved platform draft");
await expect(
- page.getByRole("button", { name: "Deployment vorbereiten", exact: true }),
- ).toBeDisabled();
+ page
+ .getByRole("navigation", { name: "Konfiguration", exact: true })
+ .getByRole("button", {
+ name: "Speichern und Plan erstellen",
+ exact: true,
+ }),
+ ).toBeEnabled();
await showList();
discard = true;
await open();
await expect(name).toHaveValue("Existing platform workflow");
await expect(
- page.getByRole("button", { name: "Deployment vorbereiten", exact: true }),
+ page
+ .getByRole("navigation", { name: "Konfiguration", exact: true })
+ .getByRole("button", { name: "Plan erstellen", exact: true }),
).toBeEnabled();
expect(dialogs).toHaveLength(2);
expect(state.writes).toEqual([]);
@@ -447,8 +454,13 @@ test("configuration reopen protects edits made during its read and skips confirm
await expect.poll(() => dialogs.length).toBe(1);
await expect(name).toHaveValue("Changed while loading");
await expect(
- page.getByRole("button", { name: "Deployment vorbereiten", exact: true }),
- ).toBeDisabled();
+ page
+ .getByRole("navigation", { name: "Konfiguration", exact: true })
+ .getByRole("button", {
+ name: "Speichern und Plan erstellen",
+ exact: true,
+ }),
+ ).toBeEnabled();
// Another browser saved exactly the current content. It is dirty relative to
// this tab's old snapshot, but reopening would discard no actual changes.
const equivalent = { ...state.stored(), name: "Changed while loading" };
@@ -469,7 +481,9 @@ test("configuration reopen protects edits made during its read and skips confirm
await open();
await expect(name).toHaveValue("Changed while loading");
await expect(
- page.getByRole("button", { name: "Deployment vorbereiten", exact: true }),
+ page
+ .getByRole("navigation", { name: "Konfiguration", exact: true })
+ .getByRole("button", { name: "Plan erstellen", exact: true }),
).toBeEnabled();
expect(dialogs).toHaveLength(1);
expect(state.writes).toEqual([]);
diff --git a/landing-zone-configurator/app/tests/credentials.test.ts b/landing-zone-configurator/app/tests/credentials.test.ts
index 60cabb58..cc5ab533 100644
--- a/landing-zone-configurator/app/tests/credentials.test.ts
+++ b/landing-zone-configurator/app/tests/credentials.test.ts
@@ -252,7 +252,7 @@ it("protects credential routes with the session and CSRF, rejects identity injec
const profiles = {
check: vi.fn(),
list: vi.fn(async () => []),
- create: vi.fn(async () => {}),
+ create: vi.fn(async () => "11111111-2222-4333-8444-555555555555"),
remove: vi.fn(async () => {}),
};
const app = buildApp({ auth, credentials: profiles });
@@ -294,7 +294,10 @@ it("protects credential routes with the session and CSRF, rejects identity injec
payload,
});
expect(result.statusCode).toBe(201);
- expect(result.json()).toEqual({ stored: true });
+ expect(result.json()).toEqual({
+ stored: true,
+ profileId: "11111111-2222-4333-8444-555555555555",
+ });
expect(result.body).not.toContain(privateKey);
expect(profiles.create).toHaveBeenCalledExactlyOnceWith(
session,
diff --git a/landing-zone-configurator/app/tests/platform-plan.test.ts b/landing-zone-configurator/app/tests/platform-plan.test.ts
index 6aeb63d2..c0aaaff9 100644
--- a/landing-zone-configurator/app/tests/platform-plan.test.ts
+++ b/landing-zone-configurator/app/tests/platform-plan.test.ts
@@ -3086,6 +3086,11 @@ describe.skipIf(!enabled)(
it("reconciles only explicitly reviewed checkpoints once and preserves state for a corrected fresh plan", async () => {
const test = await failedCheckpoint();
expect(test.checkpoint.canResume).toBe(true);
+ expect(
+ (await test.plans.list(test.owner)).find(
+ (row) => row.id === test.run.id,
+ )?.retryCheckpointRequired,
+ ).toBe(true);
const input = {
confirmRetainState: true,
stateVersion: test.checkpoint.stateVersion,
@@ -3126,6 +3131,11 @@ describe.skipIf(!enabled)(
]);
expect(test.runner.start).toHaveBeenCalledTimes(starts);
expect(test.secrets.get).toHaveBeenCalledTimes(secrets);
+ expect(
+ (await test.plans.list(test.owner)).find(
+ (row) => row.id === test.run.id,
+ )?.retryCheckpointRequired,
+ ).toBe(false);
expect(
(
await migration!.query(
@@ -3481,6 +3491,27 @@ describe.skipIf(!enabled)(
expect(test.runner.start).toHaveBeenCalledTimes(2);
});
+ it("returns only the committed credential profile identity for inline Plan selection", async () => {
+ const test = await fixture(true);
+ const profiles = new PostgresCredentialProfiles(pool, test.secrets);
+ const { key } = await test.secrets.get();
+ const id = await profiles.create(test.owner, "Inline Plan account", key);
+ expect(id).toMatch(/^[0-9a-f-]{36}$/);
+ expect(await profiles.list(test.owner)).toContainEqual(
+ expect.objectContaining({
+ id,
+ name: "Inline Plan account",
+ state: "stored",
+ }),
+ );
+ expect(test.secrets.put).toHaveBeenCalledWith(
+ test.owner,
+ id,
+ key,
+ undefined,
+ );
+ });
+
it("authenticates HTTP backend tickets, applies strict CSRF approval and exports only a validated platform contract", async () => {
const test = await fixture(true);
const saved = await test.plan();
diff --git a/landing-zone-configurator/docs/assistant-test-catalogue.json b/landing-zone-configurator/docs/assistant-test-catalogue.json
index fed48815..c5024847 100644
--- a/landing-zone-configurator/docs/assistant-test-catalogue.json
+++ b/landing-zone-configurator/docs/assistant-test-catalogue.json
@@ -2,7 +2,7 @@
"schemaVersion": 1,
"status": "field-inventory-and-smoke-corpus-not-ai-qualification",
"engineRevision": "a256f6896d11134fdc351786f1be5eba4e56b2e2",
- "knowledgeSha256": "4b10853319e0994b219c8f09c271dfd523fef30e1a03d20fcf34f267fea23b8d",
+ "knowledgeSha256": "a8141436b8150486a4c6439d2f75b5e58a83acc12d15a95e925d1ba771f01410",
"sourceDigests": {
"scripts/assistant-scenarios.ts": "41c7c937f106564c7dcc89cb5559669098199e889f0a4cc5bba0a8aa4043a0c1",
"scripts/assistant-tests.ts": "a715eb7a9e0ff21c1338c390dbaa6db283d9130dc5f9a155e7e6409b7207b7b8",
diff --git a/landing-zone-configurator/docs/plan-execution.de.md b/landing-zone-configurator/docs/plan-execution.de.md
index 076793a0..8a5db1e0 100644
--- a/landing-zone-configurator/docs/plan-execution.de.md
+++ b/landing-zone-configurator/docs/plan-execution.de.md
@@ -10,17 +10,12 @@ Stand: 2026-10-02. Umsetzung auf `feature/landing-zone-configurator`.
## Was der Benutzer testen kann (nach erfolgreichem Release)
-1. **Deployments** öffnen und im Abschnitt **Erstbereitstellung planen** eine
- gespeicherte Vorbereitung auswählen.
-2. Nur für eine neue Landing Zone bestätigen, dass noch keine Ressourcen und kein
- bestehender State zu dieser Konfiguration existieren. Bestehende/teilweise
- erzeugte Landing Zones sind in diesem Ablauf nicht unterstützt.
-3. **Erstbereitstellung planen** starten. Erwartete Stationen: Runner vorbereiten,
- initialisieren, validieren, planen und abgeschlossen/fehlgeschlagen.
-4. Seite neu laden: Auftrag und Ergebnis bleiben erhalten. Anlegen, Ändern,
- Ersetzen, Löschen, Datenlesen und geänderte Ausgaben werden getrennt gezählt.
-5. Optional einen weiteren Plan abbrechen. Abbruch entzieht sofort den Broker-
- Zugriff; das Stoppen des CF-Tasks durch Cleanup erfolgt zeitversetzt.
+1. Öffne die aktuelle Konfiguration und wähle **Plan erstellen** oder bei Änderungen **Speichern und Plan erstellen**.
+2. Wähle im Dialog den Deployment-Zugang. Über **Zugang hinzufügen** lässt sich ein fehlendes Profil direkt anlegen. Prüfe Zielorganisation und State-Zuordnung.
+3. Bestätige und starte den Plan. Der Server hält die Vorbereitung intern unveränderlich fest und prüft gespeicherte Revision, Zugang, Ausführungsquelle und State-Identität. Apply bleibt eine eigene Freigabe.
+4. Verfolge Initialisierung, Validierung und Planung. Neuladen erhält Job und Ergebnis. Nach einem Plan-Fehler bleibt **Neuen Plan erstellen** direkt verfügbar.
+5. Nach einem Apply-Fehler erzeugt **Apply erneut versuchen** einen neuen Plan für dieselbe Konfiguration und denselben State, möglichst mit dem bisherigen Zugang. Eine Checkpoint-Sperre muss zuerst ausdrücklich abgeglichen werden. Verbrauchte gespeicherte Pläne oder unklare Cloud-Operationen werden nicht blind wiederholt.
+6. Bei Bedarf einen laufenden Plan abbrechen. Dies widerruft den Broker-Zugang; Cleanup beendet den Runner unabhängig.
Betreiber können vorbereitete Einmal-Runner über die Eingabe `runner_pool_size`
des manuellen Releases aktivieren. Ein bereiter Runner übernimmt einen
@@ -416,9 +411,8 @@ Gleichzeitige identische Bestaetigungen erzeugen nur einen Beleg. Der Run wird
als fehlgeschlagen abgeschlossen; State, Version, Lock und Backend bleiben
unveraendert. Es erfolgen weder Cloud-Zugriffe noch ein automatischer Plan/Apply.
-Danach kann der Benutzer die korrigierte Konfiguration speichern, eine neue
-Vorbereitung waehlen und einen neuen Plan gegen denselben bestehenden State
-starten. Fuer Apply ist erneut die separate Pruefung und Freigabe des neuen
+Danach kann der Benutzer die korrigierte Konfiguration speichern und daraus
+direkt einen neuen Plan gegen denselben bestehenden State starten. Fuer Apply ist erneut die separate Pruefung und Freigabe des neuen
gespeicherten Plans erforderlich. Der alte Plan bleibt verbraucht. Bei einem
zwischenzeitlich veraenderten Checkpoint ist eine neue Pruefung erforderlich.
Unklare Runner-Abbrueche, nicht verifizierbare Migrationen und separate Recovery-
diff --git a/landing-zone-configurator/docs/plan-execution.md b/landing-zone-configurator/docs/plan-execution.md
index f208a538..255d6e45 100644
--- a/landing-zone-configurator/docs/plan-execution.md
+++ b/landing-zone-configurator/docs/plan-execution.md
@@ -9,11 +9,12 @@ As of: 2026-10-02. Implementation on `feature/landing-zone-configurator`.
## What the user can test (after a successful release)
-1. Open **Deployments** and select a saved preparation in **Plan initial provisioning**.
-2. Only for a new Landing Zone, confirm that no resources or existing state for this configuration exist yet. Existing/partially created Landing Zones are not supported in this workflow.
-3. Start **Plan initial provisioning**. Expected stages: prepare Runner, initialize, validate, plan and completed/failed.
-4. Reload the page: job and result are retained. Creation, modification, replacement, deletion, data reads and changed outputs are counted separately.
-5. Optionally cancel another Plan. Cancellation immediately revokes broker access; cleanup stops the CF task after a delay.
+1. Open the current configuration and choose **Create plan**, or **Save and create plan** for an edited draft.
+2. Select the deployment credential in the dialog; **Add credentials** creates a missing profile in place. Review the target organization and State binding.
+3. Confirm and start the Plan. The server records an immutable preparation internally and checks the saved revision, credential, execution source and State identity. Apply remains a separate approval.
+4. Follow Runner initialization, validation and planning. Reloading retains the job and its result. After a failed Plan, **Create new plan** stays directly available.
+5. After a failed Apply, **Retry Apply** creates a new Plan for the same configuration and State using the previous credential where available. A held checkpoint requires explicit reconciliation first. No consumed saved Plan or ambiguous cloud operation is blindly replayed.
+6. Cancel a running Plan if needed. Cancellation revokes broker access; cleanup independently stops the Runner.
An operator can enable prepared, one-shot Runners through the manual release's
`runner_pool_size` input. A ready Runner takes one authorized job without creating
@@ -190,7 +191,7 @@ Migration `034_platform_reconciliation.sql` adds explicit, audited UI reconcilia
**Allow replanning** requires separate confirmation to preserve state unchanged. The API rechecks the displayed version and checksum in a transaction. Only an already started Apply regularly terminated with `apply_failed`, with readable bootstrap checkpoint, positive state version, no held lock, open migration or separate recovery state, is eligible. Immutable tenant/owner-bound audit evidence binds Apply, real session, state key, version and checksum. Concurrent identical confirmations create only one record. The run is completed as failed; state, version, lock and backend remain unchanged. No cloud access or automatic Plan/Apply occurs.
-The user can then save the corrected configuration, choose a new preparation and start a new Plan against the same existing state. Apply again requires separate review and approval of the new saved plan. The old plan remains consumed. If the checkpoint has changed meanwhile, a new check is required. Ambiguous Runner aborts, unverifiable migrations and separate recovery states remain blocked and need separate operational reconciliation. No automatic unblocking, state deletion, import or Destroy action. The migration must be enabled before using the new API.
+The user can then save the corrected configuration and start a new Plan directly from it against the same existing state. Apply again requires separate review and approval of the new saved plan. The old plan remains consumed. If the checkpoint has changed meanwhile, a new check is required. Ambiguous Runner aborts, unverifiable migrations and separate recovery states remain blocked and need separate operational reconciliation. No automatic unblocking, state deletion, import or Destroy action. The migration must be enabled before using the new API.
### Replanning after a failed Apply using S3
diff --git a/landing-zone-configurator/docs/user-guide.de.md b/landing-zone-configurator/docs/user-guide.de.md
index 28f92803..e986dad3 100644
--- a/landing-zone-configurator/docs/user-guide.de.md
+++ b/landing-zone-configurator/docs/user-guide.de.md
@@ -28,7 +28,7 @@ GitHub-Verbindung ersetzt weder die STACKIT-Anmeldung noch Cloud-Berechtigungen.
## Konfiguration erstellen und prüfen
-Öffne **Konfigurationen**, um einen Entwurf anzulegen oder eine gespeicherte Konfiguration über **Bearbeiten** zu ändern. Der Editor gehört zu Konfigurationen; **Deployments** enthält Vorbereitung, Plan, Apply und Verlauf. Speichern allein startet kein Deployment.
+Öffne **Konfigurationen**, um einen Entwurf anzulegen oder eine gespeicherte Konfiguration über **Bearbeiten** zu ändern. Der Editor gehört zu Konfigurationen; **Deployments** enthält Plan, Apply und Verlauf. Speichern allein startet kein Deployment.
Beginne mit einer Plattformvorlage oder einer bestehenden Konfiguration. Vorlagen sind
Ausgangspunkte, keine Empfehlung, jeden optionalen Dienst einzuschalten.
@@ -61,12 +61,13 @@ Zugangsdatenprofile und Beratungen vor dem Anlegen einer Konfiguration bleiben
persönlich. Das Teilen einer Konfiguration erteilt keine Rechte zur Cloud-Ausführung.
Vorschläge müssen weiterhin ausdrücklich übernommen und Änderungen gespeichert werden.
-**Speicheroptionen öffnen →** öffnet nur die Speicherauswahl. **Konfiguration
-speichern** schreibt eine neue Datenbankrevision; **Speichern und zur
-Bereitstellung** speichert genauso und öffnet anschließend die Vorbereitung.
-Ein Beispiel-Download verwendet den lokalen Entwurf und speichert ihn nicht.
-Enthält der aktuelle Entwurf ungespeicherte Änderungen, muss die Vorbereitung
-des älteren gespeicherten Stands ausdrücklich bestätigt werden.
+**Konfiguration speichern** schreibt eine neue Datenbankrevision. **Speichern und
+Plan erstellen** öffnet den Plan-Dialog für den aktuellen Entwurf; gespeichert wird
+beim Bestätigen und Starten des Plans. Ein unveränderter gespeicherter Stand nutzt
+**Plan erstellen** und behält seine Revision. Ein Beispiel-Download verwendet den
+lokalen Entwurf ohne Speichern. Wird bei ungespeicherten lokalen Änderungen eine
+gespeicherte Konfiguration gewählt, muss dieser gespeicherte Stand ausdrücklich
+bestätigt werden.
Für eine selbst verwaltete Accelerator-Bereitstellung exportiert
**Konfigurationen → Prüfen → Accelerator-Beispiel herunterladen** die Plattform
@@ -303,16 +304,37 @@ Abschlüssen kann der ursprünglich freigebende Platform Owner nach Ablauf der
alten Ausführungsberechtigungen einen externen Runner-/Cloud-Abgleich gesondert
bestätigen. Das ist keine automatische Cloud-Prüfung oder State-Reparatur.
-Wähle die richtige Umgebung und das richtige Ziel, binde die autorisierten technischen
-Zugangsdaten, erstelle eine Vorbereitung und fordere anschließend einen Plan an. Verfolge
-die Job-Ausgabe und prüfe die resultierenden Änderungen, Quell-/Konfigurationsversion
-und State-Bindung.
-
-Lege für Firewall-HA vor der Vorbereitung ein Zugangsprofil mit optionalem
+Wähle aus der aktuellen Konfiguration **Plan erstellen** oder bei Änderungen
+**Speichern und Plan erstellen**. Der Dialog verwendet direkt diese Konfiguration.
+Wähle einen Deployment-Zugang. Fehlt er, kannst du ihn über **Zugang hinzufügen**
+im Dialog anlegen. Ein einzelnes gespeichertes Profil wird vorausgewählt. Bestätige
+Zielorganisation und State-Zuordnung und starte den Plan. Gespeicherte Revision und
+aktuell freigegebener Ausführungsstand werden intern gebunden; ein eigener
+Vorbereitungsschritt oder eine Versionsauswahl ist nicht erforderlich. State- und
+Ausführungsnachweise bleiben unter den Details sichtbar.
+
+Die interne unveränderliche Vorbereitung hält weiterhin die genaue Konfiguration,
+Zugangsversion, das Ziel und die State-Identität fest. Apply übernimmt diese Bindung
+aus dem geprüften Plan und benötigt eine eigene Freigabe. Gleichzeitige Änderungen
+anderer Bearbeiter werden abgewiesen, statt unbemerkt einen anderen Stand zu planen.
+Nach einem Plan-Fehler bleibt **Neuen Plan erstellen** direkt sichtbar.
+
+Wähle nach einem fehlgeschlagenen Plattform-Apply **Apply erneut versuchen**. Die
+Aktion behält Konfiguration und State-Identität bei und wählt den bisherigen Zugang
+vor, sofern er noch verfügbar ist. Sie berechnet einen neuen Plan auf dem aktuellen
+State und führt keinen verbrauchten gespeicherten Plan erneut aus. Bei einer
+Checkpoint- oder Recovery-Sperre ist zuerst der explizite Abgleich erforderlich.
+Aktive oder ungeklärte Runner, geänderte Checkpoints, State-Sperren und offene
+Migrationen unterliegen weiterhin den normalen Recovery-Regeln. Prüfe den neuen
+Plan und gib Apply erneut frei. Seit dem Fehler gespeicherte Konfigurationsänderungen
+sind dabei ebenfalls zu prüfen.
+
+Lege für Firewall-HA unter **Zugänge** oder über **Zugang hinzufügen** im
+Plan-Dialog ein Zugangsprofil mit optionalem
OPNsense-Administrator und Passwort für beide Appliances an. Diese Angaben werden
getrennt von der Konfiguration geschützt gespeichert und müssen zu den Appliances
passen; das Speichern ändert deren Passwörter nicht. Bestehende HA-Pläne ohne diese
-Zugangsbindung benötigen eine neue Vorbereitung und einen neuen Plan. Einzelne
+Zugangsbindung benötigen einen neuen Plan mit dem passenden Profil. Einzelne
Firewall-Instanzen benötigen diesen zusätzlichen Zugang nicht. Firewall-Policy/
-Bootstrap und VPN-PSKs bleiben außerhalb dieses Ausführungsvertrags.
Siehe [Deployment-Zugänge](deployment-credentials.de.md#optional-firewall-ha-administration).
@@ -327,8 +349,8 @@ OpenTofu kann während langer Operationen still bleiben: Phase und verstrichene
sind keine geschätzte Prozentangabe.
Apply verwendet den geprüften gespeicherten Plan und benötigt eine eigene Autorisierung.
-Geänderte Eingaben, Quellen, State oder eine abgelaufene Freigabe können eine neue
-Vorbereitung erfordern. Starte keine parallelen Infrastrukturschreibzugriffe auf denselben
+Geänderte Eingaben, Quellen, State oder eine abgelaufene Freigabe erfordern
+einen neuen geprüften Plan. Starte keine parallelen Infrastrukturschreibzugriffe auf denselben
State. UI-Jobstatus und Diagnose-ID helfen Betreibern bei der Fehleranalyse;
ein erneuter Versuch ersetzt nicht die Behebung einer abgelaufenen oder inkonsistenten Vorbereitung.
diff --git a/landing-zone-configurator/docs/user-guide.md b/landing-zone-configurator/docs/user-guide.md
index 11157293..799201e9 100644
--- a/landing-zone-configurator/docs/user-guide.md
+++ b/landing-zone-configurator/docs/user-guide.md
@@ -24,7 +24,7 @@ connection is not a replacement for STACKIT login or cloud permissions.
## Create and review a configuration
-Open **Configurations** to create a draft or **Edit** a saved configuration. The editor belongs to Configurations; **Deployments** contains preparation, Plan, Apply and history. Saving alone starts no deployment.
+Open **Configurations** to create a draft or **Edit** a saved configuration. The editor belongs to Configurations; **Deployments** contains Plan, Apply and history. Saving alone starts no deployment.
Start from a platform template or an existing configuration. Templates are
starting points, not a recommendation to enable every optional service.
@@ -54,11 +54,12 @@ before creating a configuration remain personal. Sharing a configuration grants
no cloud execution permissions. Proposals still require explicit acceptance and
configuration changes require saving.
-**Open save options →** only opens storage choices. **Save configuration** writes a
-new database revision; **Save and prepare deployment** performs the same save and
-then opens preparation. Downloading an example uses the local draft and does not
-save it. If the current draft has unsaved changes, preparing its older saved
-configuration requires an explicit confirmation.
+**Save configuration** writes a new database revision. **Save and create plan**
+opens the Plan dialog for the current draft; the draft is saved when you confirm
+and start the Plan. A saved, unchanged configuration uses **Create plan** and keeps
+its revision. Downloading an example uses the local draft without saving it.
+Starting from a stored configuration while its local draft has unsaved changes
+requires an explicit choice of the saved version.
For a self-managed Accelerator deployment, **Configurations → Review → Download
Accelerator example** exports the platform and one native example project per
@@ -268,15 +269,34 @@ completion, the originally approving Platform Owner can separately attest an
external Runner/cloud reconciliation after the old execution credentials expire;
this is not an automatic cloud verification or State repair.
-Choose the correct environment and target, bind the authorized technical
-credentials, then create a preparation and request a Plan. Follow the job output
-and review the resulting changes, source/configuration version and state binding.
+From the current configuration choose **Create plan**, or **Save and create plan**
+for an edited draft. The dialog uses that configuration directly. Select a deployment
+credential; if none is available, choose **Add credentials** and create it inside the
+dialog. A single stored profile is preselected. Confirm the target organization and
+State binding, then start the Plan. The saved revision and currently approved
+execution source are bound internally; no separate Preparation screen or version
+selector is required. State binding and execution metadata remain under details.
+
+The internal immutable preparation still records the exact configuration, credential
+version, target and State identity. Apply inherits these bindings from the reviewed
+Plan and requires separate approval. Changes by another editor are rejected instead
+of silently planning a different revision. Failed Plans leave **Create new plan**
+visible so the corrected configuration can be planned again.
+
+After a failed platform Apply choose **Retry Apply**. The action retains the same
+configuration and State identity and preselects the previous credential if it is
+still available. It creates a fresh Plan against the current State; it never
+replays a consumed saved Plan. If a checkpoint/recovery hold exists, inspect and
+explicitly reconcile it first. Active or uncertain Runners, changed checkpoints,
+State locks and unresolved migrations remain subject to the normal recovery rules.
+Review the new Plan and approve Apply again. Configuration changes saved since the
+failure must also be reviewed in that Plan.
For Firewall HA, create a credential profile with the optional OPNsense
-administration username and password for both appliances before preparing the
-deployment. These credentials are protected separately from configuration and
+administration username and password for both appliances, either under **Credentials**
+or through **Add credentials** in the Plan dialog. These credentials are protected separately from configuration and
must match the appliances; saving them does not change their passwords. Existing
-HA Plans without this credential binding need a new preparation and Plan.
+HA Plans without this credential binding need a new Plan with the matching profile.
Single-node Firewall infrastructure does not require this additional credential.
Firewall policy/bootstrap and VPN PSKs remain outside this execution contract.
See [deployment credentials](deployment-credentials.md#optional-firewall-ha-administration).
@@ -290,7 +310,7 @@ truncation and connection errors are shown. OpenTofu may remain quiet during a
long operation: phase and elapsed time are not an estimated percentage.
Apply uses the reviewed saved Plan and requires its own authorization.
-Changed inputs, source, state or an expired approval can require a new preparation.
+Changed inputs, source, State or an expired approval require a fresh checked Plan.
Do not start parallel infrastructure writes to the same state.
The UI job status and diagnostic ID help an operator investigate failures;
retrying is not a substitute for resolving an expired or inconsistent preparation.
From c518cdc8e05f2c8b9e53ded72816709289686a2e Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lukas=20Weberru=C3=9F?=
Date: Wed, 25 Nov 2026 20:52:59 +0000
Subject: [PATCH 2/5] fix(configurator): keep the current draft when planning
through Deployments
---
.../app/apps/web/src/main.tsx | 8 +-
.../app/e2e/direct-plan.spec.ts | 79 +++++++++++--------
2 files changed, 52 insertions(+), 35 deletions(-)
diff --git a/landing-zone-configurator/app/apps/web/src/main.tsx b/landing-zone-configurator/app/apps/web/src/main.tsx
index b18958cd..deb93bea 100644
--- a/landing-zone-configurator/app/apps/web/src/main.tsx
+++ b/landing-zone-configurator/app/apps/web/src/main.tsx
@@ -1358,7 +1358,13 @@ function App() {
onChoose={() => setView("repositories")}
onSelect={(selection) => openDeployment(selection, false)}
onNewPlan={() => {
- setPlanFromDraft(false);
+ setPlanFromDraft(
+ Boolean(
+ draft &&
+ configurationBinding?.id ===
+ deploymentSelection?.configurationId,
+ ),
+ );
setRetryApply(false);
setRetryCredential(undefined);
setPlanDialogOpen(true);
diff --git a/landing-zone-configurator/app/e2e/direct-plan.spec.ts b/landing-zone-configurator/app/e2e/direct-plan.spec.ts
index fa5df65b..59b5c754 100644
--- a/landing-zone-configurator/app/e2e/direct-plan.spec.ts
+++ b/landing-zone-configurator/app/e2e/direct-plan.spec.ts
@@ -271,41 +271,52 @@ test("adds credentials inside the plan dialog and selects the returned profile w
"plan",
]);
});
-test("saves an edited configuration only after explicit confirmation and plans the resulting revision", async ({
- page,
-}) => {
- const state = await setup(page);
- await page.goto("/configurations");
- await page
- .getByRole("button", {
- name: "Konfiguration öffnen: Direct plan platform",
- exact: true,
- })
- .click();
- await page
- .getByRole("textbox", { name: "Name der Konfiguration", exact: true })
- .fill("Direct plan platform edited");
- const tabs = page.getByRole("navigation", {
- name: "Konfiguration",
- exact: true,
+for (const viaDeployments of [false, true])
+ test(`saves an edited configuration only after explicit confirmation and plans the resulting revision${viaDeployments ? " through Deployments" : " from the editor"}`, async ({
+ page,
+ }) => {
+ const state = await setup(page);
+ await page.goto("/configurations");
+ await page
+ .getByRole("button", {
+ name: "Konfiguration öffnen: Direct plan platform",
+ exact: true,
+ })
+ .click();
+ await page
+ .getByRole("textbox", { name: "Name der Konfiguration", exact: true })
+ .fill("Direct plan platform edited");
+ if (viaDeployments) {
+ await page
+ .getByRole("navigation", { name: "Hauptnavigation", exact: true })
+ .getByRole("button", { name: "Deployments", exact: true })
+ .click();
+ await page
+ .getByRole("button", { name: "Neuen Plan erstellen", exact: true })
+ .click();
+ } else {
+ await page
+ .getByRole("navigation", { name: "Konfiguration", exact: true })
+ .getByRole("button", {
+ name: "Speichern und Plan erstellen",
+ exact: true,
+ })
+ .click();
+ }
+ expect(state.mutations).toEqual([]);
+ await expect(
+ page
+ .getByRole("dialog")
+ .getByText("Direct plan platform edited", { exact: true }),
+ ).toBeVisible();
+ await confirmAndStart(page);
+ expect(state.revision()).toBe(2);
+ expect(state.mutations.map((m) => m.path)).toEqual([
+ "save",
+ "prepare",
+ "plan",
+ ]);
});
- await tabs
- .getByRole("button", { name: "Speichern und Plan erstellen", exact: true })
- .click();
- expect(state.mutations).toEqual([]);
- await expect(
- page
- .getByRole("dialog")
- .getByText("Direct plan platform edited", { exact: true }),
- ).toBeVisible();
- await confirmAndStart(page);
- expect(state.revision()).toBe(2);
- expect(state.mutations.map((m) => m.path)).toEqual([
- "save",
- "prepare",
- "plan",
- ]);
-});
for (const locked of [false, true])
test(`Apply retry ${locked ? "requires explicit checkpoint reconciliation" : "creates a fresh Plan without replaying an old Apply"}`, async ({
page,
From 04c1ae7e65dcf4c3a6160cdfe37bc2c4d7ce95c6 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lukas=20Weberru=C3=9F?=
Date: Wed, 25 Nov 2026 21:00:30 +0000
Subject: [PATCH 3/5] test(configurator): cover direct Plan actions across
session and editor flows
---
.../app/e2e/common-editor.spec.ts | 4 +-
.../app/e2e/session-lifecycle.spec.ts | 44 ++++++++++++++-----
2 files changed, 37 insertions(+), 11 deletions(-)
diff --git a/landing-zone-configurator/app/e2e/common-editor.spec.ts b/landing-zone-configurator/app/e2e/common-editor.spec.ts
index e7f9ef72..0b90f43d 100644
--- a/landing-zone-configurator/app/e2e/common-editor.spec.ts
+++ b/landing-zone-configurator/app/e2e/common-editor.spec.ts
@@ -524,7 +524,9 @@ test("shared configuration saves, reopens and restores in the account workspace"
.getByRole("navigation", { name: "Brotkrumennavigation", exact: true })
.getByRole("link", { name: "Konfigurationen", exact: true })
.click();
- await page.getByRole("button", { name: /Deployment vorbereiten/ }).click();
+ await page
+ .getByRole("button", { name: "Plan erstellen", exact: true })
+ .click();
await expect(page.getByRole("alert")).toContainText(
"Erstbereitstellungsplan noch nicht verfügbar",
);
diff --git a/landing-zone-configurator/app/e2e/session-lifecycle.spec.ts b/landing-zone-configurator/app/e2e/session-lifecycle.spec.ts
index 8baae0c4..7721669a 100644
--- a/landing-zone-configurator/app/e2e/session-lifecycle.spec.ts
+++ b/landing-zone-configurator/app/e2e/session-lifecycle.spec.ts
@@ -181,8 +181,13 @@ test("STACKIT heartbeat preserves focused unsaved draft and persisted binding",
await name.evaluate((element, original) => element === original, input),
).toBe(true);
await expect(
- page.getByRole("button", { name: "Deployment vorbereiten", exact: true }),
- ).toBeDisabled();
+ page
+ .getByRole("navigation", { name: "Konfiguration", exact: true })
+ .getByRole("button", {
+ name: "Speichern und Plan erstellen",
+ exact: true,
+ }),
+ ).toBeEnabled();
expect(state.writes()).toBe(0);
await page
.locator("#configuration-save")
@@ -190,7 +195,9 @@ test("STACKIT heartbeat preserves focused unsaved draft and persisted binding",
.click();
await expect.poll(state.writes).toBe(1);
await expect(
- page.getByRole("button", { name: "Deployment vorbereiten", exact: true }),
+ page
+ .getByRole("navigation", { name: "Konfiguration", exact: true })
+ .getByRole("button", { name: "Plan erstellen", exact: true }),
).toBeEnabled();
});
@@ -226,8 +233,13 @@ test("transient renewal errors and session expiry preserve the owned draft for t
).toBeVisible();
await expect(name).toHaveValue("Unsaved expired draft");
await expect(
- page.getByRole("button", { name: "Deployment vorbereiten", exact: true }),
- ).toBeDisabled();
+ page
+ .getByRole("navigation", { name: "Konfiguration", exact: true })
+ .getByRole("button", {
+ name: "Speichern und Plan erstellen",
+ exact: true,
+ }),
+ ).toBeEnabled();
expect(state.writes()).toBe(0);
});
@@ -273,8 +285,13 @@ test("session scope switches hide private drafts and restore only their original
page.getByLabel("Name der Konfiguration", { exact: true }),
).toHaveValue("Private unsaved workspace draft");
await expect(
- page.getByRole("button", { name: "Deployment vorbereiten", exact: true }),
- ).toBeDisabled();
+ page
+ .getByRole("navigation", { name: "Konfiguration", exact: true })
+ .getByRole("button", {
+ name: "Speichern und Plan erstellen",
+ exact: true,
+ }),
+ ).toBeEnabled();
expect(state.writes()).toBe(0);
await page
.locator("#configuration-save")
@@ -282,7 +299,9 @@ test("session scope switches hide private drafts and restore only their original
.click();
await expect.poll(state.writes).toBe(1);
await expect(
- page.getByRole("button", { name: "Deployment vorbereiten", exact: true }),
+ page
+ .getByRole("navigation", { name: "Konfiguration", exact: true })
+ .getByRole("button", { name: "Plan erstellen", exact: true }),
).toBeEnabled();
});
@@ -411,8 +430,13 @@ test("logout from an older session generation cannot clear the renewed owned dra
page.getByLabel("Name der Konfiguration", { exact: true }),
).toHaveValue("New generation unsaved draft");
await expect(
- page.getByRole("button", { name: "Deployment vorbereiten", exact: true }),
- ).toBeDisabled();
+ page
+ .getByRole("navigation", { name: "Konfiguration", exact: true })
+ .getByRole("button", {
+ name: "Speichern und Plan erstellen",
+ exact: true,
+ }),
+ ).toBeEnabled();
expect(state.writes()).toBe(0);
});
From 7c463f09583773cb6c8a098270e6f398aa44d426 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lukas=20Weberru=C3=9F?=
Date: Wed, 25 Nov 2026 21:01:25 +0000
Subject: [PATCH 4/5] test(configurator): match the named Fork Plan action
---
landing-zone-configurator/app/e2e/common-editor.spec.ts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/landing-zone-configurator/app/e2e/common-editor.spec.ts b/landing-zone-configurator/app/e2e/common-editor.spec.ts
index 0b90f43d..3c0c7b3e 100644
--- a/landing-zone-configurator/app/e2e/common-editor.spec.ts
+++ b/landing-zone-configurator/app/e2e/common-editor.spec.ts
@@ -525,7 +525,7 @@ test("shared configuration saves, reopens and restores in the account workspace"
.getByRole("link", { name: "Konfigurationen", exact: true })
.click();
await page
- .getByRole("button", { name: "Plan erstellen", exact: true })
+ .getByRole("button", { name: /^Plan erstellen\s*:/ })
.click();
await expect(page.getByRole("alert")).toContainText(
"Erstbereitstellungsplan noch nicht verfügbar",
From e098096fa7be08ceb11e3f48c4fba097ed255e55 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lukas=20Weberru=C3=9F?=
Date: Wed, 25 Nov 2026 21:04:18 +0000
Subject: [PATCH 5/5] style(configurator): format the Fork Plan regression
locator
---
landing-zone-configurator/app/e2e/common-editor.spec.ts | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/landing-zone-configurator/app/e2e/common-editor.spec.ts b/landing-zone-configurator/app/e2e/common-editor.spec.ts
index 3c0c7b3e..35c97e0e 100644
--- a/landing-zone-configurator/app/e2e/common-editor.spec.ts
+++ b/landing-zone-configurator/app/e2e/common-editor.spec.ts
@@ -524,9 +524,7 @@ test("shared configuration saves, reopens and restores in the account workspace"
.getByRole("navigation", { name: "Brotkrumennavigation", exact: true })
.getByRole("link", { name: "Konfigurationen", exact: true })
.click();
- await page
- .getByRole("button", { name: /^Plan erstellen\s*:/ })
- .click();
+ await page.getByRole("button", { name: /^Plan erstellen\s*:/ }).click();
await expect(page.getByRole("alert")).toContainText(
"Erstbereitstellungsplan noch nicht verfügbar",
);