Bump cucumber

parent a09f7d73
...@@ -280,7 +280,7 @@ group :test do ...@@ -280,7 +280,7 @@ group :test do
# Cucumber (integration tests) # Cucumber (integration tests)
gem "capybara", "2.18.0" gem "capybara", "3.11.1"
gem "database_cleaner", "1.7.0" gem "database_cleaner", "1.7.0"
gem "poltergeist", "1.18.1" gem "poltergeist", "1.18.1"
...@@ -304,7 +304,7 @@ group :development, :test do ...@@ -304,7 +304,7 @@ group :development, :test do
gem "rspec-rails", "3.8.1" gem "rspec-rails", "3.8.1"
# Cucumber (integration tests) # Cucumber (integration tests)
gem "cucumber-rails", "1.5.0", require: false gem "cucumber-rails", "1.6.0", require: false
# Jasmine (client side application tests (JS)) # Jasmine (client side application tests (JS))
gem "jasmine", "3.3.0" gem "jasmine", "3.3.0"
......
...@@ -63,6 +63,7 @@ GEM ...@@ -63,6 +63,7 @@ GEM
attr_required (1.0.1) attr_required (1.0.1)
autoprefixer-rails (8.6.5) autoprefixer-rails (8.6.5)
execjs execjs
backports (3.11.4)
bcrypt (3.1.12) bcrypt (3.1.12)
bindata (2.4.4) bindata (2.4.4)
bootstrap-sass (3.3.7) bootstrap-sass (3.3.7)
...@@ -72,13 +73,14 @@ GEM ...@@ -72,13 +73,14 @@ GEM
buftok (0.2.0) buftok (0.2.0)
builder (3.2.3) builder (3.2.3)
byebug (10.0.2) byebug (10.0.2)
capybara (2.18.0) capybara (3.11.1)
addressable addressable
mini_mime (>= 0.1.3) mini_mime (>= 0.1.3)
nokogiri (>= 1.3.3) nokogiri (~> 1.8)
rack (>= 1.0.0) rack (>= 1.6.0)
rack-test (>= 0.5.4) rack-test (>= 0.6.3)
xpath (>= 2.0, < 4.0) regexp_parser (~> 1.2)
xpath (~> 3.2)
carrierwave (1.2.3) carrierwave (1.2.3)
activemodel (>= 4.0.0) activemodel (>= 4.0.0)
activesupport (>= 4.0.0) activesupport (>= 4.0.0)
...@@ -135,25 +137,30 @@ GEM ...@@ -135,25 +137,30 @@ GEM
crack (0.4.3) crack (0.4.3)
safe_yaml (~> 1.0.0) safe_yaml (~> 1.0.0)
crass (1.0.4) crass (1.0.4)
cucumber (2.99.0) cucumber (3.1.2)
builder (>= 2.1.2) builder (>= 2.1.2)
cucumber-core (~> 1.5.0) cucumber-core (~> 3.2.0)
cucumber-expressions (~> 6.0.1)
cucumber-wire (~> 0.0.1) cucumber-wire (~> 0.0.1)
diff-lcs (>= 1.1.3) diff-lcs (~> 1.3)
gherkin (~> 4.0) gherkin (~> 5.1.0)
multi_json (>= 1.7.5, < 2.0) multi_json (>= 1.7.5, < 2.0)
multi_test (>= 0.1.2) multi_test (>= 0.1.2)
cucumber-api-steps (0.14.0) cucumber-api-steps (0.14.0)
cucumber (>= 2.0.2) cucumber (>= 2.0.2)
jsonpath (>= 0.1.2) jsonpath (>= 0.1.2)
cucumber-core (1.5.0) cucumber-core (3.2.1)
gherkin (~> 4.0) backports (>= 3.8.0)
cucumber-rails (1.5.0) cucumber-tag_expressions (~> 1.1.0)
capybara (>= 1.1.2, < 3) gherkin (~> 5.0)
cucumber (>= 1.3.8, < 4) cucumber-expressions (6.0.1)
cucumber-rails (1.6.0)
capybara (>= 1.1.2, < 4)
cucumber (>= 3.0.2, < 4)
mime-types (>= 1.17, < 4) mime-types (>= 1.17, < 4)
nokogiri (~> 1.5) nokogiri (~> 1.8)
railties (>= 4, < 5.2) railties (>= 4, < 6)
cucumber-tag_expressions (1.1.1)
cucumber-wire (0.0.1) cucumber-wire (0.0.1)
database_cleaner (1.7.0) database_cleaner (1.7.0)
devise (4.5.0) devise (4.5.0)
...@@ -246,7 +253,7 @@ GEM ...@@ -246,7 +253,7 @@ GEM
rspec-core (~> 3.0) rspec-core (~> 3.0)
ruby-progressbar (~> 1.4) ruby-progressbar (~> 1.4)
get_process_mem (0.2.3) get_process_mem (0.2.3)
gherkin (4.1.3) gherkin (5.1.0)
gitlab (4.7.0) gitlab (4.7.0)
httparty (>= 0.14.0) httparty (>= 0.14.0)
terminal-table (>= 1.5.1) terminal-table (>= 1.5.1)
...@@ -583,6 +590,7 @@ GEM ...@@ -583,6 +590,7 @@ GEM
ffi (>= 0.5.0, < 2) ffi (>= 0.5.0, < 2)
redcarpet (3.4.0) redcarpet (3.4.0)
redis (3.3.5) redis (3.3.5)
regexp_parser (1.3.0)
request_store (1.4.1) request_store (1.4.1)
rack (>= 1.4) rack (>= 1.4)
responders (2.4.0) responders (2.4.0)
...@@ -764,13 +772,13 @@ DEPENDENCIES ...@@ -764,13 +772,13 @@ DEPENDENCIES
autoprefixer-rails (= 8.6.5) autoprefixer-rails (= 8.6.5)
bootstrap-sass (= 3.3.7) bootstrap-sass (= 3.3.7)
bootstrap-switch-rails (= 3.3.4) bootstrap-switch-rails (= 3.3.4)
capybara (= 2.18.0) capybara (= 3.11.1)
carrierwave (= 1.2.3) carrierwave (= 1.2.3)
compass-rails (= 3.1.0) compass-rails (= 3.1.0)
configurate (= 0.3.1) configurate (= 0.3.1)
coveralls (= 0.8.22) coveralls (= 0.8.22)
cucumber-api-steps (= 0.14) cucumber-api-steps (= 0.14)
cucumber-rails (= 1.5.0) cucumber-rails (= 1.6.0)
database_cleaner (= 1.7.0) database_cleaner (= 1.7.0)
devise (= 4.5.0) devise (= 4.5.0)
devise_lastseenable (= 0.0.6) devise_lastseenable (= 0.0.6)
......
...@@ -4,14 +4,14 @@ format = ENV['CUCUMBER_FORMAT'] || 'pretty' ...@@ -4,14 +4,14 @@ format = ENV['CUCUMBER_FORMAT'] || 'pretty'
# option lists for the `cucumber` command # option lists for the `cucumber` command
rerun_opts = rerun.to_s.strip.empty? ? "--format #{format} features" : "--format #{format} #{rerun}" rerun_opts = rerun.to_s.strip.empty? ? "--format #{format} features" : "--format #{format} #{rerun}"
std_opts = "--format #{format} --strict --tags ~@wip --tags ~@screenshots" std_opts = "--format #{format} --strict --tags 'not @wip and not @screenshots'"
screenshot_opts = "--require features --format pretty" screenshot_opts = "--require features --format pretty"
%> %>
# 'normal' test runs # 'normal' test runs
default: <%= std_opts %> -r features --tags ~@nophantomjs default: <%= std_opts %> -r features --tags 'not @nophantomjs'
wip: -r features --tags @wip:3 --wip features wip: -r features --tags @wip:3 --wip features
rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags ~@wip --tags ~@screenshots rerun: <%= rerun_opts %> --format rerun --out rerun.txt --strict --tags 'not @wip and not @screenshots'
# screenshot feature # screenshot feature
ref_screens: "<%= screenshot_opts %> --tags @reference-screenshots" ref_screens: "<%= screenshot_opts %> --tags @reference-screenshots"
......
...@@ -33,7 +33,7 @@ Feature: posting with a poll ...@@ -33,7 +33,7 @@ Feature: posting with a poll
And I fill in values for the first two options And I fill in values for the first two options
And I lose focus And I lose focus
And I delete the last option And I delete the last option
Then I should see 2 option Then I should see 2 options
And I should not see a remove icon And I should not see a remove icon
Scenario: post with an attached poll Scenario: post with an attached poll
......
...@@ -138,7 +138,7 @@ Feature: Navigate between pages using the header menu and the drawer ...@@ -138,7 +138,7 @@ Feature: Navigate between pages using the header menu and the drawer
Then I should see "Reports overview" within "#main h1" Then I should see "Reports overview" within "#main h1"
When I click on "Admin" in the drawer When I click on "Admin" in the drawer
And I click on "Pod network" in the drawer And I click on "Pod network" in the drawer
Then I should see "Pod network " within "#main h2" Then I should see "Pod network" within "#main h2"
When I click on "Admin" in the drawer When I click on "Admin" in the drawer
Then I should see "Sidekiq monitor" within "#drawer" Then I should see "Sidekiq monitor" within "#drawer"
......
...@@ -19,7 +19,7 @@ module AspectCukeHelpers ...@@ -19,7 +19,7 @@ module AspectCukeHelpers
def toggle_aspect_via_ui(aspect_name) def toggle_aspect_via_ui(aspect_name)
aspects_dropdown = find(".aspect-membership-dropdown .dropdown-toggle", match: :first) aspects_dropdown = find(".aspect-membership-dropdown .dropdown-toggle", match: :first)
aspects_dropdown.trigger "click" aspects_dropdown.trigger "click"
selected_aspect_count = all(".aspect-membership-dropdown.open .dropdown-menu li.selected").length selected_aspect_count = all(".aspect-membership-dropdown.open .dropdown-menu li.selected", wait: false).length
aspect = find(".aspect-membership-dropdown.open .dropdown-menu li", text: aspect_name) aspect = find(".aspect-membership-dropdown.open .dropdown-menu li", text: aspect_name)
aspect_selected = aspect["class"].include? "selected" aspect_selected = aspect["class"].include? "selected"
aspect.trigger "click" aspect.trigger "click"
...@@ -50,7 +50,7 @@ When /^I select only "([^"]*)" aspect$/ do |aspect_name| ...@@ -50,7 +50,7 @@ When /^I select only "([^"]*)" aspect$/ do |aspect_name|
click_link "My aspects" click_link "My aspects"
expect(find("#aspect-stream-container")).to have_css(".loader.hidden", visible: false) expect(find("#aspect-stream-container")).to have_css(".loader.hidden", visible: false)
within("#aspects_list") do within("#aspects_list") do
all(".selected").each do |node| all(".selected", wait: false).each do |node|
aspect_item = node.find(:xpath, "..") aspect_item = node.find(:xpath, "..")
aspect_item.click aspect_item.click
expect(aspect_item).to have_no_css ".selected" expect(aspect_item).to have_no_css ".selected"
...@@ -76,14 +76,14 @@ end ...@@ -76,14 +76,14 @@ end
When /^I add the first person to the aspect$/ do When /^I add the first person to the aspect$/ do
find(".contact_add-to-aspect", match: :first).tap do |button| find(".contact_add-to-aspect", match: :first).tap do |button|
button.click button.click
button.parent.should have_css ".contact_remove-from-aspect" button.query_scope.should have_css ".contact_remove-from-aspect"
end end
end end
When /^I remove the first person from the aspect$/ do When /^I remove the first person from the aspect$/ do
find(".contact_remove-from-aspect", match: :first).tap do |button| find(".contact_remove-from-aspect", match: :first).tap do |button|
button.click button.click
button.parent.should have_css ".contact_add-to-aspect" button.query_scope.should have_css ".contact_add-to-aspect"
sleep 1 # The expectation above should wait for the request to finsh, but that doesn't work for some reason sleep 1 # The expectation above should wait for the request to finsh, but that doesn't work for some reason
end end
end end
......
# frozen_string_literal: true # frozen_string_literal: true
Then /^I should see ([1-9]+) options?$/ do |number| Then "I should see {int} options" do |number|
find("#poll_creator_container").all(".poll-answer").count.should eql(number.to_i) find("#poll_creator_container").all(".poll-answer", count: number)
end end
And /^I delete the last option$/ do And /^I delete the last option$/ do
......
...@@ -24,6 +24,8 @@ Capybara.server_port = AppConfig.pod_uri.port ...@@ -24,6 +24,8 @@ Capybara.server_port = AppConfig.pod_uri.port
Rails.application.routes.default_url_options[:host] = AppConfig.pod_uri.host Rails.application.routes.default_url_options[:host] = AppConfig.pod_uri.host
Rails.application.routes.default_url_options[:port] = AppConfig.pod_uri.port Rails.application.routes.default_url_options[:port] = AppConfig.pod_uri.port
Capybara.server = :webrick
Capybara.register_driver :poltergeist do |app| Capybara.register_driver :poltergeist do |app|
Capybara::Poltergeist::Driver.new(app, timeout: 30) Capybara::Poltergeist::Driver.new(app, timeout: 30)
end end
......
...@@ -27,7 +27,7 @@ module PublishingCukeHelpers ...@@ -27,7 +27,7 @@ module PublishingCukeHelpers
end end
def visible_text_from_markdown(text) def visible_text_from_markdown(text)
CGI.unescapeHTML(ActionController::Base.helpers.strip_tags(Diaspora::MessageRenderer.new(text).markdownified.strip)) CGI.unescapeHTML(ActionController::Base.helpers.strip_tags(Diaspora::MessageRenderer.new(text).markdownified)).strip
end end
def submit_publisher def submit_publisher
......
...@@ -49,7 +49,7 @@ module UserCukeHelpers ...@@ -49,7 +49,7 @@ module UserCukeHelpers
if mobile if mobile
expect(page).to have_css "#menu-badge" expect(page).to have_css "#menu-badge"
else else
expect(find("#user-menu")).to have_content "#{@me.first_name} #{@me.last_name}" expect(find("#user-menu")).to have_content "#{@me.first_name} #{@me.last_name}".strip
end end
end end
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment