Skip to content

feat: add e2e testing with playwright#84

Merged
baruchiro merged 16 commits intoos-scar:masterfrom
ETtestim:master
May 28, 2023
Merged

feat: add e2e testing with playwright#84
baruchiro merged 16 commits intoos-scar:masterfrom
ETtestim:master

Conversation

@ETtestim
Copy link
Contributor

added playwright for e2e testing.
it uses real browser and install the extension.
can only run on chrome/ chromium browsers.
headless mode can be just need to research more on how to.
added a example test for npm.
Also added a unique id to the tooltip so we can catch its selector with ease.

@ETtestim
Copy link
Contributor Author

We should add a Readme on how to use playwright and write tests.

Copy link
Collaborator

@baruchiro baruchiro left a comment

Choose a reason for hiding this comment

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

Good start, I just reviewed it a little, it failed when I run it locally, I will try again tomorrow.

@ETtestim
Copy link
Contributor Author

@baruchiro fixed the issues plz let me know if there is anything else

@baruchiro baruchiro force-pushed the master branch 2 times, most recently from e8eb49b to aaf39e5 Compare May 23, 2023 07:18
@baruchiro
Copy link
Collaborator

I can't make the lint pipeline work, see lirantal/github-action-new-dependencies-advisor#4

Copy link
Collaborator

@baruchiro baruchiro left a comment

Choose a reason for hiding this comment

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

Very good!
As far as I understand, it is not running in headless mode.

  • We should add a Readme on how to use Playwright and write tests. (I'm not sure about that. Just ask to run yarn e2e. Also maybe we will add a PR template to make sure the contributor ran the e2e on its own machine.)

Copy link
Collaborator

@baruchiro baruchiro left a comment

Choose a reason for hiding this comment

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

HeartGIF

Thanks!!!!!!!!!
Tests are crucial to me, you did great hard work, I hope we will add more tests soon.

@jossef give kodus to @ETtestim

"test:components": "cd tests/components && vite",
"e2e": "playwright test",
"e2e:debug": "playwright test --debug",
"e2e": "yarn build && playwright test",
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@baruchiro just to understand this line why do we need to build it?

Copy link
Collaborator

Choose a reason for hiding this comment

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

You have to build the extension before running the e2e, right?

See my comment here: #84 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

got it now

@baruchiro baruchiro merged commit fa259f2 into os-scar:master May 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants