Skip to content

Commit

Permalink
Fix tests to fuzzy=auto
Browse files Browse the repository at this point in the history
  • Loading branch information
vhaalmeida committed Jun 10, 2022
1 parent 0fd7322 commit 31bcd45
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 25 deletions.
18 changes: 9 additions & 9 deletions packages/api/mocks/AllProductsQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down Expand Up @@ -812,44 +812,44 @@ export const productSearchPage1Count5Fetch = {
correction: {
misspelled: true,
},
fuzzy: '0',
fuzzy: 'auto',
operator: 'and',
translated: false,
pagination: {
count: 50,
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,
Expand All @@ -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',
},
},
},
Expand Down
6 changes: 3 additions & 3 deletions packages/api/mocks/ProductQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down Expand Up @@ -226,15 +226,15 @@ export const productSearchFetch = {
correction: {
misspelled: true,
},
fuzzy: '0',
fuzzy: 'auto',
operator: 'and',
translated: false,
pagination: {
count: 1,
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: [],
Expand Down
20 changes: 10 additions & 10 deletions packages/api/mocks/SearchQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down Expand Up @@ -1327,44 +1327,44 @@ export const productSearchCategory1Fetch = {
correction: {
misspelled: true,
},
fuzzy: '0',
fuzzy: 'auto',
operator: 'and',
translated: false,
pagination: {
count: 50,
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,
Expand All @@ -1375,15 +1375,15 @@ 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',
},
},
},
}

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: [
Expand Down
6 changes: 3 additions & 3 deletions packages/api/mocks/ValidateCartMutation.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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: [
Expand Down Expand Up @@ -529,15 +529,15 @@ export const productSearchPage1Count1Fetch = {
correction: {
misspelled: true,
},
fuzzy: '0',
fuzzy: 'auto',
operator: 'and',
translated: false,
pagination: {
count: 1,
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: [],
Expand Down

0 comments on commit 31bcd45

Please sign in to comment.