Grid charge: fix 0 cost limit (#29817)
This commit is contained in:
parent
ffcc99db3a
commit
207fa7984c
2 changed files with 11 additions and 4 deletions
|
|
@ -10,7 +10,7 @@
|
|||
>
|
||||
<div class="container">
|
||||
<SmartCostLimit
|
||||
:current-limit="loadpoint?.smartCostLimit || null"
|
||||
:current-limit="loadpoint?.smartCostLimit ?? null"
|
||||
:last-limit="loadpoint?.lastSmartCostLimit"
|
||||
:smart-cost-type="smartCostType"
|
||||
:currency="currency"
|
||||
|
|
@ -22,7 +22,7 @@
|
|||
class="mt-2 mb-4"
|
||||
/>
|
||||
<SmartFeedInPriority
|
||||
:current-limit="loadpoint?.smartFeedInPriorityLimit || null"
|
||||
:current-limit="loadpoint?.smartFeedInPriorityLimit ?? null"
|
||||
:last-limit="loadpoint?.lastSmartFeedInPriorityLimit"
|
||||
:currency="currency"
|
||||
:loadpoint-id="id"
|
||||
|
|
|
|||
|
|
@ -55,11 +55,18 @@ test.describe("smart cost limit", async () => {
|
|||
const modal = page.getByTestId("loadpoint-settings-modal");
|
||||
await expectModalVisible(modal);
|
||||
await modal.getByLabel("Enable limit").check();
|
||||
await modal.getByLabel("Price limit").selectOption("≤ 10.0 ct/kWh");
|
||||
await modal.getByLabel("Price limit").selectOption("≤ 0.0 ct/kWh");
|
||||
await expect(modal.getByTestId("active-hours")).toHaveText("Active time");
|
||||
await modal.getByLabel("Close").click();
|
||||
await expectModalHidden(modal);
|
||||
await expect(page.getByTestId("vehicle-status-charger")).toHaveText("Charging…");
|
||||
await expect(page.getByTestId("vehicle-status-smartcost")).toHaveText("≤ 10.0 ct");
|
||||
await expect(page.getByTestId("vehicle-status-smartcost")).toHaveText("≤ 0.0 ct");
|
||||
|
||||
// Reload to force a fresh mount of the loadpoint components
|
||||
await page.reload();
|
||||
await page.getByTestId("loadpoint-settings-button").nth(1).click();
|
||||
await expectModalVisible(modal);
|
||||
await expect(modal.getByLabel("Enable limit")).toBeChecked();
|
||||
await expect(modal.getByLabel("Price limit")).toContainText("≤ 0.0 ct/kWh");
|
||||
});
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue