From 31bcd455a4f69d15fc8eb47047ca6df5fc8ab8b5 Mon Sep 17 00:00:00 2001 From: Victor Almeida Date: Fri, 10 Jun 2022 11:39:07 -0300 Subject: [PATCH] Fix tests to fuzzy=auto --- packages/api/mocks/AllProductsQuery.ts | 18 +++++++++--------- packages/api/mocks/ProductQuery.ts | 6 +++--- packages/api/mocks/SearchQuery.ts | 20 ++++++++++---------- packages/api/mocks/ValidateCartMutation.ts | 6 +++--- 4 files changed, 25 insertions(+), 25 deletions(-) diff --git a/packages/api/mocks/AllProductsQuery.ts b/packages/api/mocks/AllProductsQuery.ts index a34dbddc28..08d58bf3a4 100644 --- a/packages/api/mocks/AllProductsQuery.ts +++ b/packages/api/mocks/AllProductsQuery.ts @@ -73,7 +73,7 @@ export const AllProductsQueryFirst5 = `query AllProducts { export const productSearchPage1Count5Fetch = { info: - 'https://storeframework.vtexcommercestable.com.br/api/io/_v/api/intelligent-search/product_search/trade-policy/1?page=1&count=5&query=&sort=&fuzzy=0&locale=en-US&hideUnavailableItems=false', + 'https://storeframework.vtexcommercestable.com.br/api/io/_v/api/intelligent-search/product_search/trade-policy/1?page=1&count=5&query=&sort=&fuzzy=auto&locale=en-US&hideUnavailableItems=false', init: undefined, result: { products: [ @@ -812,7 +812,7 @@ export const productSearchPage1Count5Fetch = { correction: { misspelled: true, }, - fuzzy: '0', + fuzzy: 'auto', operator: 'and', translated: false, pagination: { @@ -820,36 +820,36 @@ export const productSearchPage1Count5Fetch = { current: { index: 1, proxyUrl: - 'search/trade-policy/1?page=1&count=5&query=&sort=&fuzzy=0&operator=and', + 'search/trade-policy/1?page=1&count=5&query=&sort=&fuzzy=auto&operator=and', }, before: [], after: [ { index: 2, proxyUrl: - 'search/trade-policy/1?page=2&count=5&query=&sort=&fuzzy=0&operator=and', + 'search/trade-policy/1?page=2&count=5&query=&sort=&fuzzy=auto&operator=and', }, { index: 3, proxyUrl: - 'search/trade-policy/1?page=3&count=5&query=&sort=&fuzzy=0&operator=and', + 'search/trade-policy/1?page=3&count=5&query=&sort=&fuzzy=auto&operator=and', }, { index: 4, proxyUrl: - 'search/trade-policy/1?page=4&count=5&query=&sort=&fuzzy=0&operator=and', + 'search/trade-policy/1?page=4&count=5&query=&sort=&fuzzy=auto&operator=and', }, { index: 5, proxyUrl: - 'search/trade-policy/1?page=5&count=5&query=&sort=&fuzzy=0&operator=and', + 'search/trade-policy/1?page=5&count=5&query=&sort=&fuzzy=auto&operator=and', }, ], perPage: 5, next: { index: 2, proxyUrl: - 'search/trade-policy/1?page=2&count=5&query=&sort=&fuzzy=0&operator=and', + 'search/trade-policy/1?page=2&count=5&query=&sort=&fuzzy=auto&operator=and', }, previous: { index: 0, @@ -860,7 +860,7 @@ export const productSearchPage1Count5Fetch = { last: { index: 50, proxyUrl: - 'search/trade-policy/1?page=50&count=5&query=&sort=&fuzzy=0&operator=and', + 'search/trade-policy/1?page=50&count=5&query=&sort=&fuzzy=auto&operator=and', }, }, }, diff --git a/packages/api/mocks/ProductQuery.ts b/packages/api/mocks/ProductQuery.ts index f20a2480da..c9100b97ba 100644 --- a/packages/api/mocks/ProductQuery.ts +++ b/packages/api/mocks/ProductQuery.ts @@ -62,7 +62,7 @@ export const ProductByIdQuery = `query ProductQuery { export const productSearchFetch = { info: - 'https://storeframework.vtexcommercestable.com.br/api/io/_v/api/intelligent-search/product_search/trade-policy/1?page=1&count=1&query=sku%3A64953394&sort=&fuzzy=0&locale=en-US&hideUnavailableItems=false', + 'https://storeframework.vtexcommercestable.com.br/api/io/_v/api/intelligent-search/product_search/trade-policy/1?page=1&count=1&query=sku%3A64953394&sort=&fuzzy=auto&locale=en-US&hideUnavailableItems=false', init: undefined, result: { products: [ @@ -226,7 +226,7 @@ export const productSearchFetch = { correction: { misspelled: true, }, - fuzzy: '0', + fuzzy: 'auto', operator: 'and', translated: false, pagination: { @@ -234,7 +234,7 @@ export const productSearchFetch = { current: { index: 1, proxyUrl: - 'search/trade-policy/1?page=1&count=1&query=sku:64953394&sort=&fuzzy=0&operator=and', + 'search/trade-policy/1?page=1&count=1&query=sku:64953394&sort=&fuzzy=auto&operator=and', }, before: [], after: [], diff --git a/packages/api/mocks/SearchQuery.ts b/packages/api/mocks/SearchQuery.ts index 558dd26e9a..9e2c18b19e 100644 --- a/packages/api/mocks/SearchQuery.ts +++ b/packages/api/mocks/SearchQuery.ts @@ -100,7 +100,7 @@ export const SearchQueryFirst5Products = `query SearchQuery { export const productSearchCategory1Fetch = { info: - 'https://storeframework.vtexcommercestable.com.br/api/io/_v/api/intelligent-search/product_search/category-1/office/trade-policy/1?page=1&count=5&query=&sort=&fuzzy=0&locale=en-US&hideUnavailableItems=false', + 'https://storeframework.vtexcommercestable.com.br/api/io/_v/api/intelligent-search/product_search/category-1/office/trade-policy/1?page=1&count=5&query=&sort=&fuzzy=auto&locale=en-US&hideUnavailableItems=false', init: undefined, result: { products: [ @@ -1327,7 +1327,7 @@ export const productSearchCategory1Fetch = { correction: { misspelled: true, }, - fuzzy: '0', + fuzzy: 'auto', operator: 'and', translated: false, pagination: { @@ -1335,36 +1335,36 @@ export const productSearchCategory1Fetch = { current: { index: 1, proxyUrl: - 'search/category-1/office/trade-policy/1?page=1&count=5&query=&sort=&fuzzy=0&operator=and', + 'search/category-1/office/trade-policy/1?page=1&count=5&query=&sort=&fuzzy=auto&operator=and', }, before: [], after: [ { index: 2, proxyUrl: - 'search/category-1/office/trade-policy/1?page=2&count=5&query=&sort=&fuzzy=0&operator=and', + 'search/category-1/office/trade-policy/1?page=2&count=5&query=&sort=&fuzzy=auto&operator=and', }, { index: 3, proxyUrl: - 'search/category-1/office/trade-policy/1?page=3&count=5&query=&sort=&fuzzy=0&operator=and', + 'search/category-1/office/trade-policy/1?page=3&count=5&query=&sort=&fuzzy=auto&operator=and', }, { index: 4, proxyUrl: - 'search/category-1/office/trade-policy/1?page=4&count=5&query=&sort=&fuzzy=0&operator=and', + 'search/category-1/office/trade-policy/1?page=4&count=5&query=&sort=&fuzzy=auto&operator=and', }, { index: 5, proxyUrl: - 'search/category-1/office/trade-policy/1?page=5&count=5&query=&sort=&fuzzy=0&operator=and', + 'search/category-1/office/trade-policy/1?page=5&count=5&query=&sort=&fuzzy=auto&operator=and', }, ], perPage: 5, next: { index: 2, proxyUrl: - 'search/category-1/office/trade-policy/1?page=2&count=5&query=&sort=&fuzzy=0&operator=and', + 'search/category-1/office/trade-policy/1?page=2&count=5&query=&sort=&fuzzy=auto&operator=and', }, previous: { index: 0, @@ -1375,7 +1375,7 @@ export const productSearchCategory1Fetch = { last: { index: 50, proxyUrl: - 'search/category-1/office/trade-policy/1?page=50&count=5&query=&sort=&fuzzy=0&operator=and', + 'search/category-1/office/trade-policy/1?page=50&count=5&query=&sort=&fuzzy=auto&operator=and', }, }, }, @@ -1383,7 +1383,7 @@ export const productSearchCategory1Fetch = { export const attributeSearchCategory1Fetch = { info: - 'https://storeframework.vtexcommercestable.com.br/api/io/_v/api/intelligent-search/facets/category-1/office/trade-policy/1?page=1&count=5&query=&sort=&fuzzy=0&locale=en-US&hideUnavailableItems=false', + 'https://storeframework.vtexcommercestable.com.br/api/io/_v/api/intelligent-search/facets/category-1/office/trade-policy/1?page=1&count=5&query=&sort=&fuzzy=auto&locale=en-US&hideUnavailableItems=false', init: undefined, result: { facets: [ diff --git a/packages/api/mocks/ValidateCartMutation.ts b/packages/api/mocks/ValidateCartMutation.ts index 0938cd052d..c095295315 100644 --- a/packages/api/mocks/ValidateCartMutation.ts +++ b/packages/api/mocks/ValidateCartMutation.ts @@ -362,7 +362,7 @@ export const checkoutOrderFormCustomDataInvalidFetch = { export const productSearchPage1Count1Fetch = { info: - 'https://storeframework.vtexcommercestable.com.br/api/io/_v/api/intelligent-search/product_search/trade-policy/1?page=1&count=1&query=sku%3A2737806&sort=&fuzzy=0&locale=en-US&hideUnavailableItems=false', + 'https://storeframework.vtexcommercestable.com.br/api/io/_v/api/intelligent-search/product_search/trade-policy/1?page=1&count=1&query=sku%3A2737806&sort=&fuzzy=auto&locale=en-US&hideUnavailableItems=false', init: undefined, result: { products: [ @@ -529,7 +529,7 @@ export const productSearchPage1Count1Fetch = { correction: { misspelled: true, }, - fuzzy: '0', + fuzzy: 'auto', operator: 'and', translated: false, pagination: { @@ -537,7 +537,7 @@ export const productSearchPage1Count1Fetch = { current: { index: 1, proxyUrl: - 'search/trade-policy/1?page=1&count=1&query=sku:2737806&sort=&fuzzy=0&operator=and', + 'search/trade-policy/1?page=1&count=1&query=sku:2737806&sort=&fuzzy=auto&operator=and', }, before: [], after: [],