Skip to content

test: add end-to-end (e2e) tests for web - #1009

Open
harishr-testmuai wants to merge 1 commit into
LinkStackOrg:mainfrom
harishr-testmuai:test/e2e-tests
Open

harishr-testmuai wants to merge 1 commit into
LinkStackOrg:mainfrom
harishr-testmuai:test/e2e-tests

Conversation

@harishr-testmuai

Copy link
Copy Markdown

Adds browser end-to-end tests under e2e/kane/, with no changes to app code:

  • setup_test.md: go through the first-run setup wizard (language, dependency check, SQLite, admin account, page settings), sign in, and check the dashboard greets @alexmorgan with 0 links
  • link_test.md: sign in, add a GitHub link from the predefined sites, and check it on the Links page and on the public @alexmorgan page
  • output-<test>/: recorded steps so reruns replay quickly, a Result.md per test, and an exported Playwright (JavaScript) version of each test
  • e2e/kane/README.md: how to run them

The tests run against the official linkstackorg/linkstack Docker image on port 8190, starting from a new install. Both pass, on the first run and on three replays from a fresh install. Nothing is added under
tests/, so PHPUnit is unaffected. This is part of adding end to end (e2e) test for web and mobile coverage to open source projects.

One thing to flag: release.yml zips everything except .git, .github and README.md, so e2e/ would end up in the release zips. I didn't want to touch the release workflow without asking; if you'd like, I can add rm -r "e2e" next to the existing rm -r ".github" line.

Click through the setup wizard, signing in and adding a link in a real browser. Each test is a plain-English _test.md file with recorded steps and an exported Playwright version.
@harishr-testmuai

Copy link
Copy Markdown
Author

The tests are written in plain English with Kane CLI. Disclosure: I work at TestMu AI, which makes Kane CLI. Happy to move the folder or trim the recorded files if you'd prefer a lighter footprint. We give open source projects free licenses to create, run and maintain their test suites; it's an initiative to promote open source contributions from our side. If that would help LinkStack, email me at harishr@testmuai.com.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant