magewire icon indicating copy to clipboard operation
magewire copied to clipboard

V1: Feature: Add End 2 End tests

Open Davycontrolaltdelete opened this issue 2 years ago • 1 comments

Hello,

To improve the stability of this open source project, I've create this pull request together @https://github.com/michielgerritsen to add End 2 End tests. The added Github Action does the following:

  • It sets up a Magento environment.
  • It adds the Hyvä theme.
  • It installs Magewire and https://github.com/magewirephp/magewire-examples.
  • It runs Playwright against this environment.

During testing, the Magewire Examples page is used to check that everything is working as expected. These tests are included:

  • Adding todos. Editing seems broke so we've skipped that.
  • Test the shuffle function. In rare cases this might fail as it could that the new order is the same as the old order.
  • Clicking the previous and next button for the pagination.
  • Validating data, with both invalid and valid data.
  • Adding and subtracting numbers.

To install Hyvä in the pipeline we've added a private key to Hyvä's Gitlab so we could install it. To merge this, the SSH_PRIVATE_KEY secret must be added, which should be in a id_ed25519 format.

There is probably more to test, but the main goal was to get some test up & running to be able to expand from that.

Davycontrolaltdelete avatar Nov 14 '23 10:11 Davycontrolaltdelete

Thanks @Davycontrolaltdelete ! really love this and will try to look at it as soon as possible 💟

wpoortman avatar Nov 16 '23 09:11 wpoortman