Failure in qa/specs/features/browser_ui/3_create/repository/user_views_raw_diff_patch_requests_spec.rb
https://gitlab.com/gitlab-org/quality/staging/-/jobs/148462901
1) Create Commit data user views raw email patch
Failure/Error: expect(page).to have_content("From: #{user.name} <#{user.email}>")
expected to find text "From: GitLab QA <gitlab-qa@example.com>" in "From 4b2bbcce47061995fd4e923805d871bde511ac56 Mon Sep 17 00:00:00 2001 From: GitLab QA <remy+gitlab-qa@gitlab.com> Date: Mon, 21 Jan 2019 04:38:58 +0000 Subject: [PATCH] Add second file --- second | 1 + 1 file changed, 1 insertion(+) create mode 100644 second diff --git a/second b/second new file mode 100644 index 0000000..df514d3 --- /dev/null +++ b/second @@ -0,0 +1 @@ +second file content \\ No newline at end of file -- 2.18.1"
# ./qa/specs/features/browser_ui/3_create/repository/user_views_raw_diff_patch_requests_spec.rb:50:in `block (3 levels) in <module:QA>
Looks like qa/resource/user.rb isn't fetching the email address via the API:
def email
@email ||= api_resource&.dig(:email) || "#{username}@example.com"
end
The API doesn't return an email address when accessed via /users/:id
, e.g.: https://staging.gitlab.com/api/v4/users/1614863
{
"id": 1614863,
"name": "GitLab QA",
"username": "gitlab-qa",
"state": "active",
"avatar_url": "https://secure.gravatar.com/avatar/48480c0b001eb59393471858151b0831?s=80\u0026d=identicon",
"web_url": "https://staging.gitlab.com/gitlab-qa",
"created_at": "2017-09-15T13:55:46.789Z",
"bio": "",
"location": "",
"public_email": "",
"skype": "",
"linkedin": "",
"twitter": "",
"website_url": "",
"organization": ""
}
But it does return the expected value when accessed via /user
:
{
"id": 1614863,
"name": "GitLab QA",
"username": "gitlab-qa",
"state": "active",
"avatar_url": "https://secure.gravatar.com/avatar/48480c0b001eb59393471858151b0831?s=80\u0026d=identicon",
"web_url": "https://staging.gitlab.com/gitlab-qa",
"created_at": "2017-09-15T13:55:46.789Z",
"bio": "",
"location": "",
"public_email": "",
"skype": "",
"linkedin": "",
"twitter": "",
"website_url": "",
"organization": "",
"last_sign_in_at": "2019-01-21T11:49:54.199Z",
"confirmed_at": "2017-09-15T13:56:38.793Z",
"last_activity_on": "2019-01-21",
"email": "remy+gitlab-qa@gitlab.com",
"theme_id": 1,
"color_scheme_id": 1,
"projects_limit": 100000,
"current_sign_in_at": "2019-01-21T12:05:10.475Z",
"identities": [],
"can_create_group": true,
"can_create_project": true,
"two_factor_enabled": false,
"external": false,
"private_profile": null,
"shared_runners_minutes_limit": null
}