Switch from apparition to cuprite driver
Apparition4 isn't really maintained anymore and there are no new releases and it always logs a lot of errors, making the output hard to read. So lets switch to cuprite, as it also supports everything we need and is still maintained. Supersedes #8330
This commit is contained in:
parent
ce32a7d16b
commit
5425f5cfa6
11 changed files with 25 additions and 24 deletions
2
Gemfile
2
Gemfile
|
|
@ -224,8 +224,8 @@ group :test do
|
|||
|
||||
# Cucumber (integration tests)
|
||||
|
||||
gem "apparition", "0.6.0"
|
||||
gem "capybara", "3.35.3"
|
||||
gem "cuprite", "0.14.3"
|
||||
gem "database_cleaner-active_record", "2.0.1"
|
||||
|
||||
gem "cucumber-api-steps", "0.14", require: false
|
||||
|
|
|
|||
13
Gemfile.lock
13
Gemfile.lock
|
|
@ -74,9 +74,6 @@ GEM
|
|||
addressable (2.8.0)
|
||||
public_suffix (>= 2.0.2, < 5.0)
|
||||
aes_key_wrap (1.1.0)
|
||||
apparition (0.6.0)
|
||||
capybara (~> 3.13, < 4)
|
||||
websocket-driver (>= 0.6.5)
|
||||
asset_sync (2.15.2)
|
||||
activemodel (>= 4.1.0)
|
||||
fog-core
|
||||
|
|
@ -190,6 +187,9 @@ GEM
|
|||
cucumber-wire (6.2.1)
|
||||
cucumber-core (~> 10.1, >= 10.1.0)
|
||||
cucumber-cucumber-expressions (~> 14.0, >= 14.0.0)
|
||||
cuprite (0.14.3)
|
||||
capybara (~> 3.0)
|
||||
ferrum (~> 0.13.0)
|
||||
database_cleaner-active_record (2.0.1)
|
||||
activerecord (>= 5.a)
|
||||
database_cleaner-core (~> 2.0.0)
|
||||
|
|
@ -280,6 +280,11 @@ GEM
|
|||
faraday-patron (1.0.0)
|
||||
faraday-rack (1.0.0)
|
||||
faraday-retry (1.0.3)
|
||||
ferrum (0.13)
|
||||
addressable (~> 2.5)
|
||||
concurrent-ruby (~> 1.1)
|
||||
webrick (~> 1.7)
|
||||
websocket-driver (>= 0.6, < 0.8)
|
||||
ffi (1.15.5)
|
||||
ffi-compiler (1.0.1)
|
||||
ffi (>= 1.0.0)
|
||||
|
|
@ -773,7 +778,6 @@ DEPENDENCIES
|
|||
acts-as-taggable-on (= 9.0.1)
|
||||
acts_as_api (= 1.0.1)
|
||||
addressable (= 2.8.0)
|
||||
apparition (= 0.6.0)
|
||||
asset_sync (= 2.15.2)
|
||||
autoprefixer-rails (= 10.4.7.0)
|
||||
babel-transpiler (= 0.7.0)
|
||||
|
|
@ -785,6 +789,7 @@ DEPENDENCIES
|
|||
configurate (= 0.5.0)
|
||||
cucumber-api-steps (= 0.14)
|
||||
cucumber-rails (= 2.5.1)
|
||||
cuprite (= 0.14.3)
|
||||
database_cleaner-active_record (= 2.0.1)
|
||||
devise (= 4.8.1)
|
||||
devise-two-factor (= 4.0.2)
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ Feature: auto follow back a user
|
|||
Scenario: When a user with auto follow back enabled is shared with by a user he's ignoring, he's not sharing back
|
||||
When I sign in as "bob@bob.bob"
|
||||
And I am on "alice@alice.alice"'s page
|
||||
And I click on the profile block button
|
||||
And I confirm the alert after I click on the profile block button
|
||||
And I sign out
|
||||
When I sign in as "alice@alice.alice"
|
||||
And I am on "bob@bob.bob"'s page
|
||||
|
|
|
|||
|
|
@ -60,7 +60,7 @@ Feature: private conversations
|
|||
When I sign in as "bob@bob.bob"
|
||||
And I send a message with subject "Greetings" and text "hello, alice!" to "Alice Awesome"
|
||||
Then I should see "Greetings" within "#conversation-inbox"
|
||||
When I click on selector ".hide_conversation"
|
||||
When I confirm the prompt after I click on selector ".hide_conversation"
|
||||
Then I should not see "Greetings" within "#conversation-inbox"
|
||||
When I sign in as "alice@alice.alice"
|
||||
Then I should have 1 unread private message
|
||||
|
|
|
|||
|
|
@ -52,8 +52,8 @@ Feature: Mentions
|
|||
And I click on the first user in the mentions dropdown list
|
||||
And I press "Share"
|
||||
Then I should see "Bob Jones" within ".stream-element"
|
||||
When I follow "Bob Jones"
|
||||
Then I should see "Bob Jones"
|
||||
When I follow "Bob Jones" within ".stream-element"
|
||||
Then I should see "Bob Jones" within "#author_info"
|
||||
|
||||
Scenario: A user mentions another user in a comment and it displays correctly
|
||||
Given following users exist:
|
||||
|
|
|
|||
|
|
@ -87,7 +87,6 @@ Feature: posting with a poll
|
|||
| poll_question | What kind of yogurt do you like? |
|
||||
And I fill in the following for the options:
|
||||
| normal |
|
||||
| |
|
||||
And I click on selector "#poll_creator_container"
|
||||
And I click on selector "#publisher button#submit"
|
||||
Then I should see an element ".poll-answer input.error"
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ Feature: editing the profile in the mobile view
|
|||
And I should see "#starwars" within "ul#as-selections-tags"
|
||||
|
||||
When I accept the alert after I attach the file "spec/fixtures/bad_urls.txt" to "qqfile" within "#file-upload"
|
||||
And I attach the file "spec/fixtures/button.png" to hidden "qqfile" within "#file-upload"
|
||||
And I confirm the prompt after I attach the file "spec/fixtures/button.png" to hidden "qqfile" within "#file-upload"
|
||||
Then I should see "button.png completed"
|
||||
And I should see a "img" within "#profile_photo_upload"
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ Feature: editing the getting started in the mobile view
|
|||
|
||||
Scenario: new user adds a profile photo and tags
|
||||
When I accept the alert after I attach the file "spec/fixtures/bad_urls.txt" to "qqfile" within "#file-upload"
|
||||
And I attach the file "spec/fixtures/button.png" to hidden "qqfile" within "#file-upload"
|
||||
And I confirm the prompt after I attach the file "spec/fixtures/button.png" to hidden "qqfile" within "#file-upload"
|
||||
Then I should see a "img" within "#profile_photo_upload"
|
||||
|
||||
When I fill in "follow_tags" with "#men"
|
||||
|
|
|
|||
|
|
@ -22,7 +22,6 @@ Given /^I send a post request from that client to the code flow authorization en
|
|||
end
|
||||
|
||||
When /^I parse the auth code and create a request to the token endpoint$/ do
|
||||
current_url = page.driver.network_traffic.last.url # We get a redirect to example.org that we can't follow
|
||||
code = current_url[/(?<=code=)[^&]+/]
|
||||
expect(code).to be_present
|
||||
post api_openid_connect_access_tokens_path, code: code,
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ require "cucumber/rails"
|
|||
require "capybara/rails"
|
||||
require "capybara/cucumber"
|
||||
require "capybara/session"
|
||||
require "capybara/apparition"
|
||||
require "capybara/cuprite"
|
||||
|
||||
require "cucumber/api_steps"
|
||||
|
||||
|
|
@ -24,15 +24,15 @@ Rails.application.routes.default_url_options[:port] = AppConfig.pod_uri.port
|
|||
|
||||
Capybara.server = :webrick
|
||||
|
||||
Capybara.register_driver :apparition do |app|
|
||||
Capybara.register_driver :cuprite do |app|
|
||||
# Pass headless: false here if you need to see the browser
|
||||
Capybara::Apparition::Driver.new(
|
||||
Capybara::Cuprite::Driver.new(
|
||||
app,
|
||||
headless: true,
|
||||
browser_options: %i[no_sandbox disable_setuid_sandbox disable_gpu]
|
||||
browser_options: {'no-sandbox': nil}
|
||||
)
|
||||
end
|
||||
Capybara.javascript_driver = :apparition
|
||||
Capybara.javascript_driver = :cuprite
|
||||
|
||||
# Capybara defaults to XPath selectors rather than Webrat's default of CSS3. In
|
||||
# order to ease the transition to Capybara we set the default here. If you'd
|
||||
|
|
|
|||
|
|
@ -70,7 +70,6 @@ module NavigationHelpers
|
|||
end
|
||||
|
||||
def confirm_on_page(page_name)
|
||||
page.driver.send(:retry_if_wrong_world) do
|
||||
if page_name == "my profile page"
|
||||
expect(page).to have_path_in([person_path(@me.person), user_profile_path(@me.username)])
|
||||
else
|
||||
|
|
@ -78,6 +77,5 @@ module NavigationHelpers
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
World(NavigationHelpers)
|
||||
|
|
|
|||
Loading…
Reference in a new issue