okTurtles / group-income

A decentralized and private (end-to-end encrypted) financial safety net for you and your friends.
https://groupincome.org
GNU Affero General Public License v3.0
329 stars 43 forks source link

Heisenbug in `group-proposals.spec.js` #2257

Closed taoeffect closed 1 week ago

taoeffect commented 1 month ago

Problem

This is a heisenbug that happens on my machine:

https://github.com/user-attachments/assets/76aabdc4-0cb3-469c-a09d-22563b8a409f

    1) proposal-based invitation link has 7 days of expiry

  14 passing (1m)
  1 failing

  1) Proposals - Add members
       proposal-based invitation link has 7 days of expiry:
     AssertionError: Timed out retrying after 30000ms: Expected to find element: `.c-title-wrapper select`, but never found i

I "fixed" this in this PR by using { bypassUI: true } here:

  it(`proposal-based invitation link has ${groupInviteLinkExpiry.proposal} days of expiry`, () => {
    // Expiry check in Group Settings page and Dashboard
    cy.giLogin(`user1-${userId}`, { bypassUI: true })

However, this test should pass with { bypassUI: false } too. In fact, it doesn't make any sense what's going on here, because in the video you can see it's as if user1 is joining the group for the first time when they're logging in, but they've already joined the group long before this!

So something serious is going wrong here.

Solution

See if you can get the test to fail on your local machine. Remove , { bypassUI: true } from that line there and run the tests locally with grunt dev and npx cypress run -c 'baseUrl=http://localhost:8000' --spec "test/cypress/integration/group-proposals.spec.js" (or just plain grunt test, which was how I was running it when I got the heisenbug).

Then identify the problem and fix it.

taoeffect commented 1 month ago

Actually, I'm not sure about this one... it seems to be on #2248 mainly...

taoeffect commented 1 month ago

Updated the issue to indicate that this is still a real issue even though it's been worked around for now.

taoeffect commented 1 week ago

Might've been fixed by @corrideat in #2294