Closed rbobko93 closed 2 years ago
This issue is stale because it has been open 30 days with no activity. Our core developers tend to be more verbose on denying. If there is no negative comment, possibly this feature will be accepted. We are accepting PRs :smiley:. Comment or this will be closed in 7 days
Overview of the issue
Hey guys,
My first issue here, so don't kill me if some info is missing. Kindly ask and I will be happy to provide it.
Issue is cause by how Jhipster is generating protractor e2e tests for entities. Whenever entity is related to some other entity generated page for creating new record of this entity type contains dropdowns or multi select inputs for selecting children ids.
JHipster is generating a code that is always selecting last option of the dropdown and this is the main issue. This specific part of the code causes tests to fail fairly often when tests are run in parallel. Why? We also have our own e2e tests which are adding/removing entities of the same type. When running in parallel entities records get edited at the same time. Selecting last option of a dropdown might result in selecting a record that is already removed, but was in DB when loading create entity page.
This issue keeps coming back even if entities e2e tests are being run in the first instance.
Motivation for or Use Case
Reproduce the error
Related issues
Suggest a Fix
We have fixed this issue by changing Jhipster generated code from selecting last dropdown/muliselect option to selecting the first one. First option is much less likely (pretty much impossible) to get removed during testing because it is loaded by liquibase as fake data.
JHipster Version(s)
6.2.0
JHipster configuration
Entity configuration(s)
entityName.json
files generated in the.jhipster
directoryBrowsers and Operating System