? ? Pending

User tests: Successful: Unsuccessful:

avatar SniperSister
SniperSister
12 Oct 2019

Summary of Changes

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.

avatar SniperSister SniperSister - open - 12 Oct 2019
avatar SniperSister SniperSister - change - 12 Oct 2019
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 12 Oct 2019
Category Unit Tests
avatar SniperSister SniperSister - change - 12 Oct 2019
Labels Added: ? ?
avatar wilsonge
wilsonge - comment - 12 Oct 2019

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.

avatar SniperSister
SniperSister - comment - 12 Oct 2019

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:

  1. wait for the element to appear in the DOM: https://github.com/joomla/joomla-cms/blob/4.0-dev/tests/Codeception/acceptance/administrator/components/com_media/MediaListCest.php#L495
  2. right away, with no wait check if it's visible: https://github.com/joomla/joomla-cms/blob/4.0-dev/tests/Codeception/acceptance/administrator/components/com_media/MediaListCest.php#L496
  3. Wait 1 second and fill out the form

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

avatar SniperSister SniperSister - change - 12 Oct 2019
Title
Fix logic issue in mediamanager test class
[4.0] Fix logic issue in mediamanager test class
avatar SniperSister SniperSister - edited - 12 Oct 2019
avatar Hackwar
Hackwar - comment - 12 Oct 2019

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.

avatar rdeutz rdeutz - change - 12 Oct 2019
Status Pending Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2019-10-12 18:29:20
Closed_By rdeutz
avatar rdeutz rdeutz - close - 12 Oct 2019
avatar rdeutz rdeutz - merge - 12 Oct 2019

Add a Comment

Login with GitHub to post a comment