mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2025-10-06 03:46:39 +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,
|
"modules": false,
|
||||||
"targets": {
|
"targets": {
|
||||||
"browsers": ["last 2 versions"],
|
"browsers": ["last 2 versions", "ie 10"],
|
||||||
"uglify": true
|
"uglify": true
|
||||||
},
|
},
|
||||||
"useBuiltIns": true
|
"useBuiltIns": true
|
||||||
|
|
|
@ -6,6 +6,8 @@ RUN curl -sL https://deb.nodesource.com/setup_8.x | bash - && \
|
||||||
apt-get update -qq && \
|
apt-get update -qq && \
|
||||||
apt-get install -y \
|
apt-get install -y \
|
||||||
nodejs \
|
nodejs \
|
||||||
|
qt5-default libqt5webkit5-dev gstreamer1.0-plugins-base gstreamer1.0-tools gstreamer1.0-x \
|
||||||
|
xvfb \
|
||||||
postgresql-client \
|
postgresql-client \
|
||||||
default-jre-headless \
|
default-jre-headless \
|
||||||
unison \
|
unison \
|
||||||
|
|
7
Gemfile
7
Gemfile
|
@ -103,11 +103,12 @@ end
|
||||||
|
|
||||||
group :test do
|
group :test do
|
||||||
gem 'shoulda-matchers'
|
gem 'shoulda-matchers'
|
||||||
gem 'cucumber-rails', require: false
|
gem 'cucumber-rails', '~> 1.5'
|
||||||
gem 'database_cleaner'
|
gem 'database_cleaner'
|
||||||
gem 'capybara'
|
gem 'capybara'
|
||||||
gem 'poltergeist'
|
gem 'headless'
|
||||||
gem 'phantomjs', :require => 'phantomjs/poltergeist'
|
gem 'capybara-webkit', '~> 1.14'
|
||||||
|
gem 'selenium-webdriver'
|
||||||
gem 'simplecov', require: false
|
gem 'simplecov', require: false
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
39
Gemfile.lock
39
Gemfile.lock
|
@ -80,8 +80,8 @@ GEM
|
||||||
i18n (~> 0.7)
|
i18n (~> 0.7)
|
||||||
minitest (~> 5.1)
|
minitest (~> 5.1)
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
addressable (2.5.1)
|
addressable (2.5.2)
|
||||||
public_suffix (~> 2.0, >= 2.0.2)
|
public_suffix (>= 2.0.2, < 4.0)
|
||||||
ajax-datatables-rails (0.3.1)
|
ajax-datatables-rails (0.3.1)
|
||||||
railties (>= 3.1)
|
railties (>= 3.1)
|
||||||
arel (8.0.0)
|
arel (8.0.0)
|
||||||
|
@ -126,15 +126,19 @@ GEM
|
||||||
activesupport (>= 3.0.0)
|
activesupport (>= 3.0.0)
|
||||||
uniform_notifier (~> 1.10.0)
|
uniform_notifier (~> 1.10.0)
|
||||||
byebug (9.0.6)
|
byebug (9.0.6)
|
||||||
capybara (2.15.1)
|
capybara (2.13.0)
|
||||||
addressable
|
addressable
|
||||||
mini_mime (>= 0.1.3)
|
mime-types (>= 1.16)
|
||||||
nokogiri (>= 1.3.3)
|
nokogiri (>= 1.3.3)
|
||||||
rack (>= 1.0.0)
|
rack (>= 1.0.0)
|
||||||
rack-test (>= 0.5.4)
|
rack-test (>= 0.5.4)
|
||||||
xpath (~> 2.0)
|
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)
|
climate_control (0.2.0)
|
||||||
cliver (0.3.2)
|
|
||||||
cocaine (0.5.8)
|
cocaine (0.5.8)
|
||||||
climate_control (>= 0.0.3, < 1.0)
|
climate_control (>= 0.0.3, < 1.0)
|
||||||
coderay (1.1.1)
|
coderay (1.1.1)
|
||||||
|
@ -206,6 +210,7 @@ GEM
|
||||||
globalid (0.4.0)
|
globalid (0.4.0)
|
||||||
activesupport (>= 4.2.0)
|
activesupport (>= 4.2.0)
|
||||||
hammerjs-rails (2.0.4)
|
hammerjs-rails (2.0.4)
|
||||||
|
headless (2.3.1)
|
||||||
i18n (0.8.6)
|
i18n (0.8.6)
|
||||||
i18n-js (3.0.1)
|
i18n-js (3.0.1)
|
||||||
i18n (~> 0.6, >= 0.6.6)
|
i18n (~> 0.6, >= 0.6.6)
|
||||||
|
@ -256,8 +261,7 @@ GEM
|
||||||
method_source (0.8.2)
|
method_source (0.8.2)
|
||||||
mime-types (1.25.1)
|
mime-types (1.25.1)
|
||||||
mimemagic (0.3.2)
|
mimemagic (0.3.2)
|
||||||
mini_mime (0.1.3)
|
mini_portile2 (2.3.0)
|
||||||
mini_portile2 (2.2.0)
|
|
||||||
minitest (5.10.3)
|
minitest (5.10.3)
|
||||||
momentjs-rails (2.17.1)
|
momentjs-rails (2.17.1)
|
||||||
railties (>= 3.1)
|
railties (>= 3.1)
|
||||||
|
@ -269,8 +273,8 @@ GEM
|
||||||
rails (>= 3.2.0)
|
rails (>= 3.2.0)
|
||||||
newrelic_rpm (4.3.0.335)
|
newrelic_rpm (4.3.0.335)
|
||||||
nio4r (2.1.0)
|
nio4r (2.1.0)
|
||||||
nokogiri (1.8.0)
|
nokogiri (1.8.1)
|
||||||
mini_portile2 (~> 2.2.0)
|
mini_portile2 (~> 2.3.0)
|
||||||
nokogumbo (1.4.13)
|
nokogumbo (1.4.13)
|
||||||
nokogiri
|
nokogiri
|
||||||
oj (2.18.5)
|
oj (2.18.5)
|
||||||
|
@ -285,11 +289,6 @@ GEM
|
||||||
parser (2.4.0.0)
|
parser (2.4.0.0)
|
||||||
ast (~> 2.2)
|
ast (~> 2.2)
|
||||||
pg (0.21.0)
|
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)
|
polyglot (0.3.5)
|
||||||
powerpack (0.1.1)
|
powerpack (0.1.1)
|
||||||
pry (0.10.4)
|
pry (0.10.4)
|
||||||
|
@ -301,7 +300,7 @@ GEM
|
||||||
pry (~> 0.10)
|
pry (~> 0.10)
|
||||||
pry-rails (0.3.6)
|
pry-rails (0.3.6)
|
||||||
pry (>= 0.10.4)
|
pry (>= 0.10.4)
|
||||||
public_suffix (2.0.5)
|
public_suffix (3.0.0)
|
||||||
puma (3.9.1)
|
puma (3.9.1)
|
||||||
rack (2.0.3)
|
rack (2.0.3)
|
||||||
rack-test (0.6.3)
|
rack-test (0.6.3)
|
||||||
|
@ -405,6 +404,9 @@ GEM
|
||||||
sdoc (0.4.2)
|
sdoc (0.4.2)
|
||||||
json (~> 1.7, >= 1.7.7)
|
json (~> 1.7, >= 1.7.7)
|
||||||
rdoc (~> 4.0)
|
rdoc (~> 4.0)
|
||||||
|
selenium-webdriver (3.6.0)
|
||||||
|
childprocess (~> 0.5)
|
||||||
|
rubyzip (~> 1.0)
|
||||||
shoulda-matchers (3.1.2)
|
shoulda-matchers (3.1.2)
|
||||||
activesupport (>= 4.0.0)
|
activesupport (>= 4.0.0)
|
||||||
silencer (1.0.1)
|
silencer (1.0.1)
|
||||||
|
@ -490,8 +492,9 @@ DEPENDENCIES
|
||||||
bullet
|
bullet
|
||||||
byebug
|
byebug
|
||||||
capybara
|
capybara
|
||||||
|
capybara-webkit (~> 1.14)
|
||||||
commit_param_routing
|
commit_param_routing
|
||||||
cucumber-rails
|
cucumber-rails (~> 1.5)
|
||||||
database_cleaner
|
database_cleaner
|
||||||
deface (~> 1.0)
|
deface (~> 1.0)
|
||||||
delayed_job_active_record
|
delayed_job_active_record
|
||||||
|
@ -505,6 +508,7 @@ DEPENDENCIES
|
||||||
figaro
|
figaro
|
||||||
font-awesome-rails (~> 4.7.0.2)
|
font-awesome-rails (~> 4.7.0.2)
|
||||||
hammerjs-rails
|
hammerjs-rails
|
||||||
|
headless
|
||||||
i18n-js (>= 3.0.0.rc11)
|
i18n-js (>= 3.0.0.rc11)
|
||||||
introjs-rails
|
introjs-rails
|
||||||
jbuilder
|
jbuilder
|
||||||
|
@ -522,8 +526,6 @@ DEPENDENCIES
|
||||||
nokogiri
|
nokogiri
|
||||||
paperclip (~> 5.1)
|
paperclip (~> 5.1)
|
||||||
pg
|
pg
|
||||||
phantomjs
|
|
||||||
poltergeist
|
|
||||||
pry
|
pry
|
||||||
pry-byebug
|
pry-byebug
|
||||||
pry-rails
|
pry-rails
|
||||||
|
@ -544,6 +546,7 @@ DEPENDENCIES
|
||||||
sass-rails (~> 5.0.6)
|
sass-rails (~> 5.0.6)
|
||||||
scss_lint
|
scss_lint
|
||||||
sdoc (~> 0.4.0)
|
sdoc (~> 0.4.0)
|
||||||
|
selenium-webdriver
|
||||||
shoulda-matchers
|
shoulda-matchers
|
||||||
silencer
|
silencer
|
||||||
simple_token_authentication (~> 1.15.1)
|
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 React from "react";
|
||||||
import ReactDOM from "react-dom";
|
import ReactDOM from "react-dom";
|
||||||
import App from "../src/";
|
import App from "../src/";
|
||||||
|
|
|
@ -5,24 +5,49 @@
|
||||||
# files.
|
# files.
|
||||||
|
|
||||||
require 'cucumber/rails'
|
require 'cucumber/rails'
|
||||||
require 'phantomjs'
|
require 'capybara/cucumber'
|
||||||
require 'capybara/poltergeist'
|
require 'capybara-webkit'
|
||||||
require 'simplecov'
|
require 'simplecov'
|
||||||
|
require 'headless'
|
||||||
|
require 'selenium-webdriver'
|
||||||
|
|
||||||
Capybara.register_driver :poltergeist do |app|
|
|
||||||
Capybara::Poltergeist::Driver.new(
|
Capybara.default_driver = :selenium
|
||||||
app,
|
if Capybara.current_driver == :selenium
|
||||||
js_errors: true,
|
require 'headless'
|
||||||
phantomjs_options: ['--ignore-ssl-errors=yes', '--ssl-protocol=any'],
|
|
||||||
debug: true,
|
headless = Headless.new
|
||||||
timeout: 500,
|
headless.start
|
||||||
phantomjs: File.absolute_path(Phantomjs.path)
|
|
||||||
)
|
|
||||||
end
|
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.
|
# Capybara defaults to CSS3 selectors rather than XPath.
|
||||||
# If you'd prefer to use XPath, just uncomment this line and adjust any
|
# 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
|
# 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
|
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
|
||||||
# files.
|
# files.
|
||||||
|
ENV["RAILS_ENV"] ||= 'test'
|
||||||
# Don't load anything when running the gems:* tasks
|
# Don't load anything when running the gems:* tasks
|
||||||
unless ARGV.any? { |a| a =~ /^gems/ }
|
unless ARGV.any? { |a| a =~ /^gems/ }
|
||||||
|
|
||||||
|
|
|
@ -43,7 +43,6 @@
|
||||||
"babel-plugin-syntax-dynamic-import": "^6.18.0",
|
"babel-plugin-syntax-dynamic-import": "^6.18.0",
|
||||||
"babel-plugin-transform-class-properties": "^6.24.1",
|
"babel-plugin-transform-class-properties": "^6.24.1",
|
||||||
"babel-plugin-transform-object-rest-spread": "^6.23.0",
|
"babel-plugin-transform-object-rest-spread": "^6.23.0",
|
||||||
"babel-polyfill": "^6.23.0",
|
|
||||||
"babel-preset-env": "^1.6.0",
|
"babel-preset-env": "^1.6.0",
|
||||||
"babel-preset-es2015": "^6.24.1",
|
"babel-preset-es2015": "^6.24.1",
|
||||||
"babel-preset-react": "^6.24.1",
|
"babel-preset-react": "^6.24.1",
|
||||||
|
@ -57,6 +56,7 @@
|
||||||
"font-awesome": "^4.7.0",
|
"font-awesome": "^4.7.0",
|
||||||
"glob": "^7.1.2",
|
"glob": "^7.1.2",
|
||||||
"immutability-helper": "^2.3.0",
|
"immutability-helper": "^2.3.0",
|
||||||
|
"intl": "^1.2.5",
|
||||||
"js-yaml": "^3.9.0",
|
"js-yaml": "^3.9.0",
|
||||||
"lodash": "^4.17.4",
|
"lodash": "^4.17.4",
|
||||||
"moment": "^2.18.1",
|
"moment": "^2.18.1",
|
||||||
|
|
|
@ -3084,6 +3084,10 @@ intl-relativeformat@^2.0.0:
|
||||||
dependencies:
|
dependencies:
|
||||||
intl-messageformat "^2.0.0"
|
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:
|
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"
|
version "2.2.2"
|
||||||
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360"
|
resolved "https://registry.yarnpkg.com/invariant/-/invariant-2.2.2.tgz#9e1f56ac0acdb6bf303306f338be3b204ae60360"
|
||||||
|
|
Loading…
Add table
Reference in a new issue