diff --git a/ee/spec/features/epics/update_epic_spec.rb b/ee/spec/features/epics/update_epic_spec.rb index 2f522dbd289c4cd32889aa4978229f5ddc98f6e3..ef4e282887b3e05eccf2e219965a07002c563d79 100644 --- a/ee/spec/features/epics/update_epic_spec.rb +++ b/ee/spec/features/epics/update_epic_spec.rb @@ -60,8 +60,7 @@ expect(find('.issuable-details .description')).to have_content('New epic description') end - it 'updates the epic and keep the description saved across reload', - quarantine: 'https://gitlab.com/gitlab-org/gitlab/-/issues/408227' do + it 'updates the epic and keep the description saved across reload' do fill_in 'issue-description', with: 'New epic description' page.within('.detail-page-description') do @@ -69,12 +68,10 @@ expect(find('.md-preview-holder')).to have_content('New epic description') end - visit group_epic_path(group, epic) - - # Deal with the beforeunload browser popup - page.driver.browser.switch_to.alert.accept + visit group_epic_path(group, epic) do + page.driver.browser.switch_to.alert.accept + end - wait_for_requests find('.js-issuable-edit').click page.within('.detail-page-description') do diff --git a/spec/support/capybara_wait_for_all_requests.rb b/spec/support/capybara_wait_for_all_requests.rb index 36b63619b0899db09b604a7ddc9cfd16a1a80361..9c74a1cab92d88a1f759dec197ddb41d34f3cc5e 100644 --- a/spec/support/capybara_wait_for_all_requests.rb +++ b/spec/support/capybara_wait_for_all_requests.rb @@ -9,9 +9,11 @@ module WaitForAllRequestsAfterVisitPage include CapybaraHelpers include WaitForRequests - def visit(visit_uri) + def visit(visit_uri, &block) super + yield if block + wait_for_all_requests end end