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 Playwright Integration Testing #335

Merged
merged 26 commits into from
May 14, 2024
Merged

Add Playwright Integration Testing #335

merged 26 commits into from
May 14, 2024

Conversation

qweliant
Copy link
Contributor

@qweliant qweliant commented May 1, 2024

Issue(s) Resolved

#291

Test Plan

run nvm use
run pnpm i
run pnpm --filter core run reset
run pnpm dev

in another terminal tab:
run the integration test using pnpm --filter core run playwright:test to view test in your terminal
run the integration test using pnpm --filter core run playwright:ui to view test in a ui

If you install the playwright plugin you can do the testing from vscode in the testing tab. you still need to run the server.

Screenshots (if applicable)

Optional

Notes/Context/Gotchas

There is no teardown and setup steps yet, where authentication and setting up test data would normally go, so when running the assign test the pub really will be assigned

Supporting Docs

@qweliant
Copy link
Contributor Author

qweliant commented May 1, 2024

Adding this here for context for myself:

TODO

investigate node upgrade: playwright required the latest version of node to work. i need to be sure there wont be any catastrophically horrendously down bad side effects. consider node versions in docker env variables and a smoke test through current integrations, actions, and stage management

Future work and follow up to this should be:

  • use production build for app: we currently do have a good way of running production builds. we should if we want to run integration test in our CI
  • Setting up integration testing in our GH hooks
  • ensuring testing enviornments on render and aws do not drift

@qweliant qweliant marked this pull request as draft May 1, 2024 20:00
@qweliant qweliant force-pushed the qdt/it-playwright branch from 45500a9 to bf6b31a Compare May 7, 2024 12:50
@qweliant qweliant marked this pull request as ready for review May 7, 2024 13:15
Copy link
Member

@kalilsn kalilsn left a comment

Choose a reason for hiding this comment

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

This looks great so far! But for me, the tests timeout against the dev server even after it's warmed up. I'm ok with merging this without them passing, but I don't think it's practical to run them against the dev server in CI (or in general really) so the next step is definitely making sure we can run them against the compiled app.

I also wanted to mention that there's an additional setup step required that's not in your test instructions: pnpm --filter core exec playwright install to make sure the browsers are installed.

@qweliant qweliant requested a review from kalilsn May 7, 2024 16:49
@qweliant
Copy link
Contributor Author

qweliant commented May 7, 2024

This looks great so far! But for me, the tests timeout against the dev server even after it's warmed up. I'm ok with merging this without them passing, but I don't think it's practical to run them against the dev server in CI (or in general really) so the next step is definitely making sure we can run them against the compiled app.

I also wanted to mention that there's an additional setup step required that's not in your test instructions: pnpm --filter core exec playwright install to make sure the browsers are installed.

strange. they are failing for me as well. they were not earlier. let me look into this

@qweliant qweliant force-pushed the qdt/it-playwright branch from f7bba33 to 87175aa Compare May 9, 2024 23:39
Copy link
Member

@kalilsn kalilsn left a comment

Choose a reason for hiding this comment

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

Tests are passing as long as they don't time out for me, looks great!

@qweliant qweliant merged commit 9b56cb5 into main May 14, 2024
7 checks passed
@qweliant qweliant deleted the qdt/it-playwright branch May 14, 2024 15:10
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