Skip to content

Investigate UsersPage test failure #3210

Closed
@Kira-Pilot

Description

@Kira-Pilot

As a FE developer at Coder, I would like to have full test coverage and I would also like to be able to run my test suite without seeing flaking tests.

In #3207 we removed a flaking user test that was frequently failing on main (both locally and in CI). This test was holding up PRs and causing angst when testing locally.

When we have time, we should investigate this test failure more thoroughly and add it back in a more stable way.

Details

181030264-00e81148-1663-4587-b98c-a3f9e4b6c024

../site/src/pages/UsersPage/UsersPage.test.tsx

  ● Users Page › suspend user › when it is success › shows a success message and refresh the page

    expect(jest.fn()).toBeCalledTimes(expected)

    Expected number of calls: 1
    Received number of calls: 2

      195 |
      196 |         // Check if the users list was reload
    > 197 |         await waitFor(() => expect(API.getUsers).toBeCalledTimes(1))
          |                                                  ^
      198 |       })
      199 |     })
      200 |

AC

  • test is added back in
  • test runs consistently locally and in CI

Definition of done

  • AC is completed

Metadata

Metadata

Assignees

No one assigned

    Labels

    siteArea: frontend dashboard

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions