Rayrun
← Back to Discord Forum

Component testing

Hi, I'm getting started with playwright. I've got two questions.

  1. Is there a way to run component tests in watch mode?
  2. Is there a integration between component testing and axe? I tried following the documentation for accessibility testing with AxeBuilder, but it seems it tests the whole page (so it complains my component lacks a h1 for example). I tried using .include('#component-id'), but this is not working all the time, and I wanted to know if there was a better way of doing this. Thanks in advance!

This thread is trying to answer question "Is there a way to run component tests in watch mode and is there an integration between component testing and axe in Playwright?"

6 replies

UI mode has watch mode, there is also a CLI watch mode

dunno about 2, axe and axe+playwright integration is 3rd party

@skorp32: how do I run it as watch mode? I'm currently running `pnpm test-ct`. It doesn't seem to have a --watch option.

how do I run it as watch mode? I'm currently running pnpm test-ct. It doesn't seem to have a --watch option.

also, can I configure playwright not to open a new tab for the report each time I run a test, and instead refresh the tab I already have open?

@pfluck: Set `PWTEST_WATCH=1` environment variable, `PWTEST_WATCH=1 pnpm test-ct` should probably work

Set PWTEST_WATCH=1 environment variable, PWTEST_WATCH=1 pnpm test-ct should probably work

@pfluck: Probably no, but that sounds like a neat feature request. If you have time, you can file it in https://github.com/microsoft/playwright/issues/new?assignees=&labels=&projects=&template=feature_request.md&title=%5BFeature%5D

Probably no, but that sounds like a neat feature request. If you have time, you can file it in https://github.com/microsoft/playwright/issues/new?assignees=&labels=&projects=&template=feature_request.md&title=%5BFeature%5D

Related Discord Threads

TwitterGitHubLinkedIn
AboutQuestionsDiscord ForumBrowser ExtensionTagsQA Jobs

Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email luc@ray.run.