Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error during Websocket handshake 404/503 when try visit random domain from list #5020

Closed
Artem-Kushch opened this issue Aug 22, 2019 · 1 comment

Comments

@Artem-Kushch
Copy link

Artem-Kushch commented Aug 22, 2019

Current behavior:

When I try to visit random domain URL from the list, cypress open each domain, but should open one domain. And I have Error during WebSocket handshake 404/503 error (first screenshot) or open some not correct URL (second screenshot).

№1
2019-08-22_1116

№2
2019-08-22_1118

Desired behavior:

Open one random domain URL without any opens any other domains and errors.

Steps to reproduce: (app code and test code)

describe("Dynamic tests", () => {
  const domains = ["https://github.com", "https://www.google.com", "https://www.wikipedia.org"];
  const randomDomain = chance().pickone(domains);

  it(`Test domain: ${randomDomain}`, () => {
    cy.visit(randomDomain);
  });
});

And try to run this test several times.

Versions

    "@cypress/webpack-preprocessor": "^4.1.0",
    "cypress": "^3.4.1",
    "mocha": "5.2.0",
@jennifer-shehane
Copy link
Member

Can reproduce this. Closing as a duplicate of #1987

// Requires 'npm i chance -D'
let Chance = require('chance')
let chance = new Chance()

describe('Dynamic tests', function () {
  const domains = ['https://github.com', 'https://www.google.com', 'https://www.wikipedia.org']
  const randomDomain = chance.pickone(domains)

  it(`Test domain: ${randomDomain}`, () => {
    cy.visit(randomDomain)
  })
})

Essentially the test is being rerun every time the superdomain under test changes, so that causes the randomDomain to be run again and set to a new domain, etc, forever.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants