Bump cucumber
This commit is contained in:
parent
a09f7d73d8
commit
7a958bce69
10 changed files with 44 additions and 34 deletions
4
Gemfile
4
Gemfile
|
|
@ -280,7 +280,7 @@ group :test do
|
|||
|
||||
# Cucumber (integration tests)
|
||||
|
||||
gem "capybara", "2.18.0"
|
||||
gem "capybara", "3.11.1"
|
||||
gem "database_cleaner", "1.7.0"
|
||||
gem "poltergeist", "1.18.1"
|
||||
|
||||
|
|
@ -304,7 +304,7 @@ group :development, :test do
|
|||
gem "rspec-rails", "3.8.1"
|
||||
|
||||
# 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))
|
||||
gem "jasmine", "3.3.0"
|
||||
|
|
|
|||
46
Gemfile.lock
46
Gemfile.lock
|
|
@ -63,6 +63,7 @@ GEM
|
|||
attr_required (1.0.1)
|
||||
autoprefixer-rails (8.6.5)
|
||||
execjs
|
||||
backports (3.11.4)
|
||||
bcrypt (3.1.12)
|
||||
bindata (2.4.4)
|
||||
bootstrap-sass (3.3.7)
|
||||
|
|
@ -72,13 +73,14 @@ GEM
|
|||
buftok (0.2.0)
|
||||
builder (3.2.3)
|
||||
byebug (10.0.2)
|
||||
capybara (2.18.0)
|
||||
capybara (3.11.1)
|
||||
addressable
|
||||
mini_mime (>= 0.1.3)
|
||||
nokogiri (>= 1.3.3)
|
||||
rack (>= 1.0.0)
|
||||
rack-test (>= 0.5.4)
|
||||
xpath (>= 2.0, < 4.0)
|
||||
nokogiri (~> 1.8)
|
||||
rack (>= 1.6.0)
|
||||
rack-test (>= 0.6.3)
|
||||
regexp_parser (~> 1.2)
|
||||
xpath (~> 3.2)
|
||||
carrierwave (1.2.3)
|
||||
activemodel (>= 4.0.0)
|
||||
activesupport (>= 4.0.0)
|
||||
|
|
@ -135,25 +137,30 @@ GEM
|
|||
crack (0.4.3)
|
||||
safe_yaml (~> 1.0.0)
|
||||
crass (1.0.4)
|
||||
cucumber (2.99.0)
|
||||
cucumber (3.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)
|
||||
diff-lcs (>= 1.1.3)
|
||||
gherkin (~> 4.0)
|
||||
diff-lcs (~> 1.3)
|
||||
gherkin (~> 5.1.0)
|
||||
multi_json (>= 1.7.5, < 2.0)
|
||||
multi_test (>= 0.1.2)
|
||||
cucumber-api-steps (0.14.0)
|
||||
cucumber (>= 2.0.2)
|
||||
jsonpath (>= 0.1.2)
|
||||
cucumber-core (1.5.0)
|
||||
gherkin (~> 4.0)
|
||||
cucumber-rails (1.5.0)
|
||||
capybara (>= 1.1.2, < 3)
|
||||
cucumber (>= 1.3.8, < 4)
|
||||
cucumber-core (3.2.1)
|
||||
backports (>= 3.8.0)
|
||||
cucumber-tag_expressions (~> 1.1.0)
|
||||
gherkin (~> 5.0)
|
||||
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)
|
||||
nokogiri (~> 1.5)
|
||||
railties (>= 4, < 5.2)
|
||||
nokogiri (~> 1.8)
|
||||
railties (>= 4, < 6)
|
||||
cucumber-tag_expressions (1.1.1)
|
||||
cucumber-wire (0.0.1)
|
||||
database_cleaner (1.7.0)
|
||||
devise (4.5.0)
|
||||
|
|
@ -246,7 +253,7 @@ GEM
|
|||
rspec-core (~> 3.0)
|
||||
ruby-progressbar (~> 1.4)
|
||||
get_process_mem (0.2.3)
|
||||
gherkin (4.1.3)
|
||||
gherkin (5.1.0)
|
||||
gitlab (4.7.0)
|
||||
httparty (>= 0.14.0)
|
||||
terminal-table (>= 1.5.1)
|
||||
|
|
@ -583,6 +590,7 @@ GEM
|
|||
ffi (>= 0.5.0, < 2)
|
||||
redcarpet (3.4.0)
|
||||
redis (3.3.5)
|
||||
regexp_parser (1.3.0)
|
||||
request_store (1.4.1)
|
||||
rack (>= 1.4)
|
||||
responders (2.4.0)
|
||||
|
|
@ -764,13 +772,13 @@ DEPENDENCIES
|
|||
autoprefixer-rails (= 8.6.5)
|
||||
bootstrap-sass (= 3.3.7)
|
||||
bootstrap-switch-rails (= 3.3.4)
|
||||
capybara (= 2.18.0)
|
||||
capybara (= 3.11.1)
|
||||
carrierwave (= 1.2.3)
|
||||
compass-rails (= 3.1.0)
|
||||
configurate (= 0.3.1)
|
||||
coveralls (= 0.8.22)
|
||||
cucumber-api-steps (= 0.14)
|
||||
cucumber-rails (= 1.5.0)
|
||||
cucumber-rails (= 1.6.0)
|
||||
database_cleaner (= 1.7.0)
|
||||
devise (= 4.5.0)
|
||||
devise_lastseenable (= 0.0.6)
|
||||
|
|
|
|||
|
|
@ -4,14 +4,14 @@ format = ENV['CUCUMBER_FORMAT'] || 'pretty'
|
|||
|
||||
# option lists for the `cucumber` command
|
||||
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"
|
||||
%>
|
||||
|
||||
# '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
|
||||
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
|
||||
ref_screens: "<%= screenshot_opts %> --tags @reference-screenshots"
|
||||
|
|
|
|||
|
|
@ -33,7 +33,7 @@ Feature: posting with a poll
|
|||
And I fill in values for the first two options
|
||||
And I lose focus
|
||||
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
|
||||
|
||||
Scenario: post with an attached poll
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ Feature: Navigate between pages using the header menu and the drawer
|
|||
Then I should see "Reports overview" within "#main h1"
|
||||
When I click on "Admin" 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
|
||||
Then I should see "Sidekiq monitor" within "#drawer"
|
||||
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ module AspectCukeHelpers
|
|||
def toggle_aspect_via_ui(aspect_name)
|
||||
aspects_dropdown = find(".aspect-membership-dropdown .dropdown-toggle", match: :first)
|
||||
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_selected = aspect["class"].include? "selected"
|
||||
aspect.trigger "click"
|
||||
|
|
@ -50,7 +50,7 @@ When /^I select only "([^"]*)" aspect$/ do |aspect_name|
|
|||
click_link "My aspects"
|
||||
expect(find("#aspect-stream-container")).to have_css(".loader.hidden", visible: false)
|
||||
within("#aspects_list") do
|
||||
all(".selected").each do |node|
|
||||
all(".selected", wait: false).each do |node|
|
||||
aspect_item = node.find(:xpath, "..")
|
||||
aspect_item.click
|
||||
expect(aspect_item).to have_no_css ".selected"
|
||||
|
|
@ -76,14 +76,14 @@ end
|
|||
When /^I add the first person to the aspect$/ do
|
||||
find(".contact_add-to-aspect", match: :first).tap do |button|
|
||||
button.click
|
||||
button.parent.should have_css ".contact_remove-from-aspect"
|
||||
button.query_scope.should have_css ".contact_remove-from-aspect"
|
||||
end
|
||||
end
|
||||
|
||||
When /^I remove the first person from the aspect$/ do
|
||||
find(".contact_remove-from-aspect", match: :first).tap do |button|
|
||||
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
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
Then /^I should see ([1-9]+) options?$/ do |number|
|
||||
find("#poll_creator_container").all(".poll-answer").count.should eql(number.to_i)
|
||||
Then "I should see {int} options" do |number|
|
||||
find("#poll_creator_container").all(".poll-answer", count: number)
|
||||
end
|
||||
|
||||
And /^I delete the last option$/ do
|
||||
|
|
|
|||
|
|
@ -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[:port] = AppConfig.pod_uri.port
|
||||
|
||||
Capybara.server = :webrick
|
||||
|
||||
Capybara.register_driver :poltergeist do |app|
|
||||
Capybara::Poltergeist::Driver.new(app, timeout: 30)
|
||||
end
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ module PublishingCukeHelpers
|
|||
end
|
||||
|
||||
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
|
||||
|
||||
def submit_publisher
|
||||
|
|
|
|||
|
|
@ -49,7 +49,7 @@ module UserCukeHelpers
|
|||
if mobile
|
||||
expect(page).to have_css "#menu-badge"
|
||||
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
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue