mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-21 15:36:22 +08:00
Merge pull request #2110 from biosistemika/activestorage_migration
Merge latest changes from Active storage branch
This commit is contained in:
commit
86e9456c73
|
@ -1,6 +1,11 @@
|
|||
FROM ruby:2.6.4-buster
|
||||
MAINTAINER BioSistemika <info@biosistemika.com>
|
||||
|
||||
RUN wget -q -O - https://dl.google.com/linux/linux_signing_key.pub | apt-key add - && \
|
||||
echo 'deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main' >> /etc/apt/sources.list && \
|
||||
wget -O /usr/bin/chromedriver_linux64.zip https://chromedriver.storage.googleapis.com/77.0.3865.40/chromedriver_linux64.zip && \
|
||||
unzip /usr/bin/chromedriver_linux64.zip -d /usr/bin/
|
||||
|
||||
# additional dependecies
|
||||
# libSSL-1.0 is required by wkhtmltopdf binary
|
||||
# libreoffice for file preview generation
|
||||
|
@ -18,7 +23,7 @@ RUN apt-get update -qq && \
|
|||
sudo graphviz --no-install-recommends \
|
||||
libreoffice \
|
||||
libfile-mimeinfo-perl \
|
||||
chromium-driver && \
|
||||
google-chrome-stable=77.* && \
|
||||
npm install -g yarn && \
|
||||
ln -s /usr/lib/x86_64-linux-gnu/libvips.so.42 /usr/lib/x86_64-linux-gnu/libvips.so && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
|
2
Makefile
2
Makefile
|
@ -85,7 +85,7 @@ tests-ci:
|
|||
@docker-compose run --rm web bash -c "bundle install && yarn install"
|
||||
@docker-compose up -d webpack
|
||||
@docker-compose ps
|
||||
@docker-compose run -e ENABLE_EMAIL_CONFIRMATIONS=false -e MAIL_FROM=MAIL_FROM -e MAIL_REPLYTO=MAIL_REPLYTO -e RAILS_ENV=test -e PAPERCLIP_HASH_SECRET=PAPERCLIP_HASH_SECRET -e MAIL_SERVER_URL=localhost:3000 -e ENABLE_RECAPTCHA=false -e ENABLE_USER_CONFIRMATION=false -e ENABLE_USER_REGISTRATION=true -e CORE_API_RATE_LIMIT=1000000 --rm web bash -c "rake db:create db:migrate && rake db:migrate && yarn install && bundle exec rspec"
|
||||
@docker-compose run -e ENABLE_EMAIL_CONFIRMATIONS=false -e MAIL_FROM=MAIL_FROM -e MAIL_REPLYTO=MAIL_REPLYTO -e RAILS_ENV=test -e PAPERCLIP_HASH_SECRET=PAPERCLIP_HASH_SECRET -e MAIL_SERVER_URL=localhost:3000 -e ENABLE_RECAPTCHA=false -e ENABLE_USER_CONFIRMATION=false -e ENABLE_USER_REGISTRATION=true -e CORE_API_RATE_LIMIT=1000000 --rm web bash -c "rake db:create db:migrate && rake db:migrate && yarn install && bundle exec rspec && bundle exec cucumber"
|
||||
|
||||
console:
|
||||
@$(MAKE) rails cmd="rails console"
|
||||
|
|
|
@ -37,8 +37,9 @@ Given("I click on Reset Password link in the reset password email for user {stri
|
|||
visit new_user_password_path
|
||||
fill_in 'user_email', with: email
|
||||
click_button 'Send me reset password instruction'
|
||||
|
||||
Delayed::Worker.new.work_off
|
||||
sleep 10
|
||||
sleep 1
|
||||
open_email(email)
|
||||
current_email.click_link 'Change my password'
|
||||
end
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
# instead of editing this one. Cucumber will automatically load all features/**/*.rb
|
||||
# files.
|
||||
|
||||
ENV['RAILS_ENV'] = 'test'
|
||||
ENV['CR_REMOVE_RACK_TEST_HELPERS'] = 'true'
|
||||
|
||||
require 'cucumber/rails'
|
||||
|
@ -16,7 +17,7 @@ require 'capybara/email'
|
|||
include FirstTimeDataGenerator
|
||||
|
||||
Capybara.default_max_wait_time = 30
|
||||
# Capybara.asset_host = 'http://localhost:3001'
|
||||
#Capybara.asset_host = 'http://localhost:3001'
|
||||
Capybara.server_port = 3000
|
||||
require 'selenium/webdriver'
|
||||
# enables email helper methods
|
||||
|
@ -58,7 +59,7 @@ ActionController::Base.allow_rescue = false
|
|||
begin
|
||||
require 'database_cleaner'
|
||||
require 'database_cleaner/cucumber'
|
||||
DatabaseCleaner.strategy = :transaction
|
||||
DatabaseCleaner.strategy = :truncation
|
||||
rescue NameError
|
||||
raise "You need to add database_cleaner to your Gemfile (in the :test group) if you wish to use it."
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue