diff --git a/.gitignore b/.gitignore index d058d20d1..3bf2fdbb1 100644 --- a/.gitignore +++ b/.gitignore @@ -55,3 +55,7 @@ node_modules package-lock.json *.dump + + +# cypress +test/cypress/videos/* \ No newline at end of file diff --git a/Gemfile b/Gemfile index a769187de..ec8cd8455 100644 --- a/Gemfile +++ b/Gemfile @@ -96,6 +96,13 @@ group :development do gem 'json_refs', git: 'https://github.com/tzmfreedom/json_refs', ref: 'e32deb0' end +group :test do + # Cypress in rails. + gem 'cypress-on-rails', '~> 1.0' + # fast cleaning of database + gem 'database_cleaner' +end + group :development, :test do # locking until https://github.com/codeclimate/test-reporter/issues/418 is resolved gem 'action-cable-testing' diff --git a/Gemfile.lock b/Gemfile.lock index 40e05f084..27235335d 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -146,6 +146,9 @@ GEM crack (0.4.3) safe_yaml (~> 1.0.0) crass (1.0.6) + cypress-on-rails (1.7.0) + rack + database_cleaner (1.8.5) datetime_picker_rails (0.0.7) momentjs-rails (>= 2.8.1) declarative (0.0.10) @@ -560,6 +563,8 @@ DEPENDENCIES bullet bundle-audit byebug + cypress-on-rails (~> 1.0) + database_cleaner devise devise_token_auth dotenv-rails diff --git a/Procfile.test b/Procfile.test new file mode 100644 index 000000000..760852e80 --- /dev/null +++ b/Procfile.test @@ -0,0 +1,3 @@ +backend: RAILS_ENV=test bin/rails s -p 5050 +frontend: bin/webpack-dev-server +worker: RAILS_ENV=test bundle exec sidekiq -C config/sidekiq.yml diff --git a/app/javascript/dashboard/components/buttons/FormSubmitButton.vue b/app/javascript/dashboard/components/buttons/FormSubmitButton.vue index d8934f675..9223ebcef 100644 --- a/app/javascript/dashboard/components/buttons/FormSubmitButton.vue +++ b/app/javascript/dashboard/components/buttons/FormSubmitButton.vue @@ -1,6 +1,7 @@