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

Facet by Meta Range E2E tests #3365

Merged
merged 7 commits into from
Mar 7, 2023
Merged

Facet by Meta Range E2E tests #3365

merged 7 commits into from
Mar 7, 2023

Conversation

JakePT
Copy link
Contributor

@JakePT JakePT commented Mar 3, 2023

Description of the Change

Adds E2E tests for the Facet by Meta Range block.

Closes #3357

How to test the Change

Tests should pass in Cypress and on GitHub.

Changelog Entry

N/A

Credits

Props @JakePT

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@JakePT JakePT changed the title WIP: Facet by Meta Range E2E tests Facet by Meta Range E2E tests Mar 6, 2023
@JakePT JakePT added this to the 4.5.0 milestone Mar 6, 2023
@JakePT JakePT marked this pull request as ready for review March 6, 2023 04:19
@JakePT JakePT requested a review from felipeelia March 6, 2023 04:19
Comment on lines +62 to +73
/**
* Ignore ResizeObserver error.
*
* @see {@link https://stackoverflow.com/questions/49384120/resizeobserver-loop-limit-exceeded}
*/
Cypress.on('uncaught:exception', (err) => {
if (err.message?.includes('ResizeObserver loop limit exceeded')) {
return false;
}

return err;
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@felipeelia I was running into this issue, which is described at the link. It was happening in the test before the block was even inserted, but the library used by the block does appear to use ResizeObserver, so it might be related. The problem is that it's in the library so I can't do anything about it, however the various answers at that link seem to suggest that ignoring the issue is safe. I'd be curious to hear your thoughts though.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, we are already using this solution for Instant Results: https://github.com/10up/ElasticPress/blob/develop/tests/cypress/integration/features/instant-results.cy.js#L241

I wonder if we should merge those two in a more generic function or something. Thoughts?

@felipeelia felipeelia merged commit b33adc5 into develop Mar 7, 2023
@felipeelia felipeelia deleted the feature/3357 branch March 7, 2023 15:01
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.

Add E2E tests for the Facet by Meta Range block
2 participants