When running a cypress integration test, the Test Runner navigates to the application specified in cy.visit(), but I can no longer see the Command Log on the left hand side. The Command Log shows for a brief second before the Test Runner is completely overtaken by the application. This occurs with Chrome 64. Electron 59 works fine and shows the Command Log when running tests.
Display the Command Log on the left hand side while Test Runner calls cy.visit()
Add a test called form-input.spec.js in cypress/integration folder with the following
/// <reference types="Cypress"/>
context("Form Input", () => {
beforeEach(() => {
cy.visit("localhost:3000");
cy.log("Test");
});
it(".should() - assert that <title> is correct", function() {
expect(true).to.equal(true);
});
});,
Start a local development server for create react app
Run cypress open
Click the test name, you will see the Test Runner open up, the Command Log shows for a second, and then all you see is the Application.
Cypress.exe v3.0.2 and npm v3.0.2
Windows 7 Enterprise
The Command Log shows when running with Electron 59, but does not show when running with Chrome 64
@mcasey8540 Do you have any extra configuration set up, say in your cypress.json?
@jennifer-shehane
My cypress.json file only has "baseUrl": "http://localhost:3000"
Thanks.
Could you try visiting a different url to see that the command log displays properly within your system and browser and let me know what the result is? Like:
/// <reference types="Cypress"/>
context("Form Input", () => {
beforeEach(() => {
cy.visit("https://example.cypress.io/");
cy.log("Test");
});
it(".should() - assert that <title> is correct", function() {
expect(true).to.equal(true);
});
});,
We've typically seen this behavior when the website under test is using frame-busting techniques, to prevent it from being rendered within an iframe, but we have fixed a lot of these issues to date, so this may be an outlier.
I can confirm the behavior above.
The log on the left is being displayed when the angular application is hosted in a staged environment.
The log disappears and tests are not run when the same application is hosted on localhost by angular CLI. The only difference is in the baseurl and authentication method.
This still happens on Chromium 73. Electron seems unaffected, however I can't use that because of another issue (crashes with white browser screen) but this is different story.
Long story short: update to 3.1.5 version.
Long story:
myapp my own app and exampleapp the downloaded one)exampleapp everything works finemyapp from the fresh Cypress everything works finemyapp (plugins, commands, Typescript... everything) but the issue remainedmyapp goes 304 when loading the __/#/tests... URL, the __/ is the faulty one (when exampleapp goes 200 with the same route)if etag and (etag is clientVersion)
res.sendStatus(304)
in client.coffee
exampleapp, when loaded by Cypress, sends a cookie __cypress.unload=true to the server__cypress.unload=true cookie to myapp. The __/ route goes 200 instead of 304 but the command log panel doesn't show upexampleapp was running the 3.1.5 version, myapp the 3.1.3I hope my comment could help other people facing the same problem or the Cypress team for some eventual investigations
@NoriSte - Yes, upgrading to 3.1.5 solved the issue for me, and I hope it helps others, too. I had forgotten to do that again when I scrapped my project to start again - thanks!
Closing as resolved in 3.1.5. Please leave a comment or open a new issue if you are experiencing a similar issue still after the update.
I accidentally closed the Command Log and now I have no idea how to reopen it. Help? @jennifer-shehane
Still facing the issue. But clearing the cache manually fixes the issue, but only until the next run.
You are likely facing this issue https://github.com/cypress-io/cypress/issues/2132#issuecomment-404561427
To clear out the app data that has this saved state:
cypress openFile -> View App Data
Most helpful comment
Long story short: update to
3.1.5version.Long story:
(starting from now I'll call
myappmy own app andexampleappthe downloaded one)exampleappeverything works finemyappfrom the fresh Cypress everything works finemyapp(plugins, commands, Typescript... everything) but the issue remainedmyappgoes 304 when loading the__/#/tests...URL, the__/is the faulty one (whenexampleappgoes 200 with the same route)in
client.coffeeexampleapp, when loaded by Cypress, sends a cookie__cypress.unload=trueto the server__cypress.unload=truecookie tomyapp. The __/ route goes 200 instead of 304 but the command log panel doesn't show upexampleappwas running the 3.1.5 version,myappthe 3.1.3I hope my comment could help other people facing the same problem or the Cypress team for some eventual investigations