title: Cypress tests are green locally, but failing in CI - tips on debugging?
body: <p>As much as I adore Cypress it's starting to turn out quite badly. I don't think I would be doing something fundamentally wrong. I've read best practices a couple of times and I don't see what I could improve really.</p>
  
  <p>It's starting to be rather frustrating. Having tests working perfectly on the local machine (tried running several times in the row) and yet when the same code runs through the CI (currently Bitbucket Pipelines), several tests fail for weird reasons.</p>
  
  <p>For example, a single click on an item in the list adds a single item in the cart. Works perfectly however I try to break it and yet the same test in CI makes that click happen twice there for some reason. And that's one issue I am at least able to describe. Others are out of whack and very often happening just randomly like that element is no visible and yet looking at the screenshot I can see just fine.</p>
  
  <p>I tried to use <code>cypress-failed-log</code> plugin to see command log, but that does not really help because it's the same thing I see locally and yet it fails in CI. A video I can see in Cypress Dashboard is not that helpful either because it's usually way too fast and some things are not even seen there.</p>
  
  <p>Can someone advise me some other options on how to approach the issue at hand more gracefully? I must admit I am on the verge of giving up on these tests because it just takes too much time to make them reliable.</p>
  
  <hr>
  
  <p>Some details about my setup:</p>
  
  <pre><code>cypress-failed-log@2.5.0
  cypress-testing-library@3.0.1
  cypress@3.3.1
  
  # job definition for running E2E tests in parallel
  e2e: &amp;e2e
    name: E2E tests
    image: cypress/browsers:chrome67-ff57
    caches:
      - yarn
      - home-cache
    script:
      - yarn -v
      - cd cypress
      - yarn install --frozen-lockfile
      - npx @bahmutov/print-env BITBUCKET
      - yarn ci --parallel --ci-build-id $BITBUCKET_BUILD_NUMBER
  </code></pre>