Skip to content

Fix flaky spec/features/discussion_comments/issue_spec.rb

Attempt to fix #338768 (closed) - don't attach to comment being posted in progress

Previously I think the selector was being attached to this:

Screen_Shot_2021-09-14_at_1.57.07_pm

Which caused this failure

Failures:
  1) Thread Comments Issue behaves like thread comments for issue, epic and merge request clicking "Comment" will post a comment
     Failure/Error: expect(new_comment).not_to have_selector '.discussion'
     Selenium::WebDriver::Error::StaleElementReferenceError:
       stale element reference: element is not attached to the page document

Adding a :not(.being-posted) selector to new_comment means we wait until the comment is posted.

Edited by Simon Knox

Merge request reports

Loading