Skip to content
GitLab
    • Explore Projects Groups Snippets
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
  • A administrate
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 96
    • Issues 96
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 32
    • Merge requests 32
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • thoughtbot, inc.
  • administrate
  • Merge requests
  • !1718

Ew replace phantomjs with selenium 2

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Administrator requested to merge github/fork/EWright212/ew-replace-phantomjs-with-selenium-2 into master 5 years ago
  • Overview 26
  • Commits 10
  • Pipelines 0
  • Changes 6

Created by: EWright212

Updated the discontinued phantomjs with selenuim webdirvers and fixed related tests. Update of pull request to be based off master branch instead of unmerged pull requests.

Compare
  • master (base)

and
  • latest version
    71789054
    10 commits, 2 years ago

6 files
+ 32
- 24

    Preferences

    File browser
    Compare changes
sp‎ec‎
feat‎ures‎
log_entries_‎index_spec.rb‎ +3 -2
orders_ind‎ex_spec.rb‎ +6 -4
rails_h‎elper.rb‎ +15 -7
.giti‎gnore‎ +1 -1
Gem‎file‎ +1 -1
Gemfil‎e.lock‎ +6 -9
spec/features/log_entries_index_spec.rb
+ 3
- 2
  • View file @ 71789054

  • Edit in single-file editor

  • Open in Web IDE


@@ -52,8 +52,9 @@ feature "log entries index page" do
create(:log_entry)
visit admin_log_entries_path
click_on t("administrate.actions.destroy")
accept_confirm do
click_on t("administrate.actions.destroy")
end
expect(page).to have_flash(
t("administrate.controller.destroy.success", resource: "LogEntry"),
)
spec/features/orders_index_spec.rb
+ 6
- 4
  • View file @ 71789054

  • Edit in single-file editor

  • Open in Web IDE


@@ -49,8 +49,9 @@ feature "order index page" do
create(:order)
visit admin_orders_path
click_on t("administrate.actions.destroy")
accept_confirm do
click_on t("administrate.actions.destroy")
end
expect(page).to have_flash(
t("administrate.controller.destroy.success", resource: "Order")
)
@@ -60,8 +61,9 @@ feature "order index page" do
create(:payment, order: create(:order))
visit admin_orders_path
click_on t("administrate.actions.destroy")
accept_confirm do
click_on t("administrate.actions.destroy")
end
expect(page).to have_flash(
"Cannot delete record because dependent payments exist", type: :error
)
spec/rails_helper.rb
+ 15
- 7
  • View file @ 71789054

  • Edit in single-file editor

  • Open in Web IDE


@@ -6,7 +6,7 @@ require File.expand_path("../../spec/example_app/config/environment", __FILE__)
require "rspec/rails"
require "shoulda/matchers"
require "capybara/poltergeist"
require "selenium/webdriver"
Dir[Rails.root.join("../../spec/support/**/*.rb")].each { |file| require file }
@@ -31,14 +31,22 @@ RSpec.configure do |config|
end
ActiveRecord::Migration.maintain_test_schema!
Capybara.javascript_driver = :poltergeist
Capybara.register_driver :poltergeist do |app|
options = { phantomjs_options: ["--load-images=no"] }
Capybara::Poltergeist::Driver.new(app, options)
Capybara.register_driver :chrome do |app|
Capybara::Selenium::Driver.new(app, browser: :chrome)
end
Capybara.register_driver :rack_test do |app|
Capybara::RackTest::Driver.new(app, respect_data_method: false)
Capybara.register_driver :headless_chrome do |app|
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
chromeOptions: {
args: %w[headless enable-features=NetworkService,NetworkServiceInProcess]
}
)
Capybara::Selenium::Driver.new app,
browser: :chrome,
desired_capabilities: capabilities
end
Capybara.javascript_driver = :selenium_chrome_headless
Capybara.server = :webrick
.gitignore
+ 1
- 1
  • View file @ 71789054

  • Edit in single-file editor

  • Open in Web IDE


@@ -12,7 +12,7 @@
/spec/example_app/public/system
/spec/example_app/public/assets
/tags
/tmp/*
/tmp/app
/spec/example_app/tmp/*
pkg
*.ipr
Gemfile
+ 1
- 1
  • View file @ 71789054

  • Edit in single-file editor

  • Open in Web IDE


@@ -29,8 +29,8 @@ group :test do
gem "database_cleaner"
gem "formulaic"
gem "launchy"
gem "poltergeist"
gem "pundit"
gem "selenium-webdriver"
gem "shoulda-matchers"
gem "timecop"
gem "webmock"
0 Assignees
None
Assign to
0 Reviewers
None
Request review from
Labels
0
None
0
None
    Assign labels
  • Manage project labels

Milestone
No milestone
None
None
Time tracking
No estimate or time spent
Lock merge request
Unlocked
0
0 participants
Reference: firstcontributions/first-contributions!10495
Source branch: github/fork/EWright212/ew-replace-phantomjs-with-selenium-2

Menu

Explore Projects Groups Snippets