Page MenuHomeSoftware Heritage

cypress: Fix flaky tests related to sidebar
ClosedPublic

Authored by anlambert on Mar 31 2020, 12:46 PM.

Details

Summary

Increase wait time when testing sidebar expanding / collapsing to a value greater
than the sidebar animation one (300 ms).

CSS class related to expanded / collapsed sidebar is set at the beginning of the
animation so we are unfortunately forced to use cy.wait() here.

Related to T2341

Diff Detail

Repository
rDWAPPS Web applications
Branch
cypress-fix-flaky-test
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 11487
Build 17412: Phabricator diff pipeline on jenkinsJenkins console · Jenkins
Build 17411: arc lint + arc unit

Event Timeline

Build is green

Patch application report for D2932 (id=10414)

Rebasing onto f8ac17e107...

Current branch diff-target is up to date.
Changes applied before test
commit 53dd528fda4834b33bad43edf7f140b45652b711
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Tue Mar 31 12:44:37 2020 +0200

    cypress: Fix flaky tests related to sidebar
    
    Increase wait time when testing sidebar expanding / collapsing to a value greater
    than the sidebar animation one (300 ms).
    
    Closes T2341

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/24/ for more details.

olasd added a subscriber: olasd.

Thanks!

This revision is now accepted and ready to land.Mar 31 2020, 12:57 PM

I will restart the build a couple of times before landing the diff to be sure it effectively fixes the issue.

Build is green

Patch application report for D2932 (id=10414)

Rebasing onto f8ac17e107...

Current branch diff-target is up to date.
Changes applied before test
commit 53dd528fda4834b33bad43edf7f140b45652b711
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Tue Mar 31 12:44:37 2020 +0200

    cypress: Fix flaky tests related to sidebar
    
    Increase wait time when testing sidebar expanding / collapsing to a value greater
    than the sidebar animation one (300 ms).
    
    Closes T2341

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/25/ for more details.

Build has FAILED

Patch application report for D2932 (id=10414)

Rebasing onto f8ac17e107...

Current branch diff-target is up to date.
Changes applied before test
commit 53dd528fda4834b33bad43edf7f140b45652b711
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Tue Mar 31 12:44:37 2020 +0200

    cypress: Fix flaky tests related to sidebar
    
    Increase wait time when testing sidebar expanding / collapsing to a value greater
    than the sidebar animation one (300 ms).
    
    Closes T2341

Link to build: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/26/
See console output for more information: https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/26/console

Current fix is unfortunately not valid. I need to dig further on this.

Update:

  • Set sidebar state (collapsed / expanded) once css animation has finished in order to make associated cypress test reliable.

Build is green

Patch application report for D2932 (id=10417)

Rebasing onto f8ac17e107...

Current branch diff-target is up to date.
Changes applied before test
commit fc6dc351261017a9a6bc898cb0becf0d0112fd3d
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Tue Mar 31 12:44:37 2020 +0200

    cypress: Fix flaky tests related to sidebar
    
    Set sidebar state (collapsed / expanded) once css animation has finished
    in order to make associated cypress test reliable.
    
    Also set "enableRemember" option from adminlte PushMenu and remove custom
    code that was doing the same operation as it is not needed anymore
    (see https://adminlte.io/docs/3.0/javascript/push-menu.html).
    
    Closes T2341

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/27/ for more details.

Build is green

Patch application report for D2932 (id=10417)

Rebasing onto f8ac17e107...

Current branch diff-target is up to date.
Changes applied before test
commit fc6dc351261017a9a6bc898cb0becf0d0112fd3d
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Tue Mar 31 12:44:37 2020 +0200

    cypress: Fix flaky tests related to sidebar
    
    Set sidebar state (collapsed / expanded) once css animation has finished
    in order to make associated cypress test reliable.
    
    Also set "enableRemember" option from adminlte PushMenu and remove custom
    code that was doing the same operation as it is not needed anymore
    (see https://adminlte.io/docs/3.0/javascript/push-menu.html).
    
    Closes T2341

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/28/ for more details.

Build is green

Patch application report for D2932 (id=10417)

Rebasing onto f8ac17e107...

Current branch diff-target is up to date.
Changes applied before test
commit fc6dc351261017a9a6bc898cb0becf0d0112fd3d
Author: Antoine Lambert <antoine.lambert@inria.fr>
Date:   Tue Mar 31 12:44:37 2020 +0200

    cypress: Fix flaky tests related to sidebar
    
    Set sidebar state (collapsed / expanded) once css animation has finished
    in order to make associated cypress test reliable.
    
    Also set "enableRemember" option from adminlte PushMenu and remove custom
    code that was doing the same operation as it is not needed anymore
    (see https://adminlte.io/docs/3.0/javascript/push-menu.html).
    
    Closes T2341

See https://jenkins.softwareheritage.org/job/DWAPPS/job/tests-on-diff/29/ for more details.