Enable ee/browser_ui/1_manage/instance/instance_audit_logs_spec.rb on staging
These tests are currently disabled for live environments with skip_live_env
tag.
Because of too much activity happening on staging, the first page for the logs get filled too quickly before the test reaches it and checks for the expected entries.
There are a few options I can think of to make these tests work on staging/live environments:
- Create and use a new user that would only be used in this test. Then filter the logs by "User Events".
Unfortunately, code for filtering the search is in the Gitlab/UI project
For filtering the logs by a user:
audit_log_page.find_element(:admin_audit_log_filter).click
audit_log_page.find_element(:admin_audit_log_filter).find('.gl-filtered-search-suggestion-list').find('div', text: "User Events").click
audit_log_page.find_element(:admin_audit_log_filter).find('.gl-filtered-search-token-segment-input').set "sliaquat"
audit_log_page.find_element(:admin_audit_log_filter).find('.gl-filtered-search-suggestion-list').find('li', text: "sliaquat").click
audit_log_page.find_element(:admin_audit_log_filter).find('.gl-filtered-search-term-token').click
audit_log_page.find_element(:admin_audit_log_filter).find('input.gl-filtered-search-token-segment-input').send_keys(:enter)
- Fetch all the
admin_audit_log_table
data for a few pages (all pages for the current date?) and check the results in there for the user.
Edited by Sanad Liaquat