Skip to content

Fix e2e create room test failing

Eric Eastwood requested to merge 2269-fix-e2e-create-room-test into develop

Fix e2e create room test failing

Part of https://gitlab.com/gitlab-org/gitter/webapp/issues/2269

Found from https://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1648

  • Cypress debug video freezing
    • https://github.com/cypress-io/cypress/issues/4722#issuecomment-526313109
    • Now using more powerful internal Gitter CI runners
  • Group dropdown does not appear after click
    • Previously the dropdown would close when we selected the initial groupId

can create a room

After figuring out the cookie sharing issue(https://gitlab.com/gitlab-org/gitter/webapp/merge_requests/1648 has a more complete picture), running the full test suite in CI would still have can create a room fail. The test would pass if you ran it by itself it.only(...)

The debug video would also freeze and jump straight to the failure so we couldn't see what was going on. So I just updated the e2e-tests CI job to use our more powerful Gitter internal runners.

The video just confirmed that the group select dropdown wasn't popping up after trying to click it.

Locally I couldn't get the test to fail to debug this better.

But I first tried a better selector(.js-create-room-group-input .js-group-select-view) that includes the nested backbone view in it to make sure the groupSelectView was rendered at the time we tried to click.

Then I updated the groupSelect to not close the typeahead dropdown when we select the initial groupId. My theory was that we clicked the input to open the typeahead dropdown but our selectInitialGroup was closing it before we could find the dropdown and click on an item.

The test now passes consistently 🎉

Edited by Eric Eastwood

Merge request reports