chore(playwright): Wait for server response before checking sorting result#62032
Conversation
susnux
left a comment
There was a problem hiding this comment.
If you pre-emit the event before the actual update you must handle the error case where the update failed and revert the config update.
If its only about the tests then make them wait for the PUT before continue. Should be an easy wait for response call. |
d047fc2 to
b44954d
Compare
b44954d to
5bb6eb5
Compare
|
@susnux: I've changed the PR. I now wait for the response of the server in the test itself. I realized this is the best thing to do even if we would implement some kind of optimistic update here.
It kinda is, kinda not. You can trigger the race condition with slow servers and multiple clicks as well as only the last server response is the state being shown. Not the last thing the user did. But we don't have an optimistic UI approach here, so, I think it's the right thing to do. Although I think that's a pretty low-hanging fruit to make the files UI feel more smooth. |
…esult Signed-off-by: David Dreschner <david.dreschner@nextcloud.com>
5bb6eb5 to
672a46f
Compare
Summary
This PR fixes a race condition that affects the playwright tests under high load on the CI runners. In case the race condition occurs, the tests fail with the following message:
Checklist
3. to review, feature component)stable32)AI (if applicable)