web icon indicating copy to clipboard operation
web copied to clipboard

Introduce Playwright for simple integration tests

Open lightswitch05 opened this issue 3 years ago • 0 comments

  • What does this PR aim to accomplish?:

I've been playing around with Playwright E2E testing at work, and I thought it might be fun to see if I could add some tests here. I have absolutely no idea if this appeals to anyone here, and I realize that I didn't really discuss it first, but perhaps we can discuss it now, and no hard feelings if it isn't really inline with the project.

  • How does this PR accomplish the above?:

There is a lot in here, and so I'm going to make a bunch of comments on the individual files to perhaps make it more clear. The overall idea is to start up a Pihole docker container with this repo volume-mounted within it. Next, startup a playwright docker container to run tests against the Pihole. Playwright does not have to be ran from docker, but I thought it made networking simple in this case.

There are only two tests in here at the moment, and they are very basic. The majority of this PR is just all setup, if y'all like this PR and accept the changes, then it wouldn't be much more work to expand out the tests to hit more pages.

  • What documentation changes (if any) are needed to support this PR?:

n/a, or perhaps make a note about having docker-compose and running ./tests/run


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code and I have tested my changes.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)

  • [x] I have read the above and my PR is ready for review. Check this box to confirm

lightswitch05 avatar Dec 10 '22 17:12 lightswitch05