cypress-example-docker-circle icon indicating copy to clipboard operation
cypress-example-docker-circle copied to clipboard

Running PHP app in CircleCI with Cypress

Open KalleVuorjoki opened this issue 6 years ago • 0 comments

I try to run Cypress tests on CircleCI. Tests are super simple and run fine on local.

My .circle/config.yml file

version: 2.0
jobs:
  build:
    docker:
      - image: circleci/php:7.2.9-apache-node-browsers
        environment:
          - MYSQL_HOST=127.0.0.1
      - image: mariadb:10.2.12
    working_directory: ~/web
    steps:
      - checkout
      [..Removed the php parts..]
      - run: curl http://circeci.test // To test that php app is running fine.
      - run:
          name: Install cypress.io and dependencies.
          command: npm install
      - run:
          name: Run E2E tests
          command: $(npm bin)/cypress run

E2E test fails with error:

Uncaught Error: Script error.

Cypress detected that an uncaught error was thrown from a cross origin script.

We cannot provide you the stack trace, line number, or file where this error occurred.

Check your Developer Tools Console for the actual error - it should be printed there.

It's possible to enable debugging these scripts by adding the 'crossorigin' attribute and setting a CORS header.

https://on.cypress.io/cross-origin-script-error

This error originated from your application code, not from Cypress.

KalleVuorjoki avatar Nov 28 '18 09:11 KalleVuorjoki