Fix clicks on actions menu of non opaque file rows in acceptance tests #22481
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When a row is added to the file list the opacity of the file row is animated from transparent to fully opaque. As the file actions menu is a descendant of the row but overflows it when the row is not fully opaque clicks on the menu entries "fall-through" and are received instead by the rows behind.
The opacity animation is a CSS animation, and it is not possible to know if a row is appearing or not except from its opacity (the row will have the
appear
CSS class even after the animation ended). Therefore it should be waited until the row of the file is fully opaque before using the menu.This should fix the random failures of tests/acceptance/features/app-files.feature:262 I do not know for sure, though, as I run the test, literally, a hundred times and it did not fail 🤷 Due to this I tried to find out why it failed, although I have not been able to reproduce the original Drone failure (that is, without modifying the code to force what I think was the cause).
Note that the problem is not specific to the acceptance tests, although users should not hit it (except Barry Allen, Pietro Maximoff et al.), as they would need to click an item in the file menu action less than 500ms after the file row was added. It can be checked without having to rush with the following steps:
tr
element to 0.5