-
Notifications
You must be signed in to change notification settings - Fork 3.4k
feat: use fuzzy search #18966
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
feat: use fuzzy search #18966
Conversation
Thanks for taking the time to open a PR!
|
Test summaryRun details
View run in Cypress Dashboard ➡️ Flakiness
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const search = ref('') | ||
const specs = computed(() => { | ||
const specs: ComputedRef<FuzzyFoundSpec[]> = computed(() => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We can just do
const specs = computed<FuzzyFoundSpec[]>(() => {
if (!search.value) { | ||
return props.gql.specs?.edges || [] | ||
return specs.map((spec) => ({ ...spec, indexes: [] as number[] })) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We map over this one on line 59 than again on line 62, could we combine those to save a loop?
@lmiller1990 updated. Went with |
…e-data-clean-refactor * tgriesser/chore/e2e-data-clean: (76 commits) chore: post-merge cleanup feat: use hoisted yarn install in binary build (#17285) fix: fix spec list header, "Create specs" prompt, add workspace recommended apollo extension (#18993) feat(unify): reporter settings (#18946) feat: add devServer to config file (#18962) fix: compile npm packages for node 12 (#18989) fix: show call count even if `cy.stub().log(false)`. (#18907) chore: Update TypeScript to 4.4.4 (#18930) feat: use fuzzy search (#18966) fix: onUnmounted warning in topnav (#18988) fix: wrap playground selectors in double quotes if not included (#18442) fix: flaky settings_spec test (#18979) fix: CYPRESS_INTERNAL_VITE_DEV for development feat: Create default config file (#18943) feat(app): support editor preference (#18932) chore: Update Chrome (stable) to 96.0.4664.45 (#18931) fix: Loading of specs with % in the filename (#18877) feat: improve vite DX (#18937) chore: refactor `create` into class `$Cy` (#18715) feat: Use plugins on config files (#18798) ...
User facing changelog
Adds fuzzy search to spec lists in runner and home page. Also deletes the flat spec list due to it not having much utility and the search functionality being inconsistent across the tree view and flat view.
Additional details
Screen.Recording.2021-11-17.at.2.55.22.PM.mov
PR Tasks