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

Support using vue-remote-devtools within Cypress #2396

Closed
alukos opened this issue Aug 24, 2018 · 2 comments
Closed

Support using vue-remote-devtools within Cypress #2396

alukos opened this issue Aug 24, 2018 · 2 comments
Labels
stage: needs investigating Someone from Cypress needs to look at this

Comments

@alukos
Copy link

alukos commented Aug 24, 2018

I try to use Remote Vue DevTools with Cypress.

When add <script src="http://localhost:8098"></script> in index.html as nothingismagick suggests its work, but then need to delete each time for production

When try add in spec Cypress.on("window:before:load" ... as brian-mann suggests I get an error body null, when try add on win.onload:

Cypress.on("window:before:load", win => {
  win.onload = () => {
    const script = win.document.createElement("script");
    script.src = "http://localhost:8098";
    win.document.body.appendChild(script);
  };
});

or

    cy.visit('/', {
      onBeforeLoad: win => {
        win.onload = () => {
          const script = win.document.createElement('script');
          script.src = 'http://192.168.55.103:8098';
          win.document.body.appendChild(script);
        };
      },
    });

Vue DevTools are connected but the Vue components are not displayed

@jennifer-shehane
Copy link
Member

I know this also may not be ideal, but I have a check within our web apps for window.Cypress - you could try adding the script only when window.Cypress is defined and it would only be inserted during testing.

@jennifer-shehane jennifer-shehane changed the title Don't connect to vue-remote-devtools Support using vue-remote-devtools within Cypress Jan 28, 2019
@jennifer-shehane jennifer-shehane added the stage: needs investigating Someone from Cypress needs to look at this label Jan 28, 2019
@jennifer-shehane
Copy link
Member

Since this issue hasn't had activity in a while, we'll close the issue until we can confirm this is still happening. Please comment if there is new information to provide concerning the original issue and we'd be happy to reopen.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stage: needs investigating Someone from Cypress needs to look at this
Projects
None yet
Development

No branches or pull requests

2 participants