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

Search Within Facet Test #24

Open
adriamurphy opened this issue May 16, 2022 · 0 comments
Open

Search Within Facet Test #24

adriamurphy opened this issue May 16, 2022 · 0 comments

Comments

@adriamurphy
Copy link

The "search within" facet test doesn't check if a facet is collapsed before running the test. If the input is inside the collapsed element, this makes the test fail. The "search within" input won't always be inside a collapsed element, but I think to avoid conflicts, we should toggle the facet open before testing the input. In my own code, I did this right after line 312 here: https://github.com/searchspring/snapfu-template-preact/blob/production/tests/cypress/integration/results.spec.js#L312.

Might be a better way to do this, but seemed to work well for me.

// toggle open facet for search within
if (store.facets[obj.index] && store.facets[obj.index].collapsed) {
	store.facets[obj.index].toggleCollapse();
}
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

No branches or pull requests

1 participant