Skip to content

Fix multiple epic shortcut specs

John Hope requested to merge fix-multiple-epic-shortcut-specs into master

What does this MR do and why?

Fixes 3 Epic shortcut specs that are either flaky or already quarantined:

Flaky spec in `ee/spec/features/epics/shortcuts... (#299523 - closed)

  • The shortcuts code hasn't fully loaded before the keypress event is sent. This change uses a waiting matcher to ensure shortcuts code has loaded before running the expectation.

Flaky spec: ee/spec/features/epics/shortcuts_ep... (#393763 - closed)

  • The shortcuts code hasn't fully loaded before the keypress event is sent. This change uses a waiting matcher to ensure shortcuts code has loaded before running the expectation.

There were a few possibilities here but the failure also looks to the same issue as above. The spec uses waiting matchers so is unlikely to be caused by the animation of the sidebar or the labels widget.

Flaky spec: "Epic shortcuts pressing "r" quotes... (#11057 - closed)

This test had a number of issues that are fixed in this MR:

  • The Rich Text popover was obscuring the note and some of the comment box, absorbing clicks.
  • The expectation used a non-waiting matcher, which could run before the callback updated the textarea with the expected text.
  • The selection of note text was inconsistent. I'm not sure if select_element was supposed to act differently in Feature specs from QA, but highlighting text isn't what this method does in the latter and "select" usually means to match DOM elements in the Capybara/Selenium context. This change adds a new helper that simulates mouse actions.
  • Functionality has changed around how comments are made, it now requires an additional interaction to expand the form. This is likely to change in future again but the test tests the current behavior.
  • As with other tests, it's likely the shortcuts code hasn't fully loaded before the keypress event is sent.

This test was failing consistently rather than intermittently so multiple green pipelines are indicative of a fix.

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

Before After

How to set up and validate locally

Numbered steps to set up and validate the change are strongly suggested.

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by John Hope

Merge request reports