Follow-up from "Add Jira issue import e2e spec"
The following discussion from !32816 (merged) should be addressed:
-
@ddavison started a discussion: (+1 comment) Could you clarify these lines here?
It is expecting the
text_of_labels_block
to have_content, buttext_of_labels_block
returns an element, not the text of the element.def text_of_labels_block find_element(:labels_block) end
I think it'd be more correct to have:
expect(issue.labels_block).to have_text(jira_issue_label_1) expect(issue.labels_block).to have_text(jira_issue_label_2)
This additionally provides the benefit of relying on our framework, rather than Capybara directly
👌 Thoughts?
Honestly, I used the logic for checking labels from here https://gitlab.com/gitlab-org/gitlab/-/blob/master/qa/qa/specs/features/ee/browser_ui/2_plan/scoped_labels/editing_scoped_labels_spec.rb but you're right, that does make more sense to use
have_text
. Then we could get rid oftext_of_labels_block
entirely.I can update this Jira spec but should I also update the scoped labels spec and delete
text_of_labels_block
in this MR or open another one since it's not technically in the scope of this MR?