summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McGivern <sean@gitlab.com>2019-05-14 12:47:37 +0000
committerSean McGivern <sean@gitlab.com>2019-05-14 12:47:37 +0000
commit0c63ad850af1fe19eeae5778f984030d28617dda (patch)
tree9a0079e8254760ceaa5b3116549bbcaa2952bf8d
parentb02fca968445e0828fc76bec689ab3d4f3755e07 (diff)
parent99f06bc8589cf65012898ca5b32328613d5bd602 (diff)
downloadgitlab-ce-0c63ad850af1fe19eeae5778f984030d28617dda.tar.gz
Merge branch 'fix-slow-preview-note-specs' into 'master'
Fix hiding of quick action prompt in specs See merge request gitlab-org/gitlab-ce!28285
-rw-r--r--spec/support/helpers/features/notes_helpers.rb10
1 files changed, 4 insertions, 6 deletions
diff --git a/spec/support/helpers/features/notes_helpers.rb b/spec/support/helpers/features/notes_helpers.rb
index 38f30a14409..8a139fafac2 100644
--- a/spec/support/helpers/features/notes_helpers.rb
+++ b/spec/support/helpers/features/notes_helpers.rb
@@ -25,12 +25,10 @@ module Spec
page.within('.js-main-target-form') do
filled_text = fill_in('note[note]', with: text)
- begin
- # Dismiss quick action prompt if it appears
- filled_text.parent.send_keys(:escape)
- rescue Selenium::WebDriver::Error::ElementNotInteractableError
- # It's fine if we can't escape when there's no prompt.
- end
+ # Wait for quick action prompt to load and then dismiss it with ESC
+ # because it may block the Preview button
+ wait_for_requests
+ filled_text.send_keys(:escape)
click_on('Preview')