Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix nightly build - Change smart-cost test config #15031

Merged
merged 1 commit into from
Jul 24, 2024

Conversation

ReneNulschDE
Copy link
Contributor

The nightly build is not working. The test case smart-cost is failing.

The tests/smart-cost-only.evcc.yaml has a special setting that the price is different between 1-6am. I have changed this to 0-1 so that the nightly that runs at 2 have the right setup.

Error: Timed out 5000ms waiting for expect(locator).toHaveText(expected)

Locator: getByTestId('vehicle-status-smartcost')
Expected string: "40.0 ct ≤ 40.0 ct"
Received string: "20.0 ct ≤ 40.0 ct"
Call log:
  - expect.toHaveText with timeout 5000ms
  - waiting for getByTestId('vehicle-status-smartcost')
  -   locator resolved to <button type="button" data-v-3e4eaa35="" data-bs-toggle=…>…</button>
  -   unexpected value "20.0 ct ≤ 40.0 ct"
  -   locator resolved to <button type="button" data-v-3e4eaa35="" data-bs-toggle=…>…</button>
  -   unexpected value "20.0 ct ≤ 40.0 ct"
  -   locator resolved to <button type="button" data-v-3e4eaa35="" data-bs-toggle=…>…</button>
  -   unexpected value "20.0 ct ≤ 40.0 ct"
  -   locator resolved to <button type="button" data-v-3e4eaa35="" data-bs-toggle=…>…</button>
  -   unexpected value "20.0 ct ≤ 40.0 ct"
  -   locator resolved to <button type="button" data-v-3e4eaa35="" data-bs-toggle=…>…</button>
  -   unexpected value "20.0 ct ≤ 40.0 ct"
  -   locator resolved to <button type="button" data-v-3e4eaa35="" data-bs-toggle=…>…</button>
  -   unexpected value "20.0 ct ≤ 40.0 ct"
  -   locator resolved to <button type="button" data-v-3e4eaa35="" data-bs-toggle=…>…</button>
  -   unexpected value "20.0 ct ≤ 40.0 ct"
  -   locator resolved to <button type="button" data-v-3e4eaa35="" data-bs-toggle=…>…</button>
  -   unexpected value "20.0 ct ≤ 40.0 ct"
  -   locator resolved to <button type="button" data-v-3e4eaa35="" data-bs-toggle=…>…</button>
  -   unexpected value "20.0 ct ≤ 40.0 ct"


  39 |     await expect(page.getByTestId("loadpoint-settings-modal")).not.toBeVisible();
  40 |     await expect(page.getByTestId("vehicle-status-charger")).toHaveText("Charging…");
> 41 |     await expect(page.getByTestId("vehicle-status-smartcost")).toHaveText("40.0 ct ≤ 40.0 ct");
     |                                                                ^
  42 |   });
  43 |   test("price above limit", async ({ page }) => {
  44 |     await page.goto("/");

    at /home/runner/work/evcc/evcc/tests/smart-cost.spec.js:41:64

@naltatis naltatis self-requested a review July 24, 2024 12:51
@naltatis
Copy link
Member

@ReneNulschDE Nice catch! I've invested a lot of time in improving test stability and runtime, but must have overlooked this one permanently. This explains a log 😄. Thanks!

Proper solution would be to accept both possible prices (20ct and 40ct) in the test. Then it would work at any time. But this fix at least fixes the nightly.

@naltatis naltatis merged commit 972259f into evcc-io:master Jul 24, 2024
6 checks passed
@ReneNulschDE ReneNulschDE deleted the fix-nightly-build branch July 24, 2024 12:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants