Skip to main content

Common issues (`run cypress tests`)

"AssertionError: expected 404 to equal 200" error

One of the most common errors is a 404 on a page due to outdated URLs in the theme configuration. For example, this can happen at the early stages of development, when mock pages are replaced with real ones due to the sync.
To fix this, simply replace the wrong url with the correct one in THEME_NAME/cypress/support/variables.js

"Cypress could not verify that this server is running" error

This error is caused by incorrect or missing CI/CD variables in Gitlab. Navigate to your theme in GitLab, then to Settings > CI/CD > Open the section called Variables and check the following variables exist and configured correctly:

  1. HTTP_AUTH_PASS with the basic auth password as ‘value’ (make sure to tick the ‘masked’ checkbox and untick the ‘protected’ checkbox)

  2. HTTP_AUTH_USER with the basic auth username as ‘value’ (untick the ‘protected’ checkbox)

  3. DEPLOY_TEST_DOMAIN with the test-CUSTOMER.clouduite.com URL as ‘value’ (this is necessary because some themes have a domain name that is different from the theme name) (untick the ‘protected’ checkbox)

Important information regarding Mono Repos

Mono-repo’s include a different "gitlab-ci" template, so for mono-repos it is necessary to add the sub-theme name in lowercase characters to the domain key: DEPLOY_TEST_DOMAIN_theme