Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
08216066
Commit
08216066
authored
Jul 17, 2020
by
Lin Jen-Shin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Log more information about the inbox while waiting
parent
5059c8bd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
2 deletions
+13
-2
qa/qa/specs/features/browser_ui/2_plan/email/trigger_email_notification_spec.rb
...rowser_ui/2_plan/email/trigger_email_notification_spec.rb
+13
-2
No files found.
qa/qa/specs/features/browser_ui/2_plan/email/trigger_email_notification_spec.rb
View file @
08216066
...
...
@@ -26,7 +26,7 @@ module QA
mailhog_items
=
mailhog_json
.
dig
(
'items'
)
expect
(
mailhog_items
).
to
include
(
an_object_satisfying
{
|
o
|
/project was granted/
===
o
.
dig
(
'Content'
,
'Headers'
,
'Subject'
,
0
)
})
expect
(
mailhog_items
).
to
include
(
an_object_satisfying
{
|
o
|
/project was granted/
===
mailhog_item_subject
(
o
)
})
end
private
...
...
@@ -38,11 +38,22 @@ module QA
mailhog_response
=
get
QA
::
Runtime
::
MailHog
.
api_messages_url
mailhog_data
=
JSON
.
parse
(
mailhog_response
.
body
)
total
=
mailhog_data
.
dig
(
'total'
)
subjects
=
mailhog_data
.
dig
(
'items'
)
.
map
(
&
method
(
:mailhog_item_subject
))
.
join
(
"
\n
"
)
Runtime
::
Logger
.
debug
(
%Q[Total number of emails:
#{
total
}
]
)
Runtime
::
Logger
.
debug
(
%Q[Subjects:
\n
#{
subjects
}
]
)
# Expect at least two invitation messages: group and project
mailhog_data
if
mailhog_data
.
dig
(
'total'
)
>=
2
mailhog_data
if
total
>=
2
end
end
def
mailhog_item_subject
(
item
)
item
.
dig
(
'Content'
,
'Headers'
,
'Subject'
,
0
)
end
end
end
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment