mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-12-26 01:35:34 +08:00
fix cucumber settings
This commit is contained in:
parent
3740e89ca0
commit
dccf4e34ff
9 changed files with 74 additions and 37 deletions
2
.babelrc
2
.babelrc
|
@ -5,7 +5,7 @@
|
|||
{
|
||||
"modules": false,
|
||||
"targets": {
|
||||
"browsers": ["last 2 versions"],
|
||||
"browsers": ["last 2 versions", "ie 10"],
|
||||
"uglify": true
|
||||
},
|
||||
"useBuiltIns": true
|
||||
|
|
|
@ -6,6 +6,8 @@ RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
|
|||
apt-get update -qq && \
|
||||
apt-get install -y \
|
||||
nodejs \
|
||||
qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x \
|
||||
xvfb \
|
||||
postgresql-client \
|
||||
default-jre-headless \
|
||||
unison \
|
||||
|
|
7
Gemfile
7
Gemfile
|
@ -103,11 +103,12 @@ end
|
|||
|
||||
group :test do
|
||||
gem 'shoulda-matchers'
|
||||
gem 'cucumber-rails', require: false
|
||||
gem 'cucumber-rails', '~> 1.5'
|
||||
gem 'database_cleaner'
|
||||
gem 'capybara'
|
||||
gem 'poltergeist'
|
||||
gem 'phantomjs', :require => 'phantomjs/poltergeist'
|
||||
gem 'headless'
|
||||
gem 'capybara-webkit', '~> 1.14'
|
||||
gem 'selenium-webdriver'
|
||||
gem 'simplecov', require: false
|
||||
end
|
||||
|
||||
|
|
39
Gemfile.lock
39
Gemfile.lock
|
@ -80,8 +80,8 @@ GEM
|
|||
i18n (~> 0.7)
|
||||
minitest (~> 5.1)
|
||||
tzinfo (~> 1.1)
|
||||
addressable (2.5.1)
|
||||
public_suffix (~> 2.0, >= 2.0.2)
|
||||
addressable (2.5.2)
|
||||
public_suffix (>= 2.0.2, < 4.0)
|
||||
ajax-datatables-rails (0.3.1)
|
||||
railties (>= 3.1)
|
||||
arel (8.0.0)
|
||||
|
@ -126,15 +126,19 @@ GEM
|
|||
activesupport (>= 3.0.0)
|
||||
uniform_notifier (~> 1.10.0)
|
||||
byebug (9.0.6)
|
||||
capybara (2.15.1)
|
||||
capybara (2.13.0)
|
||||
addressable
|
||||
mini_mime (>= 0.1.3)
|
||||
mime-types (>= 1.16)
|
||||
nokogiri (>= 1.3.3)
|
||||
rack (>= 1.0.0)
|
||||
rack-test (>= 0.5.4)
|
||||
xpath (~> 2.0)
|
||||
capybara-webkit (1.14.0)
|
||||
capybara (>= 2.3.0, < 2.14.0)
|
||||
json
|
||||
childprocess (0.8.0)
|
||||
ffi (~> 1.0, >= 1.0.11)
|
||||
climate_control (0.2.0)
|
||||
cliver (0.3.2)
|
||||
cocaine (0.5.8)
|
||||
climate_control (>= 0.0.3, < 1.0)
|
||||
coderay (1.1.1)
|
||||
|
@ -206,6 +210,7 @@ GEM
|
|||
globalid (0.4.0)
|
||||
activesupport (>= 4.2.0)
|
||||
hammerjs-rails (2.0.4)
|
||||
headless (2.3.1)
|
||||
i18n (0.8.6)
|
||||
i18n-js (3.0.1)
|
||||
i18n (~> 0.6, >= 0.6.6)
|
||||
|
@ -256,8 +261,7 @@ GEM
|
|||
method_source (0.8.2)
|
||||
mime-types (1.25.1)
|
||||
mimemagic (0.3.2)
|
||||
mini_mime (0.1.3)
|
||||
mini_portile2 (2.2.0)
|
||||
mini_portile2 (2.3.0)
|
||||
minitest (5.10.3)
|
||||
momentjs-rails (2.17.1)
|
||||
railties (>= 3.1)
|
||||
|
@ -269,8 +273,8 @@ GEM
|
|||
rails (>= 3.2.0)
|
||||
newrelic_rpm (4.3.0.335)
|
||||
nio4r (2.1.0)
|
||||
nokogiri (1.8.0)
|
||||
mini_portile2 (~> 2.2.0)
|
||||
nokogiri (1.8.1)
|
||||
mini_portile2 (~> 2.3.0)
|
||||
nokogumbo (1.4.13)
|
||||
nokogiri
|
||||
oj (2.18.5)
|
||||
|
@ -285,11 +289,6 @@ GEM
|
|||
parser (2.4.0.0)
|
||||
ast (~> 2.2)
|
||||
pg (0.21.0)
|
||||
phantomjs (2.1.1.0)
|
||||
poltergeist (1.15.0)
|
||||
capybara (~> 2.1)
|
||||
cliver (~> 0.3.1)
|
||||
websocket-driver (>= 0.2.0)
|
||||
polyglot (0.3.5)
|
||||
powerpack (0.1.1)
|
||||
pry (0.10.4)
|
||||
|
@ -301,7 +300,7 @@ GEM
|
|||
pry (~> 0.10)
|
||||
pry-rails (0.3.6)
|
||||
pry (>= 0.10.4)
|
||||
public_suffix (2.0.5)
|
||||
public_suffix (3.0.0)
|
||||
puma (3.9.1)
|
||||
rack (2.0.3)
|
||||
rack-test (0.6.3)
|
||||
|
@ -405,6 +404,9 @@ GEM
|
|||
sdoc (0.4.2)
|
||||
json (~> 1.7, >= 1.7.7)
|
||||
rdoc (~> 4.0)
|
||||
selenium-webdriver (3.6.0)
|
||||
childprocess (~> 0.5)
|
||||
rubyzip (~> 1.0)
|
||||
shoulda-matchers (3.1.2)
|
||||
activesupport (>= 4.0.0)
|
||||
silencer (1.0.1)
|
||||
|
@ -490,8 +492,9 @@ DEPENDENCIES
|
|||
bullet
|
||||
byebug
|
||||
capybara
|
||||
capybara-webkit (~> 1.14)
|
||||
commit_param_routing
|
||||
cucumber-rails
|
||||
cucumber-rails (~> 1.5)
|
||||
database_cleaner
|
||||
deface (~> 1.0)
|
||||
delayed_job_active_record
|
||||
|
@ -505,6 +508,7 @@ DEPENDENCIES
|
|||
figaro
|
||||
font-awesome-rails (~> 4.7.0.2)
|
||||
hammerjs-rails
|
||||
headless
|
||||
i18n-js (>= 3.0.0.rc11)
|
||||
introjs-rails
|
||||
jbuilder
|
||||
|
@ -522,8 +526,6 @@ DEPENDENCIES
|
|||
nokogiri
|
||||
paperclip (~> 5.1)
|
||||
pg
|
||||
phantomjs
|
||||
poltergeist
|
||||
pry
|
||||
pry-byebug
|
||||
pry-rails
|
||||
|
@ -544,6 +546,7 @@ DEPENDENCIES
|
|||
sass-rails (~> 5.0.6)
|
||||
scss_lint
|
||||
sdoc (~> 0.4.0)
|
||||
selenium-webdriver
|
||||
shoulda-matchers
|
||||
silencer
|
||||
simple_token_authentication (~> 1.15.1)
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
import "intl";
|
||||
import "intl/locale-data/jsonp/en-US.js"
|
||||
import React from "react";
|
||||
import ReactDOM from "react-dom";
|
||||
import App from "../src/";
|
||||
|
|
|
@ -5,24 +5,49 @@
|
|||
# files.
|
||||
|
||||
require 'cucumber/rails'
|
||||
require 'phantomjs'
|
||||
require 'capybara/poltergeist'
|
||||
require 'capybara/cucumber'
|
||||
require 'capybara-webkit'
|
||||
require 'simplecov'
|
||||
require 'headless'
|
||||
require 'selenium-webdriver'
|
||||
|
||||
Capybara.register_driver :poltergeist do |app|
|
||||
Capybara::Poltergeist::Driver.new(
|
||||
app,
|
||||
js_errors: true,
|
||||
phantomjs_options: ['--ignore-ssl-errors=yes', '--ssl-protocol=any'],
|
||||
debug: true,
|
||||
timeout: 500,
|
||||
phantomjs: File.absolute_path(Phantomjs.path)
|
||||
)
|
||||
|
||||
Capybara.default_driver = :selenium
|
||||
if Capybara.current_driver == :selenium
|
||||
require 'headless'
|
||||
|
||||
headless = Headless.new
|
||||
headless.start
|
||||
end
|
||||
|
||||
Capybara.javascript_driver = :poltergeist
|
||||
Capybara::Webkit.configure do |config|
|
||||
# Enable debug mode. Prints a log of everything the driver is doing.
|
||||
config.debug = true
|
||||
|
||||
Capybara.server_port = 3001
|
||||
# By default, requests to outside domains (anything besides localhost) will
|
||||
# result in a warning. Several methods allow you to change this behavior.
|
||||
|
||||
# Silently return an empty 200 response for any requests to unknown URLs.
|
||||
config.block_unknown_urls
|
||||
|
||||
# Allow pages to make requests to any URL without issuing a warning.
|
||||
config.allow_unknown_urls
|
||||
|
||||
# Timeout if requests take longer than 5 seconds
|
||||
config.timeout = 15
|
||||
|
||||
# Don't raise errors when SSL certificates can't be validated
|
||||
config.ignore_ssl_errors
|
||||
|
||||
# Raise JavaScript errors as exceptions
|
||||
config.raise_javascript_errors = true
|
||||
end
|
||||
|
||||
Capybara.javascript_driver = :webkit
|
||||
|
||||
Before do
|
||||
`bundle exec rails webpacker:compile`
|
||||
end
|
||||
|
||||
# Capybara defaults to CSS3 selectors rather than XPath.
|
||||
# If you'd prefer to use XPath, just uncomment this line and adjust any
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
# newer version of cucumber-rails. Consider adding your own code to a new file
|
||||
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
|
||||
# files.
|
||||
|
||||
ENV["RAILS_ENV"] ||= 'test'
|
||||
# Don't load anything when running the gems:* tasks
|
||||
unless ARGV.any? { |a| a =~ /^gems/ }
|
||||
|
||||
|
|
|
@ -43,7 +43,6 @@
|
|||
"babel-plugin-syntax-dynamic-import": "^6.18.0",
|
||||
"babel-plugin-transform-class-properties": "^6.24.1",
|
||||
"babel-plugin-transform-object-rest-spread": "^6.23.0",
|
||||
"babel-polyfill": "^6.23.0",
|
||||
"babel-preset-env": "^1.6.0",
|
||||
"babel-preset-es2015": "^6.24.1",
|
||||
"babel-preset-react": "^6.24.1",
|
||||
|
@ -57,6 +56,7 @@
|
|||
"font-awesome": "^4.7.0",
|
||||
"glob": "^7.1.2",
|
||||
"immutability-helper": "^2.3.0",
|
||||
"intl": "^1.2.5",
|
||||
"js-yaml": "^3.9.0",
|
||||
"lodash": "^4.17.4",
|
||||
"moment": "^2.18.1",
|
||||
|
|
|
@ -3084,6 +3084,10 @@ intl-relativeformat@^2.0.0:
|
|||
dependencies:
|
||||
intl-messageformat "^2.0.0"
|
||||
|
||||
intl@^1.2.5:
|
||||
version "1.2.5"
|
||||
resolved "https://registry.yarnpkg.com/intl/-/intl-1.2.5.tgz#82244a2190c4e419f8371f5aa34daa3420e2abde"
|
||||
|
||||
invariant@^2.0.0, invariant@^2.1.0, invariant@^2.1.1, invariant@^2.2.0, invariant@^2.2.1, invariant@^2.2.2:
|
||||
version "2.2.2"
|
||||
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360"
|
||||
|
|
Loading…
Reference in a new issue