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)
|
# Cucumber (integration tests)
|
||||||
|
|
||||||
gem "apparition", "0.6.0"
|
|
||||||
gem "capybara", "3.35.3"
|
gem "capybara", "3.35.3"
|
||||||
|
gem "cuprite", "0.14.3"
|
||||||
gem "database_cleaner-active_record", "2.0.1"
|
gem "database_cleaner-active_record", "2.0.1"
|
||||||
|
|
||||||
gem "cucumber-api-steps", "0.14", require: false
|
gem "cucumber-api-steps", "0.14", require: false
|
||||||
|
|
|
||||||
13
Gemfile.lock
13
Gemfile.lock
|
|
@ -74,9 +74,6 @@ GEM
|
||||||
addressable (2.8.0)
|
addressable (2.8.0)
|
||||||
public_suffix (>= 2.0.2, < 5.0)
|
public_suffix (>= 2.0.2, < 5.0)
|
||||||
aes_key_wrap (1.1.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)
|
asset_sync (2.15.2)
|
||||||
activemodel (>= 4.1.0)
|
activemodel (>= 4.1.0)
|
||||||
fog-core
|
fog-core
|
||||||
|
|
@ -190,6 +187,9 @@ GEM
|
||||||
cucumber-wire (6.2.1)
|
cucumber-wire (6.2.1)
|
||||||
cucumber-core (~> 10.1, >= 10.1.0)
|
cucumber-core (~> 10.1, >= 10.1.0)
|
||||||
cucumber-cucumber-expressions (~> 14.0, >= 14.0.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)
|
database_cleaner-active_record (2.0.1)
|
||||||
activerecord (>= 5.a)
|
activerecord (>= 5.a)
|
||||||
database_cleaner-core (~> 2.0.0)
|
database_cleaner-core (~> 2.0.0)
|
||||||
|
|
@ -280,6 +280,11 @@ GEM
|
||||||
faraday-patron (1.0.0)
|
faraday-patron (1.0.0)
|
||||||
faraday-rack (1.0.0)
|
faraday-rack (1.0.0)
|
||||||
faraday-retry (1.0.3)
|
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 (1.15.5)
|
||||||
ffi-compiler (1.0.1)
|
ffi-compiler (1.0.1)
|
||||||
ffi (>= 1.0.0)
|
ffi (>= 1.0.0)
|
||||||
|
|
@ -773,7 +778,6 @@ DEPENDENCIES
|
||||||
acts-as-taggable-on (= 9.0.1)
|
acts-as-taggable-on (= 9.0.1)
|
||||||
acts_as_api (= 1.0.1)
|
acts_as_api (= 1.0.1)
|
||||||
addressable (= 2.8.0)
|
addressable (= 2.8.0)
|
||||||
apparition (= 0.6.0)
|
|
||||||
asset_sync (= 2.15.2)
|
asset_sync (= 2.15.2)
|
||||||
autoprefixer-rails (= 10.4.7.0)
|
autoprefixer-rails (= 10.4.7.0)
|
||||||
babel-transpiler (= 0.7.0)
|
babel-transpiler (= 0.7.0)
|
||||||
|
|
@ -785,6 +789,7 @@ DEPENDENCIES
|
||||||
configurate (= 0.5.0)
|
configurate (= 0.5.0)
|
||||||
cucumber-api-steps (= 0.14)
|
cucumber-api-steps (= 0.14)
|
||||||
cucumber-rails (= 2.5.1)
|
cucumber-rails (= 2.5.1)
|
||||||
|
cuprite (= 0.14.3)
|
||||||
database_cleaner-active_record (= 2.0.1)
|
database_cleaner-active_record (= 2.0.1)
|
||||||
devise (= 4.8.1)
|
devise (= 4.8.1)
|
||||||
devise-two-factor (= 4.0.2)
|
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
|
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"
|
When I sign in as "bob@bob.bob"
|
||||||
And I am on "alice@alice.alice"'s page
|
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
|
And I sign out
|
||||||
When I sign in as "alice@alice.alice"
|
When I sign in as "alice@alice.alice"
|
||||||
And I am on "bob@bob.bob"'s page
|
And I am on "bob@bob.bob"'s page
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ Feature: private conversations
|
||||||
When I sign in as "bob@bob.bob"
|
When I sign in as "bob@bob.bob"
|
||||||
And I send a message with subject "Greetings" and text "hello, alice!" to "Alice Awesome"
|
And I send a message with subject "Greetings" and text "hello, alice!" to "Alice Awesome"
|
||||||
Then I should see "Greetings" within "#conversation-inbox"
|
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"
|
Then I should not see "Greetings" within "#conversation-inbox"
|
||||||
When I sign in as "alice@alice.alice"
|
When I sign in as "alice@alice.alice"
|
||||||
Then I should have 1 unread private message
|
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 click on the first user in the mentions dropdown list
|
||||||
And I press "Share"
|
And I press "Share"
|
||||||
Then I should see "Bob Jones" within ".stream-element"
|
Then I should see "Bob Jones" within ".stream-element"
|
||||||
When I follow "Bob Jones"
|
When I follow "Bob Jones" within ".stream-element"
|
||||||
Then I should see "Bob Jones"
|
Then I should see "Bob Jones" within "#author_info"
|
||||||
|
|
||||||
Scenario: A user mentions another user in a comment and it displays correctly
|
Scenario: A user mentions another user in a comment and it displays correctly
|
||||||
Given following users exist:
|
Given following users exist:
|
||||||
|
|
|
||||||
|
|
@ -87,7 +87,6 @@ Feature: posting with a poll
|
||||||
| poll_question | What kind of yogurt do you like? |
|
| poll_question | What kind of yogurt do you like? |
|
||||||
And I fill in the following for the options:
|
And I fill in the following for the options:
|
||||||
| normal |
|
| normal |
|
||||||
| |
|
|
||||||
And I click on selector "#poll_creator_container"
|
And I click on selector "#poll_creator_container"
|
||||||
And I click on selector "#publisher button#submit"
|
And I click on selector "#publisher button#submit"
|
||||||
Then I should see an element ".poll-answer input.error"
|
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"
|
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"
|
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"
|
Then I should see "button.png completed"
|
||||||
And I should see a "img" within "#profile_photo_upload"
|
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
|
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"
|
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"
|
Then I should see a "img" within "#profile_photo_upload"
|
||||||
|
|
||||||
When I fill in "follow_tags" with "#men"
|
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
|
end
|
||||||
|
|
||||||
When /^I parse the auth code and create a request to the token endpoint$/ do
|
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=)[^&]+/]
|
code = current_url[/(?<=code=)[^&]+/]
|
||||||
expect(code).to be_present
|
expect(code).to be_present
|
||||||
post api_openid_connect_access_tokens_path, code: code,
|
post api_openid_connect_access_tokens_path, code: code,
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ require "cucumber/rails"
|
||||||
require "capybara/rails"
|
require "capybara/rails"
|
||||||
require "capybara/cucumber"
|
require "capybara/cucumber"
|
||||||
require "capybara/session"
|
require "capybara/session"
|
||||||
require "capybara/apparition"
|
require "capybara/cuprite"
|
||||||
|
|
||||||
require "cucumber/api_steps"
|
require "cucumber/api_steps"
|
||||||
|
|
||||||
|
|
@ -24,15 +24,15 @@ Rails.application.routes.default_url_options[:port] = AppConfig.pod_uri.port
|
||||||
|
|
||||||
Capybara.server = :webrick
|
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
|
# Pass headless: false here if you need to see the browser
|
||||||
Capybara::Apparition::Driver.new(
|
Capybara::Cuprite::Driver.new(
|
||||||
app,
|
app,
|
||||||
headless: true,
|
headless: true,
|
||||||
browser_options: %i[no_sandbox disable_setuid_sandbox disable_gpu]
|
browser_options: {'no-sandbox': nil}
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
Capybara.javascript_driver = :apparition
|
Capybara.javascript_driver = :cuprite
|
||||||
|
|
||||||
# Capybara defaults to XPath selectors rather than Webrat's default of CSS3. In
|
# 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
|
# order to ease the transition to Capybara we set the default here. If you'd
|
||||||
|
|
|
||||||
|
|
@ -70,12 +70,10 @@ module NavigationHelpers
|
||||||
end
|
end
|
||||||
|
|
||||||
def confirm_on_page(page_name)
|
def confirm_on_page(page_name)
|
||||||
page.driver.send(:retry_if_wrong_world) do
|
if page_name == "my profile page"
|
||||||
if page_name == "my profile page"
|
expect(page).to have_path_in([person_path(@me.person), user_profile_path(@me.username)])
|
||||||
expect(page).to have_path_in([person_path(@me.person), user_profile_path(@me.username)])
|
else
|
||||||
else
|
expect(page).to have_path(path_to(page_name))
|
||||||
expect(page).to have_path(path_to(page_name))
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue