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
f6598ae4
Commit
f6598ae4
authored
Dec 17, 2019
by
Desiree Chevalier
Committed by
Walmyr Lima e Silva Filho
Dec 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Wait for audit event in group audit logs spec
parent
b745647f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
0 deletions
+23
-0
qa/qa/specs/features/ee/browser_ui/1_manage/group/group_audit_logs_1_spec.rb
...s/ee/browser_ui/1_manage/group/group_audit_logs_1_spec.rb
+23
-0
No files found.
qa/qa/specs/features/ee/browser_ui/1_manage/group/group_audit_logs_1_spec.rb
View file @
f6598ae4
...
...
@@ -3,8 +3,14 @@ require 'securerandom'
module
QA
context
'Manage'
do
include
Support
::
Api
let
(
:api_client
)
{
Runtime
::
API
::
Client
.
new
(
:gitlab
)
}
shared_examples
'group audit event logs'
do
|
expected_events
|
it
'logs audit events'
do
wait_for_audit_events
(
expected_events
)
Page
::
Group
::
Menu
.
perform
(
&
:go_to_audit_events_settings
)
expected_events
.
each
do
|
expected_event
|
expect
(
page
).
to
have_text
(
expected_event
)
...
...
@@ -19,6 +25,10 @@ module QA
end
end
before
do
@event_count
=
get_audit_event_count
end
let
(
:project
)
do
Resource
::
Project
.
fabricate_via_api!
do
|
resource
|
resource
.
name
=
'project-shared-with-group'
...
...
@@ -110,5 +120,18 @@ module QA
end
end
end
def
get_audit_event_count
response
=
get
Runtime
::
API
::
Request
.
new
(
api_client
,
"/groups/
#{
@group
.
id
}
/audit_events"
).
url
parse_body
(
response
).
length
end
def
wait_for_audit_events
(
expected_events
)
new_event_count
=
@event_count
+
expected_events
.
length
Support
::
Retrier
.
retry_until
(
sleep_interval:
1
)
do
get_audit_event_count
==
new_event_count
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