Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#2342 - bypassUI: true option in group-large.spec.js and etc. #2377

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

SebinSong
Copy link
Collaborator

@SebinSong SebinSong commented Oct 14, 2024

closes #2342

Currently group-large.spec.js test-suite has relatively high number of repeated action such as, 'A group with 12 members shows correctly the pledging month overview widget' etc. The goal of this PR is to reduce the duration of this test by implementing bypassUI: true options for those repeated actions, which are

cy.giAddRandomIncome()
cy.giLogout()

This lead to below improvement when tested locally on my Mac OS.

[Tested in master]

before-update



[After update]

after-update




while at it, cy.giLogout({ bypassUI: true }) has been added in other *.spec.js files.

@SebinSong SebinSong self-assigned this Oct 14, 2024
Copy link

cypress bot commented Oct 14, 2024

group-income    Run #3265

Run Properties:  status check passed Passed #3265  •  git commit 942cb66105 ℹ️: Merge 932db52c696d7b39468609fb77d1b62623c1d5b9 into b64ecda81d1b1c9574b1b4490945...
Project group-income
Run status status check passed Passed #3265
Run duration 08m 36s
Commit git commit 942cb66105 ℹ️: Merge 932db52c696d7b39468609fb77d1b62623c1d5b9 into b64ecda81d1b1c9574b1b4490945...
Committer Sebin Song
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 10
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 111

@SebinSong SebinSong changed the title [WIP] #2342 - bypassUI: true option in group-large.spec.js and etc. #2342 - bypassUI: true option in group-large.spec.js and etc. Oct 14, 2024
@SebinSong
Copy link
Collaborator Author

SebinSong commented Oct 14, 2024

it appears that adding cy.giLoyout({ bypassUI: true }) to various test-suites leads to reducing the total test duration by around over 15 secs which is not bad.

[Before]

logout-before



[After]

logout-after

Another attempt:

Comment on lines -27 to -29
if (i > 3) {
cy.getByDT('contributionsLink').click()
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this logic removed? 🤔

Copy link
Collaborator Author

@SebinSong SebinSong Oct 15, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that we use cy.giAddRandomIncome({ bypassUI: true }) right below it, it's not necessary to navigate to the /contributions page at this point in the flow.

Copy link
Member

@taoeffect taoeffect left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very cool, nicely done @SebinSong!

And I see you remembered to save at least some cy.giLogout() tests - nice!

One question...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add bypassUI: true option for cy.giAddRandomIncome() in group-large.spec.js
2 participants