Skip to content
This repository has been archived by the owner on Jun 18, 2023. It is now read-only.

Basic UI tests with playwright #33

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

timonback
Copy link
Member

@timonback timonback commented Oct 30, 2022

This PR exists to start a discussion:

  1. Node is updated to v18
  2. Angular and other dependencies are updated
  3. The linter (tslint) is removed (functionality is re-added via the code formatter PR)
  4. The karma + jasmie test is removed. I assume that the UI will not contain (extended) business logic, so that e2e tests should be sufficient
  5. e2e using playwright are added. This tests are basic but include already:
    • The header component (github link)
    • The info component (including the json download)
    • The first entry of the channel component with basic check of the tabs
  6. github action integration for the PR build (build on master is excluded at this point)

The PR will need some further tweaking and more tests. However, what do you think about the direction?

@netlify
Copy link

netlify bot commented Oct 30, 2022

Deploy Preview for mellow-manatee-3041fb ready!

Name Link
🔨 Latest commit 989913d
🔍 Latest deploy log https://app.netlify.com/sites/mellow-manatee-3041fb/deploys/637bb5847da5a10009680983
😎 Deploy Preview https://deploy-preview-33--mellow-manatee-3041fb.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@stavshamir
Copy link
Member

Upgrading is great, thanks.
About the tests:

  • I think we should focus only on components that we know will not change much, like you did with the Header and info.
  • About the channel component, I'm not so sure. Introducing message headers tab got me thinking about restructuring this component, but I am still not sure how. So I think putting effort into writing a UI test for that only to have it changed soon is not so optimal.
  • I think unit tests for the mapper (from backend model to ui model) is also important

@timonback
Copy link
Member Author

Great to hear. I did cleanup the PR and from my point of view it is ready to merge.
Did I mention that angular compiles the code way faster after the update now?

I left the tests as is and also included the (already written) channel section tests.
I agree, we need a better ui for the channels, but until some tests are better than none. When there is something better, we can replace those.

Unit tests for the mapper can be added in another pr. My go-to default tool is jest for this. I can imagine tests to verify that the kafka, amqp, spring-stream yml are converted (without error).

@timonback timonback marked this pull request as ready for review November 20, 2022 20:59
- Angular upgrade to v14
- ngx-highlightjs to v7
- rxjs to v7
- typescript to v4

Removed:
- angular/compiler
- tslib
- ts-node
- tslint (deprecated)
- -> codelyzer
Removed (unused):
- testing (jasmine, karma)
- protractor
@timonback timonback force-pushed the feature/ui-tests-with-playwright branch from 593b6c6 to 989913d Compare November 21, 2022 17:29
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants