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

Experiment using withFooPage(cb) to scope particular pages. #7

Closed
wants to merge 1 commit into from

Conversation

jpolley
Copy link
Owner

@jpolley jpolley commented Jul 17, 2024

Recently saw this pattern out in the wild and decided to adopt it in this PR to see how it feels.

Using the withXxxPage(cb) pattern creates a visual block which can help the maintainer more clearly see the scopes of particular pages. It's sort of like #tap do { |p| ... } in Ruby.

@jpolley jpolley marked this pull request as draft July 17, 2024 17:20
@jpolley
Copy link
Owner Author

jpolley commented Jul 17, 2024

Hmmm, I think for a developer that spends all day working in production code this change makes sense. One pro is using an established pattern that can be used and understood by developers who are used to working with abstractions all over the place.

However, taking the original albeit more verbose approach, it is easier to comprehend to folks new to programming and Playwright.

Depending on the team makeup, and the preferences of the folks who will be maintaining and monitoring these tests, I would want to choose the option that the team enjoys the most.

@jpolley jpolley closed this Jul 17, 2024
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.

1 participant