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

I'm trying to run the same test both in chrome and electron, In chrome, it runs fine but in electron it fails with unhandled exception #3886

Closed
minams2 opened this issue Apr 4, 2019 · 1 comment

Comments

@minams2
Copy link

minams2 commented Apr 4, 2019

I'm trying to run the test in both chrome and electron. In chrome it runs fine but in electron it fails with exception. Manually if i check in electron i don't get any exception.

Help is much appreciated

describe('Structured Content create', () => {
  let isSource;
  before(() => {
    helper.loginAsStaff();
    const vertical = Cypress.env('vertical');
    if (vertical === 'Verywell Health' || vertical === 'Verywell Mind' || vertical === 'Verywell Family' || vertical === 'Verywell Fit') {
      isSource = true;
    }

    Cypress.on('uncaught:exception', (err, runnable) => {
      //expect(err.message).to.include('Ignoring error for now');
      //done()
      cy.get('body').then(($body) => { if(($body.find('#popupAcceptBtn').length > 0)) {
        cy.get('#popupAcceptBtn').click(); }
    })
      return false;
     
  });
  
  structuredContent.visitEditForm();
});

  after(() => {
    helper.logout();
  });

  
  it('should be able to submit with Only Required fields filled', () => {
    structuredContent.addDataToRequiredFields();
    structuredContent.bottomBar.clickPublish();
  });

  it('should be able to submit with all fields filled', () => {
    structuredContent.addDataToAllFields();
    structuredContent.bottomBar.clickPublish();
  });

  it('should be able to add citation', () => {
    if (isSource) {
      structuredContent.addDataToRequiredFields();
      citationHelper.assertAddCitationAdd(structuredContent, 2);
      structuredContent.bottomBar.clickPublish();
    } else {
      return;
    }
  });
});
@jennifer-shehane
Copy link
Member

Tests run in CI run within the Electron browser (Chrome 59). So, the first suggestion is to run the tests locally within the Electron browser with DevTools open to see if there are any issues there.

Since you already mentioned running the tests locally with other browser combinations, next I would make sure that video recording and/or screenshots are turned on during the CI run. Review the video to see if anything can be detected there that is causing the failure.

If it's still not obvious, compare the Command Log from within the video to the Command Log of the same test passing locally when run in Cypress. Take a screenshot of each at the same moment and compare each command side by side. Seeing differences of the execution time or missing commands, etc can sometimes illuminate differences in the timings of requests or other methods that may have caused an issue.

Unfortunately we have to close this issue as there is not enough information to reproduce the problem.

Please comment in this issue with a reproducible example and we will reopen the issue. 🙏

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