Fix alerts feature specs to work with the super sidebar
What does this MR do and why?
This updates alerts feature specs to pass when the super sidebar is enabled.
Also fixes a bug where the right sidebar would be partially hidden on page load due to the breadcrumbs not taking it into account.
Screenshots or screen recordings
Before | After |
---|---|
How to set up and validate locally
bundle exec rspec spec/features/alert_management/alert_details_spec.rb
bundle exec rspec spec/features/alert_management/alert_management_list_spec.rb
To verify the bug fix, visit an alert's details page if you have the feature set up. Otherwise, this can be verified via the feature spec itself:
- Add
binding.pry
to a test case:diff --git a/spec/features/alert_management/alert_details_spec.rb b/spec/features/alert_management/alert_details_spec.rb index 7fa9bccbecef..e51985b02b0e 100644 --- a/spec/features/alert_management/alert_details_spec.rb +++ b/spec/features/alert_management/alert_details_spec.rb @@ -46,6 +46,7 @@ end it 'updates the alert todo button from the right sidebar' do + binding.pry expect(page).to have_selector('[data-testid="alert-todo-button"]') todo_button = find('[data-testid="alert-todo-button"]')
- Run the spec in headful mode:
WEBDRIVER_HEADLESS=0 bundle exec spring rspec spec/features/alert_management/alert_details_spec.rb:48
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Related to #420121 (closed)
Edited by Paul Gascou-Vaillancourt