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

React: fix commented out flaky e2e tests in account module #7694

Closed
deepu105 opened this issue May 28, 2018 · 3 comments · Fixed by #8057
Closed

React: fix commented out flaky e2e tests in account module #7694

deepu105 opened this issue May 28, 2018 · 3 comments · Fixed by #8057
Labels
area: enhancement 🔧 $100 https://www.jhipster.tech/bug-bounties/
Milestone

Comments

@deepu105
Copy link
Member

deepu105 commented May 28, 2018

Some e2e tests in account module are commented out in the templates as they are very flaky and fails in Travis builds, they are difficult to reproduce locally and hence tricky to fix

https://github.com/jhipster/generator-jhipster/blob/master/generators/client/templates/react/src/test/javascript/e2e/modules/account/account.spec.ts.ejs#L116

Also there are type conflicts when using both Jest and Mocha together

@pascalgrimaud
Copy link
Member

FYI, I added Protractor tests for React yesterday.
Here the results: https://travis-ci.org/hipster-labs/jhipster-travis-build/builds/384889812

It seems to work well for all configurations, excepting: Cassandra and OAuth2

Cassandra: https://travis-ci.org/hipster-labs/jhipster-travis-build/jobs/384889818

  Administration
    ✓ should load metrics
    ✓ should load health
    ✓ should load configuration
    1) should load audits
    2) should load logs
    User management
      ✓ should load user management
  CassBankAccount e2e test
    ✓ should load CassBankAccounts
    ✓ should load create CassBankAccount page
    3) should create and save CassBankAccounts

OAuth2: https://travis-ci.org/hipster-labs/jhipster-travis-build/jobs/384889820 -> not sure it's a real issue, maybe a random failure

1) Administration
       "before all" hook: ret:
     NoSuchElementError: No element found using locator: By(css selector, #login-item)
      at elementArrayFinder.getWebElements.then (node_modules/protractor/lib/element.ts:851:17)
      at ManagedPromise.invokeCallback_ (node_modules/selenium-webdriver/lib/promise.js:1366:14)
      at TaskQueue.execute_ (node_modules/selenium-webdriver/lib/promise.js:2970:14)
      at TaskQueue.executeNext_ (node_modules/selenium-webdriver/lib/promise.js:2953:27)
      at asyncRun (node_modules/selenium-webdriver/lib/promise.js:2813:27)
      at /home/travis/app/node_modules/selenium-webdriver/lib/promise.js:676:7
      at <anonymous>

@mraible
Copy link
Contributor

mraible commented May 29, 2018

I wonder if moving Protractor tests to use async/await would help with this: angular/protractor#4307 (comment)

@deepu105
Copy link
Member Author

@mraible this issue is for React and we already use async/await everywhere

@jdubois jdubois added the $100 https://www.jhipster.tech/bug-bounties/ label Jul 23, 2018
@jdubois jdubois added this to the 5.4.0 milestone Oct 3, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: enhancement 🔧 $100 https://www.jhipster.tech/bug-bounties/
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants