From f001e304a5e7ffe32cbb231f1344b13075c49069 Mon Sep 17 00:00:00 2001 From: Sasha Boginsky <41092741+sashadev-sky@users.noreply.github.com> Date: Tue, 10 Sep 2019 17:40:49 -0400 Subject: [PATCH] Fix broken tests (#1001) * h * h * fix broken tests * fix * fix click capybara * add parentheses * click_on * fix image placement system test * put back selenium for travis * use old driver --- Gemfile | 2 ++ Gemfile.lock | 3 +-- app/assets/javascripts/mapknitter/core/Class.js | 12 ++++++------ app/views/maps/show.html.erb | 2 +- test/controllers/front_ui_controller_test.rb | 9 --------- test/controllers/maps_controller_test.rb | 2 +- test/system/images_test.rb | 4 ++-- 7 files changed, 13 insertions(+), 21 deletions(-) diff --git a/Gemfile b/Gemfile index bc983cd82..5556a32cc 100644 --- a/Gemfile +++ b/Gemfile @@ -66,6 +66,8 @@ end group :development, :test do gem 'capybara' + # see https://github.com/SeleniumHQ/selenium/issues/5248 + # gem 'webdrivers' gem 'selenium-webdriver' gem 'byebug', '~> 11.0.1', platforms: [:mri, :mingw, :x64_mingw] gem 'faker', '~> 2.2.1' diff --git a/Gemfile.lock b/Gemfile.lock index 0c6fb0510..51e98cab8 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -339,8 +339,7 @@ DEPENDENCIES byebug (~> 11.0.1) capybara codecov - foreman (~> 0.85.0) - faker (~> 2.1.2) + faker (~> 2.2.1) friendly_id geokit-rails (= 1.1.4) httparty diff --git a/app/assets/javascripts/mapknitter/core/Class.js b/app/assets/javascripts/mapknitter/core/Class.js index 4b9f0b91d..6d4ad0478 100644 --- a/app/assets/javascripts/mapknitter/core/Class.js +++ b/app/assets/javascripts/mapknitter/core/Class.js @@ -6,15 +6,15 @@ var MapKnitter = {}; * See https://github.com/Leaflet/Leaflet/blob/master/src/core/Class.js. */ -MapKnitter.Class = function() {}; -MapKnitter.Class.extend = function(obj) { - var NewClass = function() { +MapKnitter.Class = function () { }; +MapKnitter.Class.extend = function (obj) { + var NewClass = function () { if (this.initialize) { this.initialize.apply(this, arguments); } }; - var F = function() {}; + var F = function () { }; F.prototype = this.prototype; var proto = new F(); @@ -35,6 +35,6 @@ MapKnitter.Class.extend = function(obj) { return NewClass; }; -MapKnitter.Class.include = function(obj) { +MapKnitter.Class.include = function (obj) { L.extend(this.prototype, obj); -}; \ No newline at end of file +}; diff --git a/app/views/maps/show.html.erb b/app/views/maps/show.html.erb index 4e5a9952e..87880914f 100644 --- a/app/views/maps/show.html.erb +++ b/app/views/maps/show.html.erb @@ -17,7 +17,7 @@