diff options
author | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-04-26 18:51:05 +0300 |
---|---|---|
committer | Heinrich Lee Yu <heinrich@gitlab.com> | 2019-06-12 13:40:18 +0300 |
commit | 96ed5a8bd78f90b0c7a8b044c4bd99e3af46dd71 (patch) | |
tree | df517f916e5bfcbf1420c092ebf55ac3e1bab5ee /spec/support | |
parent | 06e89d786c4ac67d9262c576b9aadb7d40dee9c2 (diff) |
Upgrade to Capybara 3
Fix whitespace in specs because normalize_ws is slightly
different from Capybara 2 behavior
Diffstat (limited to 'spec/support')
4 files changed, 5 insertions, 3 deletions
diff --git a/spec/support/capybara.rb b/spec/support/capybara.rb index 14ce3c32e77..56ac208a025 100644 --- a/spec/support/capybara.rb +++ b/spec/support/capybara.rb @@ -53,9 +53,11 @@ Capybara.register_driver :chrome do |app| ) end +Capybara.server = :webrick Capybara.javascript_driver = :chrome Capybara.default_max_wait_time = timeout Capybara.ignore_hidden_elements = true +Capybara.default_normalize_ws = true # Keep only the screenshots generated from the last failing test suite Capybara::Screenshot.prune_strategy = :keep_last_run diff --git a/spec/support/features/discussion_comments_shared_example.rb b/spec/support/features/discussion_comments_shared_example.rb index 542f533d590..0f8af2c5d6d 100644 --- a/spec/support/features/discussion_comments_shared_example.rb +++ b/spec/support/features/discussion_comments_shared_example.rb @@ -84,7 +84,7 @@ shared_examples 'discussion comments' do |resource_name| # # if dropdown menu is not toggled (and also not present), # it's "issue-type" dropdown - if first(menu_selector).nil? + if first(menu_selector, minimum: 0).nil? expect(find(dropdown_selector)).to have_content 'Comment' find(toggle_selector).click diff --git a/spec/support/shared_examples/quick_actions/issuable/shrug_quick_action_shared_examples.rb b/spec/support/shared_examples/quick_actions/issuable/shrug_quick_action_shared_examples.rb index 0a526808585..b592cf16f67 100644 --- a/spec/support/shared_examples/quick_actions/issuable/shrug_quick_action_shared_examples.rb +++ b/spec/support/shared_examples/quick_actions/issuable/shrug_quick_action_shared_examples.rb @@ -27,7 +27,7 @@ shared_examples 'shrug quick action' do |issuable_type| expect(issuable.description).to eq "bug description\noops ¯\\_(ツ)_/¯" expect(page).to have_content 'bug 345' - expect(page).to have_content "bug description\noops ¯\\_(ツ)_/¯" + expect(page).to have_content "bug description oops ¯\\_(ツ)_/¯" end end diff --git a/spec/support/shared_examples/quick_actions/issuable/tableflip_quick_action_shared_examples.rb b/spec/support/shared_examples/quick_actions/issuable/tableflip_quick_action_shared_examples.rb index ef831e39872..c174127c4ff 100644 --- a/spec/support/shared_examples/quick_actions/issuable/tableflip_quick_action_shared_examples.rb +++ b/spec/support/shared_examples/quick_actions/issuable/tableflip_quick_action_shared_examples.rb @@ -27,7 +27,7 @@ shared_examples 'tableflip quick action' do |issuable_type| expect(issuable.description).to eq "bug description\noops (╯°□°)╯︵ ┻━┻" expect(page).to have_content 'bug 345' - expect(page).to have_content "bug description\noops (╯°□°)╯︵ ┻━┻" + expect(page).to have_content "bug description oops (╯°□°)╯︵ ┻━┻" end end |