elgentos / magento2-cypress-testing-suite

A community-driven Cypress testing suite for Magento 2
MIT License
172 stars 37 forks source link

integration/hyva/homepage.spec.js import path to cart.json fixture is wrong #55

Closed Vinai closed 2 years ago

Vinai commented 2 years ago

Describe the bug

Running:  homepage.spec.js
Oops...we found an error preparing this test file:
  > cypress/integration/hyva/homepage.spec.js
The error was:
Error: Webpack Compilation Error
./cypress/integration/hyva/homepage.spec.js
Module not found: Error: Can't resolve '../../../fixtures/hyva/selectors/cart.json' in '/data/web/public/cypress/integration/hyva'

To Reproduce Steps to reproduce the behavior:

  1. Run the tests in the current main branch head

Expected behavior Test can compile

Additional context The path to the cart.json has one ../ to many at https://github.com/elgentos/magento2-cypress-testing-suite/blob/main/cypress/integration/hyva/homepage.spec.js#L6

Vinai commented 2 years ago

A similar bug is also present in cypress/integration/hyva/cms/cms-pages.spec.js wheere the paths to fixtures/hyva/cms.json and fixtures/hyva/selectors/cms.json have a ../ too much.

https://github.com/elgentos/magento2-cypress-testing-suite/blob/main/cypress/integration/hyva/cms/cms-pages.spec.js#L1-L2