-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Fix/flaky react protractor #11923
Fix/flaky react protractor #11923
Conversation
Noticed issue: beforeRecordsCount was a global variable used in different async functions, so not atomic. The tests weren't actually independent because of that. This is an attempt to fix it.
Didn't see the ComponentsPage being initialized in the test!
Might fix https://github.com/MathieuAA/private-generator-jhipster/runs/702120722#step:17:224 because the button's appearance means that we're not waiting anymore.
Why simplified: because the deletion is actually done in steps. First, the user clicks the entry deletion button, then the modal appears which hides the table, the user clicks the button and the request is sent to the backend. After that, the table is displayed and the toaster can appear before the table is updated. In the test, we ignore this fact and wait for the modal to disappear but not for the table to be updated. The test basically now says: okay we click the button, wait for the modal to go away and then we wait for the table to update because there won't be any entry after that. If there's a backend issue, the wait will be over and the test will fail because the last entry won't be deleted.
@sendilkumarn closed/reopened to validate if it was releated to jhispter bom commit |
@DanielFran it looks like it is working :) |
@sendilkumarn Yes. Need to check which dependency was the culpit... |
@sendilkumarn it's gonna be a very busy day for me, but I'll try to review it ASAP |
LGTM @sendilkumarn, I'm testing this against my weird fork |
yeah, I changed this on top of your draft PR 👍 |
Except for the usual memcached thing, everything seems to be okay @sendilkumarn. It should be good to go. Only 20 builds remaining |
Okay, the memcached builds fail for the now known reason, there's also a backend test that fails because of a dependency issue. https://github.com/MathieuAA/private-generator-jhipster/actions |
@sendilkumarn should your PR fail for the memcached builds? From what I see I'm not so sure |
It should not, can you link the failed builds? |
Wait, why does it not fail here? perhaps there's something wrong with my repo |
It looks like there is a fake data, but this is interesting. |
ignore checking any displayed multiple times
@sendilkumarn @MathieuAA : do you think we can merge this?my opinion is : it can be only similar or better than what we currently have Don't hesitate to merge it ! |
This is another attempt to fix the flaky react protractor tests. The protractor best practice is to make the tests independent of each other, but here our tests are depending on each other. (check out style guide here).
But the flakiness might continue / resurface in the future(or even in this PR). The correct and long time solution will be to move towards Cypress.
Please make sure the below checklist is followed for Pull Requests.
All continuous integration tests are green
Tests are added where necessary
Documentation is added/updated where necessary
Coding Rules & Commit Guidelines as per our CONTRIBUTING.md document are followed