Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken tests #1001

Merged
merged 22 commits into from
Sep 10, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
58bc692
h
sashadev-sky Jul 25, 2019
8dcff6a
h
sashadev-sky Jul 25, 2019
c075966
Merge branch 'main' of https://github.com/publiclab/mapknitter into main
sashadev-sky Jul 26, 2019
986b49a
Merge branch 'main' of https://github.com/publiclab/mapknitter into main
sashadev-sky Jul 30, 2019
34cf99d
Merge branch 'main' of https://github.com/publiclab/mapknitter into main
sashadev-sky Aug 6, 2019
11e11be
Merge branch 'main' of https://github.com/publiclab/mapknitter into main
sashadev-sky Aug 7, 2019
ba41fb4
Merge branch 'main' of https://github.com/publiclab/mapknitter into main
sashadev-sky Aug 11, 2019
d398f00
Merge branch 'main' of https://github.com/publiclab/mapknitter into main
sashadev-sky Aug 12, 2019
1828645
Merge branch 'main' of https://github.com/publiclab/mapknitter into main
sashadev-sky Aug 13, 2019
95759ad
Merge branch 'main' of https://github.com/publiclab/mapknitter into main
sashadev-sky Aug 22, 2019
8238c6f
Merge branch 'main' of https://github.com/publiclab/mapknitter into main
sashadev-sky Aug 27, 2019
bf84e93
Merge branch 'main' of https://github.com/publiclab/mapknitter into main
sashadev-sky Sep 4, 2019
fc9d5ce
Merge branch 'main' of https://github.com/publiclab/mapknitter into main
sashadev-sky Sep 9, 2019
ae6a192
Merge branch 'main' of https://github.com/publiclab/mapknitter into main
sashadev-sky Sep 10, 2019
e8da2c3
fix broken tests
sashadev-sky Sep 10, 2019
cfae26c
fix
sashadev-sky Sep 10, 2019
a833da7
fix click capybara
sashadev-sky Sep 10, 2019
75ce193
add parentheses
sashadev-sky Sep 10, 2019
ff19414
click_on
sashadev-sky Sep 10, 2019
e858f5c
fix image placement system test
sashadev-sky Sep 10, 2019
531ca97
put back selenium for travis
sashadev-sky Sep 10, 2019
953c965
use old driver
sashadev-sky Sep 10, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
3 changes: 1 addition & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions app/assets/javascripts/mapknitter/core/Class.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand All @@ -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);
};
};
2 changes: 1 addition & 1 deletion app/views/maps/show.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</div>
</div>
<div class="col-md-6">
<a href="/maps/edit/<%= @map.slug %>">
<a href="/maps/<%= @map.slug %>/edit">
<button class="btn btn-outline-info float-right">
<span class="fas fa-pencil-alt"> </span> Edit this map
</button>
Expand Down
9 changes: 0 additions & 9 deletions test/controllers/front_ui_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,4 @@ def teardown
assert !@maps.collect(&:name).include?('Saugus Landfill Incinerator')
assert @maps.collect(&:name).include?('Cubbon Park')
end

test 'view map page' do
map = maps(:saugus)
get :view_map, id: map.slug

assert_response :success
assert assigns(:maps)
assert_template 'front_ui/view_map'
end
end
2 changes: 1 addition & 1 deletion test/controllers/maps_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def export_anonmymous_map
end

test 'show' do
get :show, id: @map.slug
get :show, params: { id: @map.slug}

assert_response :success
assert assigns(:maps)
Expand Down
4 changes: 2 additions & 2 deletions test/system/images_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ def setup
#log in
page.set_rack_session(user_id: @user.id)

visit "/maps/#{@map.slug}"
click_link('Images')
visit "/maps/#{@map.slug}/edit"
click_on 'Images'

#expect layers to not have an ldi instance before placing
assert !page.evaluate_script(check_if_image_placed)
Expand Down