Fix flaky spec/features/discussion_comments/issue_spec.rb
requested to merge 338768-spec-failure-in-spec-features-discussion_comments-issue_spec-rb-thread-comments-issue into master
Attempt to fix #338768 (closed) - don't attach to comment being posted in progress
Previously I think the selector was being attached to this:
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