User tests: Successful: Unsuccessful:
Should avoid random, timing related issues like the one in this build:
http://ci.joomla.org/joomla/joomla-cms/24448/1/24
Underlying logic issue: our code currently waits for the element to appear in the DOM and immediately triggers the "seeElement" check – even though the modal might not be faded in and therefore the "see" check fails. This PR moves the "wait" call in before the "see" checks.
Status | New | ⇒ | Pending |
Category | ⇒ | Unit Tests |
Labels |
Added:
?
?
|
Currently we wait for the element to appear then wait a further second for it to fade in fully.
The current code does 3 things:
The tests currently misbehave during the visibilty check in Line 496 and screenshot shows that the element is not fully visible at that point
Now after this we wait a second and then just check the element exists
No, we wait for it to appear in the DOM, wait 1 second for the animation to happen, then check it's visibility and fill it out
I assume you took this code from the test stuff I added to renameFile/renameFolder a few weeks back which are the only two tests in the media manager suite that fail (none of the rest do)
The two tests aren't the only ones (we had a couple of cases during the sprint) but they failed more often than the other tests because the other ones have a waitForJS-call that adds a 500ms wait time:
https://github.com/joomla/joomla-cms/blob/4.0-dev/tests/Codeception/acceptance/administrator/components/com_media/MediaListCest.php#L397
Title |
|
Agreeing with @SniperSister here. seeElement()
does not wait for anything, but just returns right away and just reports if it can see the element or not. Since we are just waiting for the element to be added to the DOM and not to be visible, this does indeed seem to be the problem. All our tests seem to indicate that.
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-10-12 18:29:20 |
Closed_By | ⇒ | rdeutz |
I don’t think this fixes the issue. Currently we wait for the element to appear then wait a further second for it to fade in fully. Now after this we wait a second and then just check the element exists (so this is actually less time total than before this patch)
I assume you took this code from the test stuff I added to renameFile/renameFolder a few weeks back which are the only two tests in the media manager suite that fail (none of the rest do). Which I think points to it being a different issue than simple timing.