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

chore: replace custom test fixture with global setup #3039

Merged
merged 1 commit into from
Oct 9, 2024

Conversation

wesbillman
Copy link
Member

Screenshot 2024-10-08 at 1 39 27 PM

@wesbillman wesbillman requested a review from a team as a code owner October 8, 2024 20:39
@wesbillman wesbillman requested review from deniseli and removed request for a team October 8, 2024 20:39
This was referenced Oct 8, 2024
Copy link
Contributor

@deniseli deniseli 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 awesome :D


const browser = await chromium.launch()

// Create a new browser context
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like we probably don't need this comment or the one below

Copy link
Member Author

Choose a reason for hiding this comment

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

I agree 😂

@wesbillman wesbillman force-pushed the fix-playwright-global-setup branch 3 times, most recently from c7c66ee to 1cb1238 Compare October 8, 2024 21:57
@alecthomas
Copy link
Collaborator

Just to clarify... what are we thinking re. testing examples? IMO testing that the examples work is great, is that what we're doing? As opposed to, I guess, using the examples to test that our code works.

@wesbillman
Copy link
Member Author

Hmm, ideally we're doing both. We're testing that that console works correctly and in order for that to happen the examples also need to work correctly.

@alecthomas
Copy link
Collaborator

I don't think it's a good idea for our tests to be tied to the examples, because it means the examples can't evolve without also having to update tests that are unrelated to them.

@wesbillman
Copy link
Member Author

Well, you can't have your cake and eat it too :)

I think at this point we're basically doing this "IMO testing that the examples work is great" and we're using our existing console tests to do it with the added benefit of making sure the console works e2e with some of our examples. If this starts to become a pain or slows people down with writing examples, we can switch over to the smoketest or something more stable.

For the first time we have some confidence in our examples and console, which feels good at the moment.

@wesbillman wesbillman merged commit e0cb271 into main Oct 9, 2024
95 checks passed
@wesbillman wesbillman deleted the fix-playwright-global-setup branch October 9, 2024 16:05
@alecthomas
Copy link
Collaborator

We can have our cake and eat it, you do exactly what we've been doing up until this point - have a specific set of modules that are used for your tests.

@wesbillman
Copy link
Member Author

Yeah I'm super happy to do that, but it will have the downside of having no idea if our examples work. Plus we'll be continuing to maintain duplicates of lots of module functionality. http is a good example where we want to show examples of http modules + we want to make sure the console's http stuff works.

If that's preferred, then we can just duplicate the examples stuff to use for our e2e tests and deal with examples stability in another way.

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.

3 participants