Skip to content

Conversation

bearfriend
Copy link
Contributor

This is just some basic setup to be able to run --watch and --manual, including automatically pausing in DevTools at the top of each test file.

We can still decide to implement a UI-based play/pause/next system with promises, so I'll link this to US152298 (Visual-diff: ability to debug in the browser), but won't consider it done.

@@ -23,7 +23,7 @@ export async function reset(opts) {

window.scroll(0, 0);

await sendMouse({ type: 'move', position: [0, 0] });
await sendMouse({ type: 'move', position: [0, 0] }).catch(() => {});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

In manual mode, tests are run in your existing browser installs, which can't be controlled this way, so simply ignoring the failures here, though a console warning may be good. These work fine in watch mode.

Comment on lines +17 to +19
{ name: 'grep', alias: 'g', type: String },
{ name: 'filter', alias: 'f', type: String, multiple: true },
Copy link
Contributor Author

@bearfriend bearfriend Jun 16, 2023

Choose a reason for hiding this comment

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

grep now just forwards to the mocha config and works as it does in the existing library. filter (open to other names) will do what grep was doing previously: filter test files so you can run your tests in 2 seconds instead of 20.

@bearfriend bearfriend marked this pull request as ready for review June 16, 2023 14:19
@bearfriend bearfriend requested a review from a team as a code owner June 16, 2023 14:19
const { watch, manual, group, files, playwright } = this.#cliArgs;

if (!group || group === 'default') {
if (playwright) {
Copy link
Member

Choose a reason for hiding this comment

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

Haha, just wrapping their CLI is looking better and better each time I look at these warnings...

@dlockhart dlockhart force-pushed the dgleckler/manual-pause branch from 931d3c7 to 24410f0 Compare June 19, 2023 19:12
Copy link
Member

@dlockhart dlockhart left a comment

Choose a reason for hiding this comment

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

This is working for me!

@bearfriend bearfriend merged commit 26219ce into main Jun 20, 2023
@bearfriend bearfriend deleted the dgleckler/manual-pause branch June 20, 2023 16:15
@ghost
Copy link

ghost commented Jun 20, 2023

🎉 This PR is included in version 0.10.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@ghost ghost added the released label Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants