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

Create helpers.js #1858

Closed

Conversation

JustinyAhin
Copy link
Member

@JustinyAhin JustinyAhin commented Nov 10, 2021

Utility functions for Core e2e tests

@JustinyAhin
Copy link
Member Author

cc @kevin940726

@kevin940726
Copy link
Member

I think we might have a misunderstanding here. I didn't mean to rewrite testing utilities in Core, we should be able to continue using utilities from gutenberg, but rather to rewrite them in gutenberg and try to make them faster.

Take isThemeInstalled for example. You did a great job here re-implementing it using REST API for maximum performance. While the original code in gutenberg still requires several navigations (visitAdminPage or page.goto) and element selections (page.waitForSelector or page.$) to achieve the same thing.

I think we should instead re-implement it using the approach you do here in gutenberg. However, that would also mean that we'll be losing the coverage of that in our tests. The solution is to add back those here in Core instead, but we don't need to make it a utility, just a simple test.

Basically, swap the code in gutenberg with Core's 😅 . Does it make sense to you? I'll c.c. @tellthemachines for better explanations or other feedbacks 😆 .

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.

2 participants