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

Add e2e tests with playwright #8123

Merged
merged 25 commits into from
Jun 5, 2023
Merged

Add e2e tests with playwright #8123

merged 25 commits into from
Jun 5, 2023

Conversation

naltatis
Copy link
Member

@naltatis naltatis commented May 21, 2023

Introduce end to end tests with playwright.

Tests starts an evcc instance with a prepared *.evcc.yaml file for each test suite.

npm run playwright

Todos:

  • maybe optimize GitHub actions > maybe reuse evcc build from previous steps

Bildschirmfoto 2023-05-21 um 17 14 32

@naltatis naltatis marked this pull request as draft May 21, 2023 14:51
@naltatis naltatis marked this pull request as ready for review May 21, 2023 15:17
@andig andig added the infrastructure Basic functionality label May 21, 2023
@naltatis
Copy link
Member Author

@andig ich hab die Pipeline etwas umgebaut. Lint und Test sind jeweils für UI und Go zusammengefasst. Das spart redundante Installs. Die Integrationstests verwenden nun das Binary was der build Schritt erzeugt. Dadurch ist auch gleich schon sichergestellt, dass wir keinen groben Schnitzer drin haben der das Hochfahren verhindert.

@naltatis naltatis requested a review from andig May 30, 2023 10:46
Copy link
Member

@andig andig left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Vielleicht ist das aber auch nicht so schlimm- kannst Du im PR schon sehen wie lange der Build läuft?

.github/workflows/default.yml Outdated Show resolved Hide resolved
.github/workflows/default.yml Show resolved Hide resolved
@naltatis
Copy link
Member Author

Der build Schritt baut nun die komplette Applikation (mit UI). Das Ergebnis wird für den Integrationstest wiederverwendet. Die Laufzeiten sehen gut aus.

Bildschirmfoto 2023-05-31 um 10 40 33

Beim Integrationstests geht der Großteil der Zeit für das Vorbereiten des Containers drauf (Systemabhängigkeiten installieren). Die Ausführung der Tests ist relativ schnell.

@andig
Copy link
Member

andig commented Jun 4, 2023

Die meiste Zeit hängt in der Playwrightinstallation. Lässt sich die schneller machen?
Falls nein: könnten wir die:

  • parallel starten
  • auf UI build warten
  • binary einschl. UI neu bauen (das ist fix mit dem Go cache)

...und dann playwright starten?

@naltatis
Copy link
Member Author

naltatis commented Jun 4, 2023

Die Installation beschleunigen ist schwierig. Es gab mal ne Action von Microsoft, die ist aber deprecated https://github.com/marketplace/actions/run-playwright-tests und die aktuelle Empfehlung ist das was wir hier gerade machen.

Hab aber jetzt einen anderen Weg gefunden und lewagon/wait-on-check-action eingebaut. Damit können alle gleichzeitig loslaufen und Integration kann alles vorbereiten was es braucht und wartet lediglich mit der Testausführung bis das Binary Artefakt hochgeladen wurde.

Bildschirmfoto 2023-06-04 um 16 14 53

@andig
Copy link
Member

andig commented Jun 4, 2023

Klasse- rein damit?!

@naltatis naltatis merged commit 0df8157 into master Jun 5, 2023
@naltatis naltatis deleted the chore/setup_playwright_tests branch June 5, 2023 06:31
andig added a commit that referenced this pull request Jun 10, 2023
naltatis pushed a commit that referenced this pull request Jun 13, 2023
naltatis added a commit that referenced this pull request Jun 13, 2023
naltatis added a commit that referenced this pull request Jun 13, 2023
* Revert "Add e2e tests with playwright (#8123)"

This reverts commit 0df8157.

* Revert "Revert "Add e2e tests with playwright (#8123)""

This reverts commit 2299306.

* fix nightly/release

* fix nightly/release

* fix nightly/release

---------

Co-authored-by: andig <cpuidle@gmx.de>
naltatis added a commit that referenced this pull request Jun 14, 2023
naltatis pushed a commit that referenced this pull request Jun 14, 2023
naltatis added a commit that referenced this pull request Jun 14, 2023
* Revert "Add e2e tests with playwright (#8123)"

This reverts commit 0df8157.

* Revert "Revert "Add e2e tests with playwright (#8123)""

This reverts commit 2299306.

* fix nightly/release

* fix nightly/release

* fix nightly/release

---------

Co-authored-by: andig <cpuidle@gmx.de>
naltatis added a commit that referenced this pull request Aug 2, 2023
…to UI (#8115)

* Plugins: make javascript return values more permissive

* Persist targetSoc/Energy, minSoc and target time, remove experimental from minSoc UI

* go generate

* Fix tests

* Update minSoc description

* Store settings by index. Show plan outside pv mode. Add help texts.

* remove slug

* go mock

* lint

* chore: simplify templates (#8304)

* Add e2e tests with playwright (#8123)

* Revert "1p3p: let charger handle session stop/restart (#7723)"

This reverts commit dd787ce.

* mazda2mqtt: document vin required (#8319)

* FoxESS: split H1/H3 devices (#7376)

Co-authored-by: premultiply <4681172+premultiply@users.noreply.github.com>

* Translations update from Hosted Weblate (#8124)

* Translated using Weblate (Czech)

Currently translated at 37.3% (99 of 265 strings)

Co-authored-by: Dusan Suja <bc.suja.dusan@googlemail.com>
Translate-URL: https://hosted.weblate.org/projects/evcc/evcc/cs/
Translation: evcc/evcc

* Translated using Weblate (Finnish)

Currently translated at 100.0% (265 of 265 strings)

Co-authored-by: Arna Lepikkö <arna.lepikko@telemail.fi>
Translate-URL: https://hosted.weblate.org/projects/evcc/evcc/fi/
Translation: evcc/evcc

* Translated using Weblate (German)

Currently translated at 100.0% (265 of 265 strings)

Co-authored-by: ThinkEV <claas@rootdir.de>
Translate-URL: https://hosted.weblate.org/projects/evcc/evcc/de/
Translation: evcc/evcc

* Translated using Weblate (Croatian)

Currently translated at 100.0% (265 of 265 strings)

Translated using Weblate (Slovenian)

Currently translated at 100.0% (265 of 265 strings)

Co-authored-by: Žiga Deisinger <ziga@deisinger.si>
Translate-URL: https://hosted.weblate.org/projects/evcc/evcc/hr/
Translate-URL: https://hosted.weblate.org/projects/evcc/evcc/sl/
Translation: evcc/evcc

* Translated using Weblate (Catalan)

Currently translated at 100.0% (265 of 265 strings)

Co-authored-by: Norbert Poch <npoch@yahoo.com>
Translate-URL: https://hosted.weblate.org/projects/evcc/evcc/ca/
Translation: evcc/evcc

* Translated using Weblate (Dutch)

Currently translated at 76.6% (203 of 265 strings)

Translated using Weblate (Dutch)

Currently translated at 74.3% (197 of 265 strings)

Co-authored-by: Ruben Van Boxem <vanboxem.ruben@gmail.com>
Translate-URL: https://hosted.weblate.org/projects/evcc/evcc/nl/
Translation: evcc/evcc

* fix toml

---------

Co-authored-by: Dusan Suja <bc.suja.dusan@googlemail.com>
Co-authored-by: Arna Lepikkö <arna.lepikko@telemail.fi>
Co-authored-by: ThinkEV <claas@rootdir.de>
Co-authored-by: Žiga Deisinger <ziga@deisinger.si>
Co-authored-by: Norbert Poch <npoch@yahoo.com>
Co-authored-by: Ruben Van Boxem <vanboxem.ruben@gmail.com>
Co-authored-by: premultiply <4681172+premultiply@users.noreply.github.com>

* Add OBO Betterman Ion (#8321)

Also aligns heartbeat implementations

* Enphase: add token auth (firmware D7.x.xxx) and grid (#8247)

* Mqtt: fix smartCostLimit topic case (#8328)

* Add ISO15118 vehicle template (#8302)

* Mqtt: simplify setters

* Mqtt: disable message ordering to improve performance

* chore: simplify random state generation

* Porsche: remove deprecated mobile api (#8349)

* Porsche: remove remaining mobile api types

* Cupra: add odometer (#8340)

* chore: refactor go-stylish

* chore: fix stale handler

* mazda2mqtt: longer timeout (#8364)

* chore: pre-process toml

* chore: prevent toml double quotes

* Audi: temporarily switch to etron (#8374)

* Fix nightly build (#8384)

* Update SunSpec templates (#8270)

* Revert "Fix nightly build (#8384)"

This reverts commit 536dbc9.

* Revert "Add e2e tests with playwright (#8123)"

This reverts commit 0df8157.

* Easee: update Observation IDs (#8391)

* Easee: handle smartCharging errors (#8389)

* TWC: add non-Tesla vehicle warning (#8329)

* TWC: allow loadpoint to wakeup vehicle (#8284)

* chore: use gridx consts

* Fix ISO15118 vehicle (#8402)

Such vehicles would be reported as `(Offline)` previously, as no Soc can be fetched and thus needs to behave as the `offline` template.

The SoC is fetched via the charger, so hardcode it to 0 in here

* Modbus: add coils  (#8385)

* OpenEVSE: fix api (#8415)

* chore: refactor offline vehicles (#8404)

* Easee: wait for api confirmation (#8307)

* Revert "Easee: wait for api confirmation (#8307)"

This reverts commit ce0e427.

* automatically switch session log energy unit (#8371)

Show the charged energy in the session log table and details in Wh for
values below 1 kWh and in kWh for larger values

* Fix nightly/release + integration workflow  (#8450)

* Revert "Add e2e tests with playwright (#8123)"

This reverts commit 0df8157.

* Revert "Revert "Add e2e tests with playwright (#8123)""

This reverts commit 2299306.

* fix nightly/release

* fix nightly/release

* fix nightly/release

---------

Co-authored-by: andig <cpuidle@gmx.de>

* chore: no integration on nightly

* chore: no integration on nightly

* chore: no integration on nightly

* Sessions: filter, monthly sums, paging (#8278)

* fmt

* Update i18n/en.toml

Co-authored-by: Simon Riepl <43091717+savus4@users.noreply.github.com>

* Use exp/slices

* Use mux consistently

* add integration tests

---------

Co-authored-by: andig <cpuidle@gmx.de>
Co-authored-by: C64Axel <33828760+C64Axel@users.noreply.github.com>
Co-authored-by: premultiply <4681172+premultiply@users.noreply.github.com>
Co-authored-by: Weblate (bot) <hosted@weblate.org>
Co-authored-by: Dusan Suja <bc.suja.dusan@googlemail.com>
Co-authored-by: Arna Lepikkö <arna.lepikko@telemail.fi>
Co-authored-by: ThinkEV <claas@rootdir.de>
Co-authored-by: Žiga Deisinger <ziga@deisinger.si>
Co-authored-by: Norbert Poch <npoch@yahoo.com>
Co-authored-by: Ruben Van Boxem <vanboxem.ruben@gmail.com>
Co-authored-by: salz3n <79696598+salz3n@users.noreply.github.com>
Co-authored-by: Daniel Paschke <paschdan@gmail.com>
Co-authored-by: Andreas Linde <42185+DerAndereAndi@users.noreply.github.com>
Co-authored-by: lex777777 <84906358+lex777777@users.noreply.github.com>
Co-authored-by: Oscar <OAltr@users.noreply.github.com>
Co-authored-by: Michael Heß <GrimmiMeloni@users.noreply.github.com>
Co-authored-by: RTTTC <94727758+RTTTC@users.noreply.github.com>
Co-authored-by: kscholty <47229207+kscholty@users.noreply.github.com>
Co-authored-by: Jan Alexander <jan.alexander@posteo.de>
Co-authored-by: Simon Riepl <43091717+savus4@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
infrastructure Basic functionality
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants