active_admin-sortable_tree 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Changelog.md +12 -1
- data/lib/active_admin/sortable_tree/version.rb +1 -1
- metadata +2 -64
- data/.gitignore +0 -11
- data/.travis.yml +0 -9
- data/Gemfile +0 -10
- data/Rakefile +0 -59
- data/active_admin-sortable_tree.gemspec +0 -30
- data/bin/rails +0 -11
- data/gemfiles/3.2.gemfile +0 -7
- data/gemfiles/4.0.gemfile +0 -10
- data/gemfiles/4.1.gemfile +0 -10
- data/script/rails +0 -11
- data/spec/dummy/README.rdoc +0 -261
- data/spec/dummy/Rakefile +0 -7
- data/spec/dummy/app/admin/category.rb +0 -15
- data/spec/dummy/app/admin/category_sort_disabled.rb +0 -15
- data/spec/dummy/app/admin/category_tree.rb +0 -9
- data/spec/dummy/app/admin/dashboard.rb +0 -5
- data/spec/dummy/app/assets/javascripts/active_admin.js +0 -2
- data/spec/dummy/app/assets/javascripts/application.js +0 -15
- data/spec/dummy/app/assets/javascripts/jquery.simulate.js +0 -314
- data/spec/dummy/app/assets/stylesheets/active_admin.css.scss +0 -17
- data/spec/dummy/app/assets/stylesheets/application.css +0 -13
- data/spec/dummy/app/controllers/application_controller.rb +0 -3
- data/spec/dummy/app/helpers/application_helper.rb +0 -2
- data/spec/dummy/app/mailers/.gitkeep +0 -0
- data/spec/dummy/app/models/.gitkeep +0 -0
- data/spec/dummy/app/models/admin_user.rb +0 -6
- data/spec/dummy/app/models/category.rb +0 -4
- data/spec/dummy/app/views/layouts/application.html.erb +0 -14
- data/spec/dummy/config.ru +0 -4
- data/spec/dummy/config/application.rb +0 -56
- data/spec/dummy/config/boot.rb +0 -10
- data/spec/dummy/config/database.yml +0 -25
- data/spec/dummy/config/environment.rb +0 -5
- data/spec/dummy/config/environments/development.rb +0 -28
- data/spec/dummy/config/environments/production.rb +0 -64
- data/spec/dummy/config/environments/test.rb +0 -32
- data/spec/dummy/config/initializers/active_admin.rb +0 -231
- data/spec/dummy/config/initializers/backtrace_silencers.rb +0 -7
- data/spec/dummy/config/initializers/devise.rb +0 -256
- data/spec/dummy/config/initializers/inflections.rb +0 -15
- data/spec/dummy/config/initializers/mime_types.rb +0 -5
- data/spec/dummy/config/initializers/secret_token.rb +0 -8
- data/spec/dummy/config/initializers/session_store.rb +0 -8
- data/spec/dummy/config/initializers/wrap_parameters.rb +0 -14
- data/spec/dummy/config/locales/devise.en.yml +0 -59
- data/spec/dummy/config/locales/en.yml +0 -5
- data/spec/dummy/config/routes.rb +0 -61
- data/spec/dummy/db/migrate/20140806024135_devise_create_admin_users.rb +0 -48
- data/spec/dummy/db/migrate/20140806024139_create_active_admin_comments.rb +0 -19
- data/spec/dummy/db/migrate/20140806032156_create_categories.rb +0 -12
- data/spec/dummy/db/schema.rb +0 -58
- data/spec/dummy/lib/assets/.gitkeep +0 -0
- data/spec/dummy/log/.gitkeep +0 -0
- data/spec/dummy/public/404.html +0 -26
- data/spec/dummy/public/422.html +0 -26
- data/spec/dummy/public/500.html +0 -25
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +0 -6
- data/spec/features/sortable_spec.rb +0 -96
- data/spec/rails_helper.rb +0 -65
- data/spec/spec_helper.rb +0 -58
- data/spec/support/wait_for_ajax.rb +0 -19
@@ -1,19 +0,0 @@
|
|
1
|
-
module WaitForAjax
|
2
|
-
def wait_for_ajax(count = 1)
|
3
|
-
page.execute_script 'window._ajaxCalls = 0, window._ajaxCompleteCounter = function() { window._ajaxCalls += 1; }'
|
4
|
-
page.execute_script '$(document).on("ajaxComplete", window._ajaxCompleteCounter)'
|
5
|
-
|
6
|
-
yield
|
7
|
-
|
8
|
-
Timeout.timeout(Capybara.default_wait_time) do
|
9
|
-
loop until finished_all_ajax_requests?(count)
|
10
|
-
end
|
11
|
-
|
12
|
-
page.execute_script '$(document).off("ajaxComplete", window._ajaxCompleteCounter)'
|
13
|
-
page.execute_script 'delete window._ajaxCompleteCounter, window._ajaxCalls'
|
14
|
-
end
|
15
|
-
|
16
|
-
def finished_all_ajax_requests?(count)
|
17
|
-
page.evaluate_script('window._ajaxCalls') == count
|
18
|
-
end
|
19
|
-
end
|