Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
icazevedo committed Dec 5, 2023
1 parent c8ae8af commit b6b71ad
Show file tree
Hide file tree
Showing 6 changed files with 353 additions and 346 deletions.
6 changes: 3 additions & 3 deletions packages/api/mocks/AllProductsQuery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ export const productSearchPage1Count5Fetch = {
{
cacheId: 'sp-99995946',
productId: '99995946',
description: '4k Philips Monitor 27"',
productName: '4k Philips Monitor 27"',
description: '4k Philips Monitor 27\"',
productName: '4k Philips Monitor 27\"',
linkText: '4k-philips-monitor',
brand: 'adidas',
brandId: 2000004,
Expand Down Expand Up @@ -202,7 +202,7 @@ export const productSearchPage1Count5Fetch = {
],
itemId: '99988213',
name: 'Monitor 27',
nameComplete: '4k Philips Monitor 27 Monitor 27',
nameComplete: '4k Philips Monitor 27\" Monitor 27',
complementName: '',
referenceId: [
{
Expand Down
2 changes: 1 addition & 1 deletion packages/api/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,4 +46,4 @@ export const getSchema = async (options: Options) => {
}

export * from './platforms/vtex/resolvers/root'
export { Resolver } from './platforms/vtex'
export type { Resolver } from './platforms/vtex'
36 changes: 18 additions & 18 deletions packages/api/test/__snapshots__/mutations.test.ts.snap
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`\`validateCart\` mutation should return new cart when etag is stale 1`] = `
Object {
"data": Object {
"validateCart": Object {
"messages": Array [],
"order": Object {
"acceptedOffer": Array [
Object {
{
"data": {
"validateCart": {
"messages": [],
"order": {
"acceptedOffer": [
{
"availability": "https://schema.org/InStock",
"itemCondition": "https://schema.org/NewCondition",
"itemOffered": Object {
"itemOffered": {
"name": "plum",
},
"listPrice": 557.57,
"price": 349.12,
"priceCurrency": "USD",
"quantity": 2,
"seller": Object {
"seller": {
"identifier": "1",
},
"sellingPrice": 349.12,
Expand All @@ -31,23 +31,23 @@ Object {
`;

exports[`\`validateCart\` mutation should return the full order when an invalid cart is passed 1`] = `
Object {
"data": Object {
"validateCart": Object {
"messages": Array [],
"order": Object {
"acceptedOffer": Array [
Object {
{
"data": {
"validateCart": {
"messages": [],
"order": {
"acceptedOffer": [
{
"availability": "https://schema.org/InStock",
"itemCondition": "https://schema.org/NewCondition",
"itemOffered": Object {
"itemOffered": {
"name": "plum",
},
"listPrice": 557.57,
"price": 349.12,
"priceCurrency": "USD",
"quantity": 2,
"seller": Object {
"seller": {
"identifier": "1",
},
"sellingPrice": 349.12,
Expand Down
Loading

0 comments on commit b6b71ad

Please sign in to comment.