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:
Benjamin Neff
2022-07-17 19:33:15 +02:00
parent ce32a7d16b
commit 5425f5cfa6
11 changed files with 25 additions and 24 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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:

View File

@@ -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"

View File

@@ -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"

View File

@@ -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"

View File

@@ -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,

View File

@@ -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

View File

@@ -70,12 +70,10 @@ 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
expect(page).to have_path(path_to(page_name))
end
if page_name == "my profile page"
expect(page).to have_path_in([person_path(@me.person), user_profile_path(@me.username)])
else
expect(page).to have_path(path_to(page_name))
end
end
end