@faststore/core 2.1.95 → 2.1.98

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/.next/BUILD_ID +1 -1
  2. package/.next/build-manifest.json +45 -45
  3. package/.next/cache/.tsbuildinfo +1 -1
  4. package/.next/cache/eslint/.cache_abdhua +1 -0
  5. package/.next/cache/next-server.js.nft.json +1 -1
  6. package/.next/cache/webpack/client-production/0.pack +0 -0
  7. package/.next/cache/webpack/client-production/index.pack +0 -0
  8. package/.next/cache/webpack/client-production/index.pack.old +0 -0
  9. package/.next/cache/webpack/server-production/0.pack +0 -0
  10. package/.next/cache/webpack/server-production/index.pack +0 -0
  11. package/.next/cache/webpack/server-production/index.pack.old +0 -0
  12. package/.next/next-server.js.nft.json +1 -1
  13. package/.next/prerender-manifest.json +1 -1
  14. package/.next/react-loadable-manifest.json +3 -3
  15. package/.next/required-server-files.json +1 -1
  16. package/.next/routes-manifest.json +1 -1
  17. package/.next/server/chunks/183.js +1 -0
  18. package/.next/server/chunks/350.js +2 -1
  19. package/.next/server/chunks/530.js +58 -36
  20. package/.next/server/chunks/576.js +1 -0
  21. package/.next/server/middleware-build-manifest.js +1 -1
  22. package/.next/server/middleware-react-loadable-manifest.js +1 -1
  23. package/.next/server/pages/404.js.nft.json +1 -1
  24. package/.next/server/pages/500.js.nft.json +1 -1
  25. package/.next/server/pages/[...slug].js.nft.json +1 -1
  26. package/.next/server/pages/[slug]/p.js.nft.json +1 -1
  27. package/.next/server/pages/_app.js.nft.json +1 -1
  28. package/.next/server/pages/_document.js.nft.json +1 -1
  29. package/.next/server/pages/_error.js.nft.json +1 -1
  30. package/.next/server/pages/account.js.nft.json +1 -1
  31. package/.next/server/pages/api/graphql.js +7 -1
  32. package/.next/server/pages/checkout.js.nft.json +1 -1
  33. package/.next/server/pages/en-US/404.html +2 -2
  34. package/.next/server/pages/en-US/500.html +2 -2
  35. package/.next/server/pages/en-US/account.html +2 -2
  36. package/.next/server/pages/en-US/checkout.html +2 -2
  37. package/.next/server/pages/en-US/login.html +2 -2
  38. package/.next/server/pages/en-US/s.html +2 -2
  39. package/.next/server/pages/en-US.html +2 -2
  40. package/.next/server/pages/index.js.nft.json +1 -1
  41. package/.next/server/pages/login.js.nft.json +1 -1
  42. package/.next/server/pages/s.js.nft.json +1 -1
  43. package/.next/server/pages-manifest.json +7 -7
  44. package/.next/static/6S44gOq9FRmyEQybDi2Yj/_buildManifest.js +1 -0
  45. package/.next/static/chunks/148.582eaa81293ee470.js +1 -0
  46. package/.next/static/chunks/238-c6f8d07b669a1ec2.js +1 -0
  47. package/.next/static/chunks/243-fcf2a6c4691476a2.js +1 -0
  48. package/.next/static/chunks/{530.848b014622932b93.js → 530.2650771daa532c02.js} +1 -1
  49. package/.next/static/chunks/548-19272804c3f0ff0d.js +1 -0
  50. package/.next/static/chunks/603-7b26158c40b8a3e5.js +1 -0
  51. package/.next/static/chunks/{738-67a288ca3569cdbb.js → 738-a5ff304828f20cbf.js} +1 -1
  52. package/.next/static/chunks/988.afda042dd9ba11d1.js +1 -0
  53. package/.next/static/chunks/pages/[slug]/p-78699b0be521b30b.js +1 -0
  54. package/.next/static/chunks/pages/{_app-6d0e6ab9a4dd8106.js → _app-40cff0982559d0b8.js} +1 -1
  55. package/.next/static/chunks/pages/s-0935734d9ac3acb8.js +1 -0
  56. package/.next/static/chunks/{webpack-6580be4a27ecdd75.js → webpack-34aa83cb25f3f792.js} +1 -1
  57. package/.next/static/css/d5a515091be5db82.css +1 -0
  58. package/.next/trace +80 -80
  59. package/.turbo/turbo-build.log +4 -10
  60. package/README.md +3 -3
  61. package/cypress/global.js +8 -0
  62. package/cypress/integration/a11y.test.js +7 -24
  63. package/cypress/integration/analytics.test.js +78 -87
  64. package/cypress/integration/cart.test.js +4 -4
  65. package/cypress/integration/plp.test.js +6 -6
  66. package/cypress/integration/search.test.js +1 -1
  67. package/cypress/integration/seo.test.js +14 -14
  68. package/cypress.config.ts +19 -0
  69. package/faststore.config.js +1 -0
  70. package/package.json +9 -9
  71. package/src/components/cart/CartSidebar/CartSidebar.tsx +41 -27
  72. package/src/pages/api/graphql.ts +4 -0
  73. package/src/server/index.ts +5 -2
  74. package/.next/cache/config.json +0 -7
  75. package/.next/cache/eslint/.cache_1gneedd +0 -1
  76. package/.next/static/chunks/148.3bb7e05cc5d1c1c4.js +0 -1
  77. package/.next/static/chunks/238-2ad31f382e7c6f14.js +0 -1
  78. package/.next/static/chunks/243-8c394e91ccf75fdb.js +0 -1
  79. package/.next/static/chunks/548-ab84e9e8b49413ab.js +0 -1
  80. package/.next/static/chunks/603-be78b9dfb8fa6c49.js +0 -1
  81. package/.next/static/chunks/988.d10040040cdfebbb.js +0 -1
  82. package/.next/static/chunks/pages/[slug]/p-3383e9b97bffafdd.js +0 -1
  83. package/.next/static/chunks/pages/s-1f885639c2605ace.js +0 -1
  84. package/.next/static/css/373ae96b742c3694.css +0 -1
  85. package/.next/static/ziUh67NXJKKH4lkHTrbrJ/_buildManifest.js +0 -1
  86. package/.turbo/turbo-lint.log +0 -2
  87. package/cypress.json +0 -9
  88. /package/.next/static/{ziUh67NXJKKH4lkHTrbrJ → 6S44gOq9FRmyEQybDi2Yj}/_ssgManifest.js +0 -0
@@ -1,16 +1,10 @@
1
1
  $ yarn partytown && next build
2
2
  $ partytown copylib ./public/~partytown
3
- Partytown lib copied to: /home/runner/work/faststore/faststore/packages/core/public/~partytown
4
- warn - No build cache found. Please configure build caching for faster rebuilds. Read more: https://nextjs.org/docs/messages/no-cache
5
- Attention: Next.js now collects completely anonymous telemetry regarding usage.
6
- This information is used to shape Next.js' roadmap and prioritize features.
7
- You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
8
- https://nextjs.org/telemetry
9
-
3
+ Partytown lib copied to: /Users/emersonlaurentino/develop/vtex/faststore/packages/core/public/~partytown
10
4
  info - Linting and checking validity of types...
11
5
  info - Creating an optimized production build...
12
6
  info - Disabled SWC as replacement for Babel because of custom Babel configuration ".babelrc" https://nextjs.org/docs/messages/swc-disabled
13
- info - Using external babel configuration from /home/runner/work/faststore/faststore/packages/core/.babelrc
7
+ info - Using external babel configuration from /Users/emersonlaurentino/develop/vtex/faststore/packages/core/.babelrc
14
8
  info - Compiled successfully
15
9
  info - Collecting page data...
16
10
  info - Generating static pages (0/7)
@@ -40,8 +34,8 @@ Route (pages) Size First Load JS
40
34
  + First Load JS shared by all 81 kB
41
35
  ├ chunks/framework-dfd14d7ce6600b03.js 45.3 kB
42
36
  ├ chunks/main-fd466221927468fd.js 23.9 kB
43
- ├ chunks/pages/_app-6d0e6ab9a4dd8106.js 6.45 kB
44
- ├ chunks/webpack-6580be4a27ecdd75.js 2.29 kB
37
+ ├ chunks/pages/_app-40cff0982559d0b8.js 6.46 kB
38
+ ├ chunks/webpack-34aa83cb25f3f792.js 2.29 kB
45
39
  └ css/9e76fef1c9ca89af.css 3.06 kB
46
40
 
47
41
  λ (Server) server-side renders at runtime (uses getInitialProps or getServerSideProps)
package/README.md CHANGED
@@ -100,7 +100,7 @@ A quick look at the top-level files and directories you'll see in a NextJS proje
100
100
  ├── __generated__
101
101
  ├── babel.config.js
102
102
  ├── cypress
103
- ├── cypress.json
103
+ ├── cypress.config.ts
104
104
  ├── lighthouserc.js
105
105
  ├── public
106
106
  ├── pull_request_template.md
@@ -136,7 +136,7 @@ A quick look at the top-level files and directories you'll see in a NextJS proje
136
136
 
137
137
  15. **`cypress`**: End to End(e2e) tests using Cypress. Most of the scenarios are covered here. Add your custom flows to avoid regressions
138
138
 
139
- 16. **`cypress.json`**: [Cypress configuration file](https://docs.cypress.io/guides/references/configuration)
139
+ 16. **`cypress.config.ts`**: [Cypress configuration file](https://docs.cypress.io/guides/references/configuration)
140
140
 
141
141
  17. **`lighthouserc.js`**: Configures [Google Lighthouse CI](https://github.com/GoogleChrome/lighthouse-ci). This is where you can turn on/off lighthouse assertions to be used by Lighthouse CI Bot/hook
142
142
 
@@ -412,7 +412,7 @@ Looking for more guidance? Full documentation for FastStore lives [on this GitHu
412
412
 
413
413
  ## ⚡ Performance & QA
414
414
 
415
- This project has strict performance budgets. Right out of the box, this project performs around 95 on Google's Page Speed Insights website, which usually is way more strict than your laptop's chrome lighthouse. Every time you commit to the repository, our QA bots will run and evaluate your code quality. We recommend you NEVER put in production a code that breaks any of the bots. If a bot breaks and still you need to put the code into production, change the bot config (`lighthouserc.js`, `cypress.json`) to make it pass and merge. This way you ensure your website will keep performing well during the years to come.
415
+ This project has strict performance budgets. Right out of the box, this project performs around 95 on Google's Page Speed Insights website, which usually is way more strict than your laptop's chrome lighthouse. Every time you commit to the repository, our QA bots will run and evaluate your code quality. We recommend you NEVER put in production a code that breaks any of the bots. If a bot breaks and still you need to put the code into production, change the bot config (`lighthouserc.js`, `cypress.config.ts`) to make it pass and merge. This way you ensure your website will keep performing well during the years to come.
416
416
 
417
417
  ## Adding third party scripts
418
418
 
package/cypress/global.js CHANGED
@@ -13,3 +13,11 @@ export const options = {
13
13
  }
14
14
  },
15
15
  }
16
+
17
+ // TODO: Bring back these rules when the components with missing/wrong role is found.
18
+ export const disabledA11yRules = {
19
+ rules: {
20
+ region: { enabled: false },
21
+ 'aria-allowed-role': { enabled: false },
22
+ },
23
+ }
@@ -4,6 +4,7 @@
4
4
  * Cypress tests for a11y (accessibility)
5
5
  */
6
6
 
7
+ import { disabledA11yRules } from '../global'
7
8
  import { cypress } from '../../faststore.config'
8
9
 
9
10
  const { pages } = cypress
@@ -13,7 +14,7 @@ describe('Accessibility tests', () => {
13
14
  cy.clearIDB()
14
15
  })
15
16
 
16
- it.skip('checks a11y for collection page', () => {
17
+ it('checks a11y for collection page', () => {
17
18
  cy.visit(pages.collection)
18
19
  cy.waitForHydration()
19
20
 
@@ -21,16 +22,10 @@ describe('Accessibility tests', () => {
21
22
  cy.getById('product-link').should('exist')
22
23
 
23
24
  cy.injectAxe()
24
-
25
- // TODO: Bring back the `aria-allowed-role` when the component with the missing/wrong role is found.
26
- cy.checkA11y(null, {
27
- rules: {
28
- 'aria-allowed-role': { enabled: false },
29
- },
30
- })
25
+ cy.checkA11y(null, disabledA11yRules)
31
26
  })
32
27
 
33
- it.skip('checks a11y for product page', () => {
28
+ it('checks a11y for product page', () => {
34
29
  cy.visit(pages.pdp)
35
30
  cy.waitForHydration()
36
31
 
@@ -38,26 +33,14 @@ describe('Accessibility tests', () => {
38
33
  cy.getById('buy-button').should('exist')
39
34
 
40
35
  cy.injectAxe()
41
-
42
- // TODO: Bring back the `aria-allowed-role` when the component with the missing/wrong role is found.
43
- cy.checkA11y(null, {
44
- rules: {
45
- 'aria-allowed-role': { enabled: false },
46
- },
47
- })
36
+ cy.checkA11y(null, disabledA11yRules)
48
37
  })
49
38
 
50
- it.skip('checks a11y for home page', () => {
39
+ it('checks a11y for home page', () => {
51
40
  cy.visit(pages.home)
52
41
  cy.waitForHydration()
53
42
 
54
43
  cy.injectAxe()
55
-
56
- // TODO: Bring back the `aria-allowed-role` when the component with the missing/wrong role is found.
57
- cy.checkA11y(null, {
58
- rules: {
59
- 'aria-allowed-role': { enabled: false },
60
- },
61
- })
44
+ cy.checkA11y(null, disabledA11yRules)
62
45
  })
63
46
  })
@@ -65,68 +65,60 @@ describe('add_to_cart event', () => {
65
65
  }
66
66
 
67
67
  context('when adding a product to the cart', () => {
68
- it.skip('adds add_to_cart event in the data layer at product description page', () => {
68
+ it('adds add_to_cart event in the data layer at product description page', () => {
69
69
  cy.visit(pages.pdp, options)
70
70
  cy.waitForHydration()
71
71
 
72
72
  cy.itemsInCart(0)
73
73
 
74
74
  // Add to cart
75
- cy.getById('buy-button')
76
- .should('be.visible')
77
- .scrollIntoView({ duration: 500 })
78
- .then(() => {
79
- cy.getById('buy-button')
80
- .click({ force: true })
81
- .then(($btn) => {
82
- cy.itemsInCart(1)
83
- const skuId = $btn.attr('data-sku')
84
-
85
- testAddToCartEvent({ skuId, numberOfEvents: 1 })
86
- })
75
+ cy.getById('buy-button').as('buy-button')
76
+ cy.get('@buy-button').contains('Add to Cart').and('be.visible')
77
+ cy.get('@buy-button')
78
+ .trigger('click', { force: true, cancelable: false })
79
+ .then(($btn) => {
80
+ cy.itemsInCart(1)
81
+
82
+ const skuId = $btn.attr('data-sku')
83
+ testAddToCartEvent({ skuId, numberOfEvents: 1 })
87
84
  })
88
85
  })
89
86
  })
90
87
 
91
88
  context('when increasing product quantity', () => {
92
- it.skip('adds add_to_cart event in the data layer at quantity increase in the minicart', () => {
89
+ it('adds add_to_cart event in the data layer at quantity increase in the minicart', () => {
93
90
  cy.visit(pages.pdp, options)
94
91
  cy.waitForHydration()
95
92
 
96
93
  cy.itemsInCart(0)
97
94
 
98
95
  // Add to cart
99
- cy.getById('buy-button')
100
- .should('be.visible')
101
- .scrollIntoView({ duration: 500 })
102
- .then(() => {
103
- cy.getById('buy-button')
104
- .click({ force: true })
105
- .then(($btn) => {
106
- cy.itemsInCart(1)
107
- const skuId = $btn.attr('data-sku')
96
+ cy.getById('buy-button').as('buy-button')
97
+ cy.get('@buy-button').contains('Add to Cart').and('be.visible')
98
+ cy.get('@buy-button')
99
+ .trigger('click', { force: true, cancelable: false })
100
+ .then(($btn) => {
101
+ cy.itemsInCart(1)
102
+ const skuId = $btn.attr('data-sku')
103
+
104
+ testAddToCartEvent({ skuId, numberOfEvents: 1 })
105
+ })
108
106
 
109
- testAddToCartEvent({ skuId, numberOfEvents: 1 })
107
+ cy.get(
108
+ '[data-testid=fs-cart-item] [data-testid=fs-quantity-selector-right-button]'
109
+ ).trigger('click', { force: true, cancelable: false })
110
110
 
111
- cy.get(
112
- '[data-testid=fs-cart-item] [data-testid=fs-quantity-selector-right-button]'
113
- )
114
- .click()
115
- .then(() => {
116
- cy.itemsInCart(2)
111
+ cy.get('@buy-button').then(($btn) => {
112
+ cy.itemsInCart(2)
113
+ const skuId = $btn.attr('data-sku')
117
114
 
118
- testAddToCartEvent({ skuId, numberOfEvents: 2 })
119
- })
120
- })
121
- })
115
+ testAddToCartEvent({ skuId, numberOfEvents: 2 })
116
+ })
122
117
  })
123
118
  })
124
119
  })
125
120
 
126
121
  describe('remove_from_cart event', () => {
127
- beforeEach(() => {
128
- cy.clearIDB()
129
- })
130
122
  const testRemoveFromCartEvent = ({ skuId, numberOfEvents, quantity }) => {
131
123
  cy.window().then((window) => {
132
124
  const { dataLayer } = window
@@ -152,46 +144,41 @@ describe('remove_from_cart event', () => {
152
144
  }
153
145
 
154
146
  context('when removing a product from cart', () => {
155
- it.skip('adds remove_from_cart event in the data layer', () => {
147
+ it('adds remove_from_cart event in the data layer', () => {
156
148
  cy.visit(pages.pdp, options)
157
149
  cy.waitForHydration()
158
150
 
159
151
  cy.itemsInCart(0)
160
152
 
161
153
  // Add item to cart
162
- cy.getById('buy-button')
163
- .should('be.visible')
164
- .scrollIntoView({ duration: 500 })
165
- .then(() => {
166
- cy.getById('buy-button')
167
- .click({ force: true })
168
- .then(() => {
169
- cy.itemsInCart(1)
170
- cy.getById('checkout-button')
171
- .should('be.visible')
172
- .should('be.enabled')
173
- cy.itemsInCart(1)
154
+ cy.getById('buy-button').as('buy-button')
155
+ cy.get('@buy-button').contains('Add to Cart').should('be.visible')
156
+ cy.get('@buy-button').trigger('click')
174
157
 
175
- // Remove the added item
176
- cy.getById('remove-from-cart-button')
177
- .click({ force: true })
178
- .then(($btn) => {
179
- cy.itemsInCart(0)
180
- const skuId = $btn.attr('data-sku')
158
+ cy.getById('fs-cart-sidebar').should('be.visible')
181
159
 
182
- testRemoveFromCartEvent({
183
- skuId,
184
- numberOfEvents: 1,
185
- quantity: 1,
186
- })
187
- })
188
- })
160
+ cy.itemsInCart(1)
161
+
162
+ // Remove the added item
163
+ cy.getById('remove-from-cart-button').as('remove-from-cart-button')
164
+ cy.get('@remove-from-cart-button')
165
+ .click({ force: true })
166
+ .then(($btn) => {
167
+ cy.itemsInCart(0)
168
+
169
+ const skuId = $btn.attr('data-sku')
170
+
171
+ testRemoveFromCartEvent({
172
+ skuId,
173
+ quantity: 1,
174
+ numberOfEvents: 1,
175
+ })
189
176
  })
190
177
  })
191
178
  })
192
179
 
193
180
  context('when decreasing product quantity', () => {
194
- it.skip('adds remove_from_cart event in the data layer at quantity decrease in the minicart', () => {
181
+ it('adds remove_from_cart event in the data layer at quantity decrease in the minicart', () => {
195
182
  cy.visit(pages.pdp, options)
196
183
  cy.waitForHydration()
197
184
 
@@ -238,7 +225,7 @@ describe('remove_from_cart event', () => {
238
225
  })
239
226
 
240
227
  describe('view_item event', () => {
241
- it.skip('add view_item event in data layer', () => {
228
+ it('add view_item event in data layer', () => {
242
229
  cy.visit(pages.collection, options)
243
230
  cy.waitForHydration()
244
231
 
@@ -253,7 +240,7 @@ describe('view_item event', () => {
253
240
  })
254
241
 
255
242
  describe('select_item event', () => {
256
- it.skip('select_item has the right properties', () => {
243
+ it('select_item has the right properties', () => {
257
244
  cy.visit(pages.collection, options)
258
245
  cy.waitForHydration()
259
246
 
@@ -284,7 +271,7 @@ describe('select_item event', () => {
284
271
  })
285
272
 
286
273
  describe('view_item_list event', () => {
287
- it.skip('is sent when viewing the PLP', () => {
274
+ it('is sent when viewing the PLP', () => {
288
275
  cy.visit(pages.collection, options)
289
276
  cy.waitForHydration()
290
277
 
@@ -306,7 +293,7 @@ describe('view_item_list event', () => {
306
293
  })
307
294
  })
308
295
 
309
- it.skip('is sent when viewing a products shelf', () => {
296
+ it('is sent when viewing a products shelf', () => {
310
297
  cy.visit(pages.home, options)
311
298
  cy.waitForHydration()
312
299
 
@@ -325,7 +312,7 @@ describe('view_item_list event', () => {
325
312
  })
326
313
  })
327
314
 
328
- it.skip('is sent when viewing a product tiles', () => {
315
+ it('is sent when viewing a product tiles', () => {
329
316
  cy.visit(pages.home, options)
330
317
  cy.waitForHydration()
331
318
 
@@ -346,7 +333,7 @@ describe('view_item_list event', () => {
346
333
  })
347
334
 
348
335
  describe('search event', () => {
349
- it.skip('raises search', () => {
336
+ it('raises search', () => {
350
337
  cy.visit(pages.home, options)
351
338
  cy.waitForHydration()
352
339
 
@@ -366,7 +353,7 @@ describe('search event', () => {
366
353
  })
367
354
 
368
355
  describe('view_cart event', () => {
369
- it.skip('is fired when the minicart is opened (without items)', () => {
356
+ it('is fired when the minicart is opened (without items)', () => {
370
357
  cy.visit(pages.pdp, options)
371
358
  cy.waitForHydration()
372
359
 
@@ -375,6 +362,8 @@ describe('view_cart event', () => {
375
362
 
376
363
  dataLayerHasEvent('view_cart')
377
364
 
365
+ cy.itemsInCart(0)
366
+
378
367
  cy.window().then((window) => {
379
368
  const event = window.dataLayer.find(
380
369
  ({ event: eventName }) => eventName === 'view_cart'
@@ -385,27 +374,29 @@ describe('view_cart event', () => {
385
374
  })
386
375
  })
387
376
 
388
- it.skip('is fired when the minicart is opened (with items)', () => {
377
+ it('is fired when the minicart is opened (with items)', () => {
389
378
  cy.visit(pages.pdp, options)
390
379
  cy.waitForHydration()
391
380
 
392
- cy.getById('buy-button')
393
- .should('be.visible')
394
- .scrollIntoView({ duration: 500 })
395
- .then(() => {
396
- cy.getById('buy-button').click({ force: true })
397
- cy.getById('fs-cart-sidebar').should('be.visible')
381
+ cy.itemsInCart(0)
398
382
 
399
- dataLayerHasEvent('view_cart')
383
+ cy.getById('buy-button').as('buy-button')
384
+ cy.get('@buy-button').contains('Add to Cart').should('be.visible')
385
+ cy.get('@buy-button').trigger('click', { force: true, cancelable: false })
400
386
 
401
- cy.window().then((window) => {
402
- const event = window.dataLayer.find(
403
- ({ event: eventName }) => eventName === 'view_cart'
404
- )
387
+ cy.getById('fs-cart-sidebar').should('be.visible')
405
388
 
406
- expect(event.ecommerce.value).to.equal(950)
407
- expect(event.ecommerce.items.length).to.equal(1)
408
- })
409
- })
389
+ dataLayerHasEvent('view_cart')
390
+
391
+ cy.itemsInCart(1)
392
+
393
+ cy.window().then((window) => {
394
+ const event = window.dataLayer.find(
395
+ ({ event: eventName }) => eventName === 'view_cart'
396
+ )
397
+
398
+ expect(event.ecommerce.value).to.equal(950)
399
+ expect(event.ecommerce.items.length).to.equal(1)
400
+ })
410
401
  })
411
402
  })
@@ -14,7 +14,7 @@ describe('Cart Sidebar', () => {
14
14
  cy.clearIDB()
15
15
  })
16
16
 
17
- it.skip('toggles cart sidebar', () => {
17
+ it('toggles cart sidebar', () => {
18
18
  cy.visit(pages.home, options)
19
19
  cy.waitForHydration()
20
20
 
@@ -25,7 +25,7 @@ describe('Cart Sidebar', () => {
25
25
  })
26
26
 
27
27
  context('when opening the cart sidebar', () => {
28
- it.skip('should not scroll the background page', () => {
28
+ it('should not scroll the background page', () => {
29
29
  cy.visit(pages.home, options)
30
30
  cy.waitForHydration()
31
31
 
@@ -49,7 +49,7 @@ describe('On product description pages', () => {
49
49
  })
50
50
 
51
51
  context('when adding a product to cart', () => {
52
- it.skip('successfully adds the product', () => {
52
+ it('successfully adds the product', () => {
53
53
  cy.visit(pages.pdp, options)
54
54
  cy.waitForHydration()
55
55
 
@@ -85,7 +85,7 @@ describe('On product description pages', () => {
85
85
  })
86
86
 
87
87
  context('when removing a product from cart', () => {
88
- it.skip('successfully removes the product', () => {
88
+ it('successfully removes the product', () => {
89
89
  cy.visit(pages.pdp, options)
90
90
  cy.waitForHydration()
91
91
 
@@ -14,7 +14,7 @@ describe('Search page Filters and Sorting options', () => {
14
14
  cy.clearIDB()
15
15
  })
16
16
 
17
- it.skip('Applies filters after click', () => {
17
+ it('Applies filters after click', () => {
18
18
  cy.visit(pages.collection, options)
19
19
  cy.waitForHydration()
20
20
 
@@ -56,7 +56,7 @@ describe('Search page Filters and Sorting options', () => {
56
56
  })
57
57
  })
58
58
 
59
- it.skip('Sort products by price_asc', () => {
59
+ it('Sort products by price_asc', () => {
60
60
  cy.visit(pages.collection_2, options)
61
61
  cy.waitForHydration()
62
62
 
@@ -81,7 +81,7 @@ describe('Search page Filters and Sorting options', () => {
81
81
  })
82
82
  })
83
83
 
84
- it.skip('Sort products by price_desc', () => {
84
+ it('Sort products by price_desc', () => {
85
85
  cy.visit(pages.collection_2, options)
86
86
  cy.waitForHydration()
87
87
  const priceId = '[data-fs-product-grid] [data-testid="price"]'
@@ -111,7 +111,7 @@ describe('Infinite Scroll pagination', () => {
111
111
  cy.clearIDB()
112
112
  })
113
113
 
114
- it.skip('Shows more products when requested', () => {
114
+ it('Shows more products when requested', () => {
115
115
  cy.visit(pages.collection, options)
116
116
  cy.waitForHydration()
117
117
 
@@ -138,7 +138,7 @@ describe('Infinite Scroll pagination', () => {
138
138
  })
139
139
  })
140
140
 
141
- it.skip('Sticks to last seen page on plp pagination', () => {
141
+ it('Sticks to last seen page on plp pagination', () => {
142
142
  cy.visit(pages.collection, options)
143
143
  cy.waitForHydration()
144
144
 
@@ -209,7 +209,7 @@ describe('Infinite Scroll pagination', () => {
209
209
  })
210
210
 
211
211
  // Tests: https://developers.google.com/search/blog/2014/02/infinite-scroll-search-friendly
212
- it.skip('Changes the page being viewed on scroll', () => {
212
+ it('Changes the page being viewed on scroll', () => {
213
213
  cy.visit(pages.collection, options)
214
214
  cy.waitForHydration()
215
215
 
@@ -15,7 +15,7 @@ describe('Search input', () => {
15
15
  })
16
16
 
17
17
  context('when search for generic term', () => {
18
- it.skip('opens the search page', () => {
18
+ it('opens the search page', () => {
19
19
  const term = 'shirt'
20
20
 
21
21
  cy.visit(pages.home, options)
@@ -16,7 +16,7 @@ describe('Home Page Seo', () => {
16
16
  cy.clearIDB()
17
17
  })
18
18
 
19
- it.skip('has meta/canonical/link tags', () => {
19
+ it('has meta/canonical/link tags', () => {
20
20
  cy.visit(pages.home, options)
21
21
  cy.waitForHydration()
22
22
 
@@ -34,7 +34,7 @@ describe('Home Page Seo', () => {
34
34
  })
35
35
  })
36
36
 
37
- it.skip('has structured data', () => {
37
+ it('has structured data', () => {
38
38
  cy.visit(pages.home, options)
39
39
  cy.waitForHydration()
40
40
 
@@ -48,7 +48,7 @@ describe('Home Page Seo', () => {
48
48
  })
49
49
  })
50
50
 
51
- it.skip('has OpenGraph tags', () => {
51
+ it('has OpenGraph tags', () => {
52
52
  cy.visit(pages.home, options)
53
53
  cy.waitForHydration()
54
54
 
@@ -77,7 +77,7 @@ describe('Product Page Seo', () => {
77
77
  cy.clearIDB()
78
78
  })
79
79
 
80
- it.skip('has meta/canonical/link tags', () => {
80
+ it('has meta/canonical/link tags', () => {
81
81
  cy.visit(pages.pdp, options)
82
82
  cy.waitForHydration()
83
83
 
@@ -95,7 +95,7 @@ describe('Product Page Seo', () => {
95
95
  })
96
96
  })
97
97
 
98
- it.skip('has structured data', () => {
98
+ it('has structured data', () => {
99
99
  cy.visit(pages.pdp, options)
100
100
  cy.waitForHydration()
101
101
 
@@ -115,7 +115,7 @@ describe('Product Page Seo', () => {
115
115
  })
116
116
  })
117
117
 
118
- it.skip('has OpenGraph tags', () => {
118
+ it('has OpenGraph tags', () => {
119
119
  cy.visit(pages.pdp, options)
120
120
  cy.waitForHydration()
121
121
 
@@ -162,7 +162,7 @@ describe('Collection Page Seo', () => {
162
162
  cy.clearIDB()
163
163
  })
164
164
 
165
- it.skip('has meta/canonical/link tags', () => {
165
+ it('has meta/canonical/link tags', () => {
166
166
  cy.visit(pages.collection, options)
167
167
  cy.waitForHydration()
168
168
 
@@ -182,7 +182,7 @@ describe('Collection Page Seo', () => {
182
182
  })
183
183
  })
184
184
 
185
- it.skip('has structured data', () => {
185
+ it('has structured data', () => {
186
186
  cy.visit(pages.collection, options)
187
187
  cy.waitForHydration()
188
188
 
@@ -201,7 +201,7 @@ describe('Collection Page Seo', () => {
201
201
  })
202
202
  })
203
203
 
204
- it.skip('has OpenGraph tags', () => {
204
+ it('has OpenGraph tags', () => {
205
205
  cy.visit(pages.collection, options)
206
206
  cy.waitForHydration()
207
207
 
@@ -226,7 +226,7 @@ describe('Collection Page Seo', () => {
226
226
  })
227
227
 
228
228
  describe('Filtered Collection Page Seo', () => {
229
- it.skip('has canonical pointing to parent url', () => {
229
+ it('has canonical pointing to parent url', () => {
230
230
  cy.visit(pages.collection_filtered, options)
231
231
  cy.waitForHydration()
232
232
 
@@ -239,7 +239,7 @@ describe('Filtered Collection Page Seo', () => {
239
239
  })
240
240
  })
241
241
 
242
- it.skip('has structured data', () => {
242
+ it('has structured data', () => {
243
243
  cy.visit(pages.collection_filtered, options)
244
244
  cy.waitForHydration()
245
245
 
@@ -258,7 +258,7 @@ describe('Filtered Collection Page Seo', () => {
258
258
  })
259
259
  })
260
260
 
261
- it.skip('has OpenGraph tags', () => {
261
+ it('has OpenGraph tags', () => {
262
262
  cy.visit(pages.collection_filtered, options)
263
263
  cy.waitForHydration()
264
264
 
@@ -283,7 +283,7 @@ describe('Filtered Collection Page Seo', () => {
283
283
  })
284
284
 
285
285
  describe('Search Page Seo', () => {
286
- it.skip('has meta/canonical/link tags', () => {
286
+ it('has meta/canonical/link tags', () => {
287
287
  cy.visit(pages.search, options)
288
288
  cy.waitForHydration()
289
289
 
@@ -297,7 +297,7 @@ describe('Search Page Seo', () => {
297
297
  cy.get('link[rel="canonical"]').should('not.exist')
298
298
  })
299
299
 
300
- it.skip('has OpenGraph tags', () => {
300
+ it('has OpenGraph tags', () => {
301
301
  cy.visit(pages.search, options)
302
302
  cy.waitForHydration()
303
303
 
@@ -0,0 +1,19 @@
1
+ import { defineConfig } from 'cypress'
2
+
3
+ export default defineConfig({
4
+ retries: 0,
5
+ video: true,
6
+ trashAssetsBeforeRuns: true,
7
+ screenshotOnRunFailure: true,
8
+ viewportWidth: 1000,
9
+ viewportHeight: 600,
10
+ e2e: {
11
+ supportFile: 'cypress/support/index.js',
12
+ specPattern: 'cypress/integration/**/*.test.{js,jsx,ts,tsx}',
13
+ setupNodeEvents(on, config) {
14
+ return require('cypress/plugins/index.js')(on, config)
15
+ },
16
+ baseUrl: 'http://localhost:3000/',
17
+ experimentalRunAllSpecs: true,
18
+ },
19
+ })
@@ -89,6 +89,7 @@ module.exports = {
89
89
  },
90
90
 
91
91
  experimental: {
92
+ cypressVersion: 12,
92
93
  enableCypressExtension: false,
93
94
  },
94
95
  }