Planner: don’t show plan status in off/fast mode (#13222)
This commit is contained in:
parent
ea3ef49c59
commit
18436a1d68
5 changed files with 40 additions and 8 deletions
|
|
@ -68,6 +68,32 @@ describe("plan", () => {
|
|||
}
|
||||
);
|
||||
});
|
||||
test("dont show plan status if plan is disabled (e.g. off, fast mode)", () => {
|
||||
expectStatus(
|
||||
{
|
||||
effectivePlanTime,
|
||||
planActive: true,
|
||||
charging: true,
|
||||
connected: true,
|
||||
chargingPlanDisabled: true,
|
||||
},
|
||||
"charging"
|
||||
);
|
||||
expectStatus(
|
||||
{
|
||||
effectivePlanTime,
|
||||
planActive: true,
|
||||
enabled: true,
|
||||
connected: true,
|
||||
chargingPlanDisabled: true,
|
||||
},
|
||||
"waitForVehicle"
|
||||
);
|
||||
expectStatus(
|
||||
{ effectivePlanTime, planProjectedStart, connected: true, chargingPlanDisabled: true },
|
||||
"connected"
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
describe("climating", () => {
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ export default {
|
|||
heating: Boolean,
|
||||
effectivePlanTime: String,
|
||||
planProjectedStart: String,
|
||||
chargingPlanDisabled: Boolean,
|
||||
planActive: Boolean,
|
||||
phaseAction: String,
|
||||
phaseRemainingInterpolated: Number,
|
||||
|
|
@ -67,7 +68,11 @@ export default {
|
|||
}
|
||||
|
||||
// plan
|
||||
if (this.effectivePlanTime && !this.targetChargeDisabled) {
|
||||
if (
|
||||
!this.chargingPlanDisabled &&
|
||||
this.effectivePlanTime &&
|
||||
!this.targetChargeDisabled
|
||||
) {
|
||||
if (this.planActive && this.charging) {
|
||||
return t("targetChargeActive");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -365,9 +365,9 @@ pvDisable = "Zu wenig Überschuss. Pausiere in {remaining} …"
|
|||
pvEnable = "Überschuss verfügbar. Starte in {remaining} …"
|
||||
scale1p = "Reduziere auf einphasig in {remaining} …"
|
||||
scale3p = "Erhöhe auf dreiphasig in {remaining} …"
|
||||
targetChargeActive = "Zielladen aktiv …"
|
||||
targetChargePlanned = "Zielladen geplant. Ladung startet {time} Uhr."
|
||||
targetChargeWaitForVehicle = "Zielladen bereit. Warte auf Fahrzeug …"
|
||||
targetChargeActive = "Ladeplan aktiv …"
|
||||
targetChargePlanned = "Ladeplan startet {time} Uhr."
|
||||
targetChargeWaitForVehicle = "Ladeplan bereit. Warte auf Fahrzeug …"
|
||||
unknown = ""
|
||||
vehicleLimitReached = "Fahrzeuglimit {soc}% erreicht."
|
||||
waitForVehicle = "Ladebereit. Warte auf Fahrzeug …"
|
||||
|
|
|
|||
|
|
@ -362,9 +362,9 @@ pvDisable = "Not enough surplus. Pausing in {remaining}…"
|
|||
pvEnable = "Surplus available. Starting in {remaining}…"
|
||||
scale1p = "Reducing to 1-phase charging in {remaining}…"
|
||||
scale3p = "Increasing to 3-phase charging in {remaining}…"
|
||||
targetChargeActive = "Target charge active…"
|
||||
targetChargePlanned = "Target charging starts at {time}."
|
||||
targetChargeWaitForVehicle = "Target charge ready. Waiting for vehicle…"
|
||||
targetChargeActive = "Charging plan active…"
|
||||
targetChargePlanned = "Charging plan starts at {time}."
|
||||
targetChargeWaitForVehicle = "Charging plan ready. Waiting for vehicle…"
|
||||
unknown = ""
|
||||
vehicleLimitReached = "Vehicle limit {soc}% reached."
|
||||
waitForVehicle = "Ready. Waiting for vehicle…"
|
||||
|
|
|
|||
|
|
@ -44,6 +44,7 @@ test.describe("basic functionality", async () => {
|
|||
await expect(lp1.getByText("Loadpoint", { exact: true })).toBeVisible();
|
||||
|
||||
await lp1.getByTestId("limit-soc").getByRole("combobox").selectOption("90%");
|
||||
await lp1.getByRole("button", { name: "Solar", exact: true }).click();
|
||||
await lp1.getByTestId("charging-plan").getByRole("button", { name: "none" }).click();
|
||||
|
||||
await page.getByTestId("plan-day").selectOption({ index: 1 });
|
||||
|
|
@ -57,7 +58,7 @@ test.describe("basic functionality", async () => {
|
|||
"tomorrow 9:30 AM80%"
|
||||
);
|
||||
|
||||
await expect(lp1.getByTestId("vehicle-status")).toContainText("Target charging starts at");
|
||||
await expect(lp1.getByTestId("vehicle-status")).toContainText("Charging plan starts at");
|
||||
await expect(lp1.getByTestId("plan-marker")).toBeVisible();
|
||||
await expect(lp1.getByTestId("charging-plan").getByRole("button")).toHaveText(
|
||||
"tomorrow 9:30 AM80%"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue