Skip to content

Commit

Permalink
fix(fe:FSADT1-1569): do not remove duplicate spaces in the middle of …
Browse files Browse the repository at this point in the history
…the search terms (#1296)

fix: do not remove duplicate spaces in the middle of the string

Co-authored-by: Maria Martinez <[email protected]>
  • Loading branch information
fterra-encora and mamartinezmejia authored Nov 6, 2024
1 parent 3ee985f commit 63e0fde
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/cypress/e2e/pages/SearchPage.cy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ describe("Search Page", () => {

describe("when user fills in the search box with extra spaces", () => {
beforeEach(() => {
cy.fillFormEntry("#search-box", " hello world ", { skipBlur: true });
cy.fillFormEntry("#search-box", " hello world ", { skipBlur: true });
});

it("trims the entered string before making the API call", () => {
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/pages/SearchPage.vue
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const pageSize = ref(10);
const rawSearchKeyword = ref("");
const searchKeyword = computed(() => rawSearchKeyword.value.trim().replaceAll(/ +/g, " "));
const searchKeyword = computed(() => rawSearchKeyword.value.trim());
const lastSearchKeyword = ref("");
// empty is valid
Expand Down

0 comments on commit 63e0fde

Please sign in to comment.