diff --git a/assets/js/components/Config/LoadpointModal.vue b/assets/js/components/Config/LoadpointModal.vue index 86c7f2b95..700f6a7ae 100644 --- a/assets/js/components/Config/LoadpointModal.vue +++ b/assets/js/components/Config/LoadpointModal.vue @@ -742,7 +742,7 @@ export default { ]; }, showCircuit() { - return this.circuits.length > 0 || this.values.circuit !== ""; + return this.circuits.length > 0 || !!this.values.circuit; }, invalidCircuit() { const { circuit } = this.values; diff --git a/tests/config-circuit.spec.ts b/tests/config-circuit.spec.ts index ee8d75103..43b5dcb56 100644 --- a/tests/config-circuit.spec.ts +++ b/tests/config-circuit.spec.ts @@ -69,6 +69,9 @@ test.describe("circuit", async () => { await expectModalHidden(chargerModal); await expectModalVisible(lpModal); + // no load management, no circuits + await expect(lpModal.getByLabel("Circuit")).not.toBeVisible(); + await lpModal.getByRole("button", { name: "Save" }).click(); await expectModalHidden(lpModal);