From 0e526f92215d50b4958e4a5ad4343708c4bb1002 Mon Sep 17 00:00:00 2001
From: Benjamin Neff <benjamin@coding4coffee.ch>
Date: Sun, 8 Apr 2018 02:52:49 +0200
Subject: [PATCH] Bump jasmine

Disable random tests for now, many tests fail when this is true (which
is now default)
---
 Gemfile                              |  2 +-
 Gemfile.lock                         | 10 +++++-----
 config/environments/test.rb          |  2 ++
 spec/javascripts/support/jasmine.yml |  3 +++
 4 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/Gemfile b/Gemfile
index 757f2887ae..82291f0bc7 100644
--- a/Gemfile
+++ b/Gemfile
@@ -309,7 +309,7 @@ group :development, :test do
   gem "cucumber-rails", "1.5.0", require: false
 
   # Jasmine (client side application tests (JS))
-  gem "jasmine",                   "2.8.0"
+  gem "jasmine",                   "3.1.0"
   gem "jasmine-jquery-rails",      "2.0.3"
   gem "rails-assets-jasmine-ajax", "3.3.1", source: "https://rails-assets.org"
   gem "sinon-rails",               "1.15.0"
diff --git a/Gemfile.lock b/Gemfile.lock
index c88df37c50..6a4819be04 100644
--- a/Gemfile.lock
+++ b/Gemfile.lock
@@ -315,12 +315,12 @@ GEM
       railties (>= 3.0.0)
     idn-ruby (0.1.0)
     ipaddress (0.8.3)
-    jasmine (2.8.0)
-      jasmine-core (>= 2.8.0, < 3.0.0)
+    jasmine (3.1.0)
+      jasmine-core (= 3.1.0)
       phantomjs
       rack (>= 1.2.1)
       rake
-    jasmine-core (2.8.0)
+    jasmine-core (3.1.0)
     jasmine-jquery-rails (2.0.3)
     jquery-rails (4.3.1)
       rails-dom-testing (>= 1, < 3)
@@ -530,7 +530,7 @@ GEM
     rails-assets-favico.js (0.3.10)
     rails-assets-fine-uploader (5.13.0)
     rails-assets-highlightjs (9.12.0)
-    rails-assets-jasmine (2.8.0)
+    rails-assets-jasmine (2.99.2)
     rails-assets-jasmine-ajax (3.3.1)
       rails-assets-jasmine (~> 2)
     rails-assets-jquery (3.2.1)
@@ -807,7 +807,7 @@ DEPENDENCIES
   handlebars_assets (= 0.23.2)
   http_accept_language (= 2.1.1)
   i18n-inflector-rails (= 1.0.7)
-  jasmine (= 2.8.0)
+  jasmine (= 3.1.0)
   jasmine-jquery-rails (= 2.0.3)
   jquery-rails (= 4.3.1)
   js-routes (= 1.4.3)
diff --git a/config/environments/test.rb b/config/environments/test.rb
index 8ba0131176..26db9c226d 100644
--- a/config/environments/test.rb
+++ b/config/environments/test.rb
@@ -32,6 +32,8 @@ Rails.application.configure do
     color_themes/original/desktop.css
     color_themes/dark_green/desktop.css
     color_themes/original/mobile.css
+    jasmine-load-all.js
+    jasmine-jquery.js
   ]
 
   # Show full error reports and disable caching.
diff --git a/spec/javascripts/support/jasmine.yml b/spec/javascripts/support/jasmine.yml
index cec4333070..cac5e7fcbe 100644
--- a/spec/javascripts/support/jasmine.yml
+++ b/spec/javascripts/support/jasmine.yml
@@ -80,3 +80,6 @@ spec_dir: spec/javascripts
 
 rack_options:
   Host: '0.0.0.0'
+
+# TODO: refactor tests, they shouldn't fail when they are run in a random order!
+random: false
-- 
GitLab