Failure in qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb
https://gitlab.com/gitlab-org/quality/staging/-/jobs/274552810
) Manage Add project member user adds project member
Failure/Error: expect(page).to have_content(/#{user.name} (. )?@#{user.username} Given access/)
expected to find text matching /gitlab-qa-user1 (. )?@gitlab-qa-user1 Given access/ in "Skip to content Projects Groups Activity Milestones Snippets Analytics 2 99+ A add-member-project-67bea59586a8be0a Project Issues 0 Merge Requests 0 CI / CD Security & Compliance Operations Packages Wiki Snippets Settings General Members Integrations Repository CI / CD Operations Pages Audit Events Collapse sidebar gitlab-qa-sandbox-group qa-test-2019-08-18-04-25-22-856e21a7a1bc7e43 add-member-project-67bea59586a8be0a Members Users were successfully added. Project members You can invite a new member to add-member-project-67bea59586a8be0a or invite another group. Invite member Invite group Select members to invite Select members to invite Choose a role permission Guest Reporter Developer Maintainer Read more about role permissions Access expiration date Import Existing members and groups Members of add-member-project-67bea59586a8be0a 2 Sort by Name, ascending QA User (Quality Team's Test Account) @gitlab-qa It's you · gitlab-qa-sandbox-group / qa-test-2019-08-18-04-25-22-856e21a7a1bc7e43 Given access just now Owner QA User1 (Quality Team's Test Account) @gitlab-qa-user1 Given access just now Guest"
# ./qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb:22:in `block (3 levels) in <module:QA>'
Looks like the user's name has changed:
The fix could be to check only for the username, @gitlab-qa-user1
and the phrase Given access
, because we really only care that the user was added (whether or not the user's name is displayed correctly should be tested at a lower level).
On the other hand, the test uses Resource::User
to fetch the user's details from the API, so it should be able to fetch the correct name.