wice_grid 3.6.2 → 4.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.circleci/config.yml +41 -0
- data/.circleci/run-build-locally.sh +7 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +32 -0
- data/.gitignore +5 -2
- data/Appraisals +11 -0
- data/CHANGELOG.md +38 -1
- data/Gemfile.lock +299 -0
- data/README.md +77 -34
- data/config/locales/ja.yml +3 -3
- data/gemfiles/rails_5.0.gemfile +7 -0
- data/gemfiles/rails_5.0.gemfile.lock +291 -0
- data/gemfiles/rails_5.1.gemfile +7 -0
- data/gemfiles/rails_5.1.gemfile.lock +291 -0
- data/gemfiles/rails_5.2.gemfile +7 -0
- data/gemfiles/rails_5.2.gemfile.lock +299 -0
- data/lib/wice/columns.rb +13 -6
- data/lib/wice/columns/column_integer.rb +11 -1
- data/lib/wice/columns/column_rails_datetime_helper.rb +3 -2
- data/lib/wice/columns/column_range.rb +6 -4
- data/lib/wice/grid_renderer.rb +23 -7
- data/lib/wice/helpers/bs_calendar_helpers.rb +9 -1
- data/lib/wice/helpers/wice_grid_view_helpers.rb +6 -6
- data/lib/wice/wice_grid_controller.rb +7 -5
- data/lib/wice/wice_grid_core_ext.rb +5 -1
- data/lib/wice/wice_grid_misc.rb +1 -1
- data/lib/wice_grid.rb +86 -59
- data/spec/acceptance_helper.rb +58 -0
- data/spec/features/action_column_request_spec.rb +280 -0
- data/spec/features/adding_rows_request_spec.rb +21 -0
- data/spec/features/all_records_request_spec.rb +18 -0
- data/spec/features/auto_reloads2_request_spec.rb +349 -0
- data/spec/features/auto_reloads3_request_spec.rb +130 -0
- data/spec/features/auto_reloads_request_spec.rb +348 -0
- data/spec/features/basics1_request_spec.rb +11 -0
- data/spec/features/basics2_request_spec.rb +10 -0
- data/spec/features/basics3_request_spec.rb +29 -0
- data/spec/features/basics4_request_spec.rb +19 -0
- data/spec/features/basics5_request_spec.rb +13 -0
- data/spec/features/basics6_request_spec.rb +22 -0
- data/spec/features/blockless_column_definition_spec.rb +27 -0
- data/spec/features/buttons_request_spec.rb +172 -0
- data/spec/features/csv_and_detached_filters_spec.rb +10 -0
- data/spec/features/csv_export_request_spec.rb +13 -0
- data/spec/features/custom_filter_params_request_spec.rb +29 -0
- data/spec/features/custom_filters1_request_spec.rb +155 -0
- data/spec/features/custom_filters2_request_spec.rb +53 -0
- data/spec/features/custom_filters3_request_spec.rb +50 -0
- data/spec/features/custom_filters4_request_spec.rb +13 -0
- data/spec/features/custom_ordering_on_calculated_request_spec.rb +30 -0
- data/spec/features/custom_ordering_request_spec.rb +36 -0
- data/spec/features/custom_ordering_with_arel_request_spec.rb +36 -0
- data/spec/features/custom_ordering_with_proc_request_spec.rb +44 -0
- data/spec/features/custom_ordering_with_ruby_request_spec.rb +30 -0
- data/spec/features/dates_request_spec.rb +56 -0
- data/spec/features/detached_filters_spec.rb +10 -0
- data/spec/features/detached_filters_two_grids_spec.rb +127 -0
- data/spec/features/disable_all_filters_spec.rb +22 -0
- data/spec/features/hiding_checkboxes_in_action_column_request_spec.rb +294 -0
- data/spec/features/integration_with_application_view_request_spec.rb +43 -0
- data/spec/features/integration_with_forms_request_spec.rb +141 -0
- data/spec/features/joining_tables_spec.rb +40 -0
- data/spec/features/localization_request_spec.rb +24 -0
- data/spec/features/many_grids_on_page_request_spec.rb +104 -0
- data/spec/features/negation_request_spec.rb +25 -0
- data/spec/features/no_records_request_spec.rb +26 -0
- data/spec/features/numeric_filters_request_spec.rb +10 -0
- data/spec/features/resultset_processings2_request_spec.rb +27 -0
- data/spec/features/resultset_processings_request_spec.rb +30 -0
- data/spec/features/saved_queries_request_spec.rb +120 -0
- data/spec/features/shared.rb +1005 -0
- data/spec/features/shared_detached_filters.rb +158 -0
- data/spec/features/styling_spec.rb +15 -0
- data/spec/features/two_associations_spec.rb +48 -0
- data/spec/features/upper_pagination_panel_request_spec.rb +23 -0
- data/spec/features/when_filtered_spec.rb +209 -0
- data/spec/fixtures/.gitkeep +0 -0
- data/spec/fixtures/companies.yml +21 -0
- data/spec/fixtures/priorities.yml +31 -0
- data/spec/fixtures/project_roles.yml +25 -0
- data/spec/fixtures/projects.yml +22 -0
- data/spec/fixtures/statuses.yml +55 -0
- data/spec/fixtures/tasks.yml +751 -0
- data/spec/fixtures/tasks_users.yml +2089 -0
- data/spec/fixtures/users.yml +61 -0
- data/spec/fixtures/versions.yml +78 -0
- data/spec/models/company_spec.rb +6 -0
- data/spec/models/priority_spec.rb +6 -0
- data/spec/models/project_spec.rb +11 -0
- data/spec/models/status_spec.rb +6 -0
- data/spec/models/task_spec.rb +12 -0
- data/spec/models/user_project_participation_spec.rb +7 -0
- data/spec/models/user_spec.rb +12 -0
- data/spec/models/version_spec.rb +5 -0
- data/spec/rails_helper.rb +15 -0
- data/spec/spec_helper.rb +10 -9
- data/spec/support/test_app/Rakefile +3 -0
- data/spec/support/test_app/app/assets/javascripts/application.js +20 -0
- data/spec/support/test_app/app/assets/javascripts/common.js.coffee +6 -0
- data/spec/support/test_app/app/assets/javascripts/jquery.ui.datepicker.locales.js +56 -0
- data/spec/support/test_app/app/assets/stylesheets/adding_rows.scss +3 -0
- data/spec/support/test_app/app/assets/stylesheets/application.scss +46 -0
- data/spec/support/test_app/app/assets/stylesheets/csv_and_detached_filters.scss +3 -0
- data/spec/support/test_app/app/assets/stylesheets/many_grids_on_page.scss +3 -0
- data/spec/support/test_app/app/controllers/action_column_controller.rb +15 -0
- data/spec/support/test_app/app/controllers/adding_rows_controller.rb +14 -0
- data/spec/support/test_app/app/controllers/all_records_controller.rb +14 -0
- data/spec/support/test_app/app/controllers/application_controller.rb +99 -0
- data/spec/support/test_app/app/controllers/auto_reloads2_controller.rb +14 -0
- data/spec/support/test_app/app/controllers/auto_reloads3_controller.rb +20 -0
- data/spec/support/test_app/app/controllers/auto_reloads_controller.rb +14 -0
- data/spec/support/test_app/app/controllers/basics1_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/basics2_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/basics3_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/basics4_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/basics5_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/basics6_controller.rb +11 -0
- data/spec/support/test_app/app/controllers/blockless_column_definition_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/buttons_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/csv_and_detached_filters_controller.rb +13 -0
- data/spec/support/test_app/app/controllers/csv_export_controller.rb +28 -0
- data/spec/support/test_app/app/controllers/custom_filter_params_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/custom_filters1_controller.rb +9 -0
- data/spec/support/test_app/app/controllers/custom_filters2_controller.rb +14 -0
- data/spec/support/test_app/app/controllers/custom_filters3_controller.rb +12 -0
- data/spec/support/test_app/app/controllers/custom_filters4_controller.rb +12 -0
- data/spec/support/test_app/app/controllers/custom_ordering_controller.rb +18 -0
- data/spec/support/test_app/app/controllers/custom_ordering_on_calculated_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/custom_ordering_with_arel_controller.rb +18 -0
- data/spec/support/test_app/app/controllers/custom_ordering_with_proc_controller.rb +11 -0
- data/spec/support/test_app/app/controllers/custom_ordering_with_ruby_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/dates_controller.rb +8 -0
- data/spec/support/test_app/app/controllers/detached_filters_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/detached_filters_two_grids_controller.rb +7 -0
- data/spec/support/test_app/app/controllers/disable_all_filters_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/hiding_checkboxes_in_action_column_controller.rb +13 -0
- data/spec/support/test_app/app/controllers/home_controller.rb +3 -0
- data/spec/support/test_app/app/controllers/integration_with_application_view_controller.rb +16 -0
- data/spec/support/test_app/app/controllers/integration_with_forms_controller.rb +11 -0
- data/spec/support/test_app/app/controllers/joining_tables_controller.rb +11 -0
- data/spec/support/test_app/app/controllers/localization_controller.rb +26 -0
- data/spec/support/test_app/app/controllers/many_grids_on_page_controller.rb +7 -0
- data/spec/support/test_app/app/controllers/negation_controller.rb +14 -0
- data/spec/support/test_app/app/controllers/no_records_controller.rb +8 -0
- data/spec/support/test_app/app/controllers/null_values_controller.rb +10 -0
- data/spec/support/test_app/app/controllers/numeric_filters_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/queries_controller.rb +4 -0
- data/spec/support/test_app/app/controllers/resultset_processings2_controller.rb +29 -0
- data/spec/support/test_app/app/controllers/resultset_processings_controller.rb +30 -0
- data/spec/support/test_app/app/controllers/saved_queries_controller.rb +14 -0
- data/spec/support/test_app/app/controllers/styling_controller.rb +7 -0
- data/spec/support/test_app/app/controllers/tasks_controller.rb +14 -0
- data/spec/support/test_app/app/controllers/two_associations_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/upper_pagination_panel_controller.rb +6 -0
- data/spec/support/test_app/app/controllers/when_filtered_controller.rb +6 -0
- data/spec/support/test_app/app/helpers/application_helper.rb +82 -0
- data/spec/support/test_app/app/mailers/.gitkeep +0 -0
- data/spec/support/test_app/app/models/.gitkeep +0 -0
- data/spec/support/test_app/app/models/company.rb +5 -0
- data/spec/support/test_app/app/models/populate.rb +84 -0
- data/spec/support/test_app/app/models/priority.rb +10 -0
- data/spec/support/test_app/app/models/project.rb +14 -0
- data/spec/support/test_app/app/models/project_role.rb +3 -0
- data/spec/support/test_app/app/models/status.rb +10 -0
- data/spec/support/test_app/app/models/task.rb +11 -0
- data/spec/support/test_app/app/models/to_dropdown_mixin.rb +16 -0
- data/spec/support/test_app/app/models/user.rb +8 -0
- data/spec/support/test_app/app/models/user_project_participation.rb +6 -0
- data/spec/support/test_app/app/models/version.rb +6 -0
- data/spec/support/test_app/app/views/action_column/_grid.html.erb +35 -0
- data/spec/support/test_app/app/views/action_column/index.html.haml +45 -0
- data/spec/support/test_app/app/views/adding_rows/_grid.html.erb +58 -0
- data/spec/support/test_app/app/views/adding_rows/index.html.haml +37 -0
- data/spec/support/test_app/app/views/all_records/_grid.html.erb +30 -0
- data/spec/support/test_app/app/views/all_records/index.html.haml +12 -0
- data/spec/support/test_app/app/views/auto_reloads/_grid.html.erb +32 -0
- data/spec/support/test_app/app/views/auto_reloads/index.html.haml +15 -0
- data/spec/support/test_app/app/views/auto_reloads2/_grid.html.erb +32 -0
- data/spec/support/test_app/app/views/auto_reloads2/index.html.haml +65 -0
- data/spec/support/test_app/app/views/auto_reloads3/_grid.html.erb +25 -0
- data/spec/support/test_app/app/views/auto_reloads3/index.html.haml +78 -0
- data/spec/support/test_app/app/views/basics1/_grid.html.erb +26 -0
- data/spec/support/test_app/app/views/basics1/index.html.haml +13 -0
- data/spec/support/test_app/app/views/basics2/_grid.html.erb +27 -0
- data/spec/support/test_app/app/views/basics2/index.html.haml +12 -0
- data/spec/support/test_app/app/views/basics3/_grid.html.erb +28 -0
- data/spec/support/test_app/app/views/basics3/index.html.haml +13 -0
- data/spec/support/test_app/app/views/basics4/_grid.html.erb +21 -0
- data/spec/support/test_app/app/views/basics4/index.html.haml +12 -0
- data/spec/support/test_app/app/views/basics5/_grid.html.erb +19 -0
- data/spec/support/test_app/app/views/basics5/index.html.haml +12 -0
- data/spec/support/test_app/app/views/basics6/_grid.html.erb +19 -0
- data/spec/support/test_app/app/views/basics6/index.html.haml +23 -0
- data/spec/support/test_app/app/views/blockless_column_definition/_grid.html.erb +19 -0
- data/spec/support/test_app/app/views/blockless_column_definition/index.html.haml +15 -0
- data/spec/support/test_app/app/views/buttons/_grid.html.erb +20 -0
- data/spec/support/test_app/app/views/buttons/index.html.haml +30 -0
- data/spec/support/test_app/app/views/csv_and_detached_filters/_grid.html.erb +23 -0
- data/spec/support/test_app/app/views/csv_and_detached_filters/index.html.haml +58 -0
- data/spec/support/test_app/app/views/csv_export/_projects_grid.html.erb +17 -0
- data/spec/support/test_app/app/views/csv_export/_tasks_grid.html.erb +43 -0
- data/spec/support/test_app/app/views/csv_export/index.html.haml +90 -0
- data/spec/support/test_app/app/views/custom_filter_params/_grid.html.erb +12 -0
- data/spec/support/test_app/app/views/custom_filter_params/index.html.haml +12 -0
- data/spec/support/test_app/app/views/custom_filters1/_g1.html.erb +8 -0
- data/spec/support/test_app/app/views/custom_filters1/_g2.html.erb +9 -0
- data/spec/support/test_app/app/views/custom_filters1/_g3.html.erb +9 -0
- data/spec/support/test_app/app/views/custom_filters1/_g4.html.erb +8 -0
- data/spec/support/test_app/app/views/custom_filters1/index.html.haml +30 -0
- data/spec/support/test_app/app/views/custom_filters2/_grid.html.erb +30 -0
- data/spec/support/test_app/app/views/custom_filters2/index.html.haml +41 -0
- data/spec/support/test_app/app/views/custom_filters3/_grid.html.erb +18 -0
- data/spec/support/test_app/app/views/custom_filters3/index.html.haml +16 -0
- data/spec/support/test_app/app/views/custom_filters4/_grid.html.erb +20 -0
- data/spec/support/test_app/app/views/custom_filters4/index.html.haml +12 -0
- data/spec/support/test_app/app/views/custom_ordering/_grid.html.erb +10 -0
- data/spec/support/test_app/app/views/custom_ordering/index.html.haml +24 -0
- data/spec/support/test_app/app/views/custom_ordering_on_calculated/_grid.html.erb +14 -0
- data/spec/support/test_app/app/views/custom_ordering_on_calculated/index.html.haml +23 -0
- data/spec/support/test_app/app/views/custom_ordering_with_arel/_grid.html.erb +10 -0
- data/spec/support/test_app/app/views/custom_ordering_with_arel/index.html.haml +24 -0
- data/spec/support/test_app/app/views/custom_ordering_with_proc/_grid.html.erb +10 -0
- data/spec/support/test_app/app/views/custom_ordering_with_proc/index.html.haml +21 -0
- data/spec/support/test_app/app/views/custom_ordering_with_ruby/_grid.html.erb +10 -0
- data/spec/support/test_app/app/views/custom_ordering_with_ruby/index.html.haml +23 -0
- data/spec/support/test_app/app/views/dates/_grid.html.erb +25 -0
- data/spec/support/test_app/app/views/dates/index.html.haml +52 -0
- data/spec/support/test_app/app/views/detached_filters/_grid.html.erb +23 -0
- data/spec/support/test_app/app/views/detached_filters/index.html.haml +79 -0
- data/spec/support/test_app/app/views/detached_filters_two_grids/_grid.html.erb +23 -0
- data/spec/support/test_app/app/views/detached_filters_two_grids/index.html.haml +85 -0
- data/spec/support/test_app/app/views/disable_all_filters/_grid.html.erb +21 -0
- data/spec/support/test_app/app/views/disable_all_filters/index.html.haml +14 -0
- data/spec/support/test_app/app/views/hiding_checkboxes_in_action_column/_grid.html.erb +34 -0
- data/spec/support/test_app/app/views/hiding_checkboxes_in_action_column/index.html.haml +32 -0
- data/spec/support/test_app/app/views/integration_with_application_view/_grid.html.erb +27 -0
- data/spec/support/test_app/app/views/integration_with_application_view/index.html.haml +33 -0
- data/spec/support/test_app/app/views/integration_with_forms/_grid.html.erb +23 -0
- data/spec/support/test_app/app/views/integration_with_forms/index.html.haml +18 -0
- data/spec/support/test_app/app/views/joining_tables/_grid.html.erb +23 -0
- data/spec/support/test_app/app/views/joining_tables/index.html.haml +26 -0
- data/spec/support/test_app/app/views/layouts/application.html.haml +61 -0
- data/spec/support/test_app/app/views/localization/_grid.html.erb +36 -0
- data/spec/support/test_app/app/views/localization/index.html.haml +20 -0
- data/spec/support/test_app/app/views/many_grids_on_page/_tasks_grid1.html.erb +12 -0
- data/spec/support/test_app/app/views/many_grids_on_page/_tasks_grid2.html.erb +12 -0
- data/spec/support/test_app/app/views/many_grids_on_page/index.html.haml +26 -0
- data/spec/support/test_app/app/views/negation/_grid.html.erb +30 -0
- data/spec/support/test_app/app/views/negation/index.html.haml +15 -0
- data/spec/support/test_app/app/views/no_records/_empty_grid.html.haml +1 -0
- data/spec/support/test_app/app/views/no_records/_grid1.html.erb +11 -0
- data/spec/support/test_app/app/views/no_records/_grid2.html.erb +9 -0
- data/spec/support/test_app/app/views/no_records/_grid3.html.erb +9 -0
- data/spec/support/test_app/app/views/no_records/index.html.haml +24 -0
- data/spec/support/test_app/app/views/null_values/_grid.html.erb +17 -0
- data/spec/support/test_app/app/views/null_values/index.html.haml +21 -0
- data/spec/support/test_app/app/views/numeric_filters/_grid.html.erb +19 -0
- data/spec/support/test_app/app/views/numeric_filters/index.html.haml +12 -0
- data/spec/support/test_app/app/views/resultset_processings/_grid.html.erb +27 -0
- data/spec/support/test_app/app/views/resultset_processings/index.html.haml +50 -0
- data/spec/support/test_app/app/views/resultset_processings2/_grid.html.erb +27 -0
- data/spec/support/test_app/app/views/resultset_processings2/index.html.haml +48 -0
- data/spec/support/test_app/app/views/saved_queries/_grid.html.erb +30 -0
- data/spec/support/test_app/app/views/saved_queries/index.html.haml +15 -0
- data/spec/support/test_app/app/views/styling/_grid1.html.erb +12 -0
- data/spec/support/test_app/app/views/styling/_grid2.html.erb +31 -0
- data/spec/support/test_app/app/views/styling/index.html.haml +65 -0
- data/spec/support/test_app/app/views/tasks/_grid.html.erb +19 -0
- data/spec/support/test_app/app/views/tasks/index.html.haml +1 -0
- data/spec/support/test_app/app/views/two_associations/_grid.html.erb +13 -0
- data/spec/support/test_app/app/views/two_associations/index.html.haml +13 -0
- data/spec/support/test_app/app/views/upper_pagination_panel/_grid.html.erb +27 -0
- data/spec/support/test_app/app/views/upper_pagination_panel/index.html.haml +14 -0
- data/spec/support/test_app/app/views/when_filtered/_grid.html.erb +19 -0
- data/spec/support/test_app/app/views/when_filtered/index.html.haml +15 -0
- data/spec/support/test_app/bin/rails +4 -0
- data/spec/support/test_app/bin/rake +4 -0
- data/spec/support/test_app/config.ru +5 -0
- data/spec/support/test_app/config/application.rb +70 -0
- data/spec/support/test_app/config/boot.rb +7 -0
- data/spec/support/test_app/config/database.travis.yml +27 -0
- data/spec/support/test_app/config/database.yml +16 -0
- data/spec/support/test_app/config/database.yml.mysql +19 -0
- data/spec/support/test_app/config/database.yml.postgresql +18 -0
- data/spec/support/test_app/config/environment.rb +6 -0
- data/spec/support/test_app/config/environments/development.rb +34 -0
- data/spec/support/test_app/config/environments/production.rb +66 -0
- data/spec/support/test_app/config/environments/test.rb +34 -0
- data/spec/support/test_app/config/initializers/backtrace_silencers.rb +8 -0
- data/spec/support/test_app/config/initializers/inflections.rb +16 -0
- data/spec/support/test_app/config/initializers/mime_types.rb +6 -0
- data/spec/support/test_app/config/initializers/secret_token.rb +12 -0
- data/spec/support/test_app/config/initializers/session_store.rb +9 -0
- data/spec/support/test_app/config/initializers/wice_grid_config.rb +163 -0
- data/spec/support/test_app/config/initializers/wrap_parameters.rb +15 -0
- data/spec/support/test_app/config/locales/en.yml +5 -0
- data/spec/support/test_app/config/locales/wice_grid.yml +550 -0
- data/spec/support/test_app/config/puma.rb +15 -0
- data/spec/support/test_app/config/routes.rb +125 -0
- data/spec/support/test_app/db/migrate/20120224193505_create_tasks.rb +27 -0
- data/spec/support/test_app/db/migrate/20120224193517_create_users.rb +12 -0
- data/spec/support/test_app/db/migrate/20120224193522_create_projects.rb +14 -0
- data/spec/support/test_app/db/migrate/20120224193529_create_priorities.rb +13 -0
- data/spec/support/test_app/db/migrate/20120224193537_create_statuses.rb +13 -0
- data/spec/support/test_app/db/migrate/20120224193543_create_versions.rb +15 -0
- data/spec/support/test_app/db/migrate/20120224193550_create_project_roles.rb +12 -0
- data/spec/support/test_app/db/migrate/20120224193610_create_companies.rb +12 -0
- data/spec/support/test_app/db/migrate/20120224195351_create_user_project_participations.rb +16 -0
- data/spec/support/test_app/db/migrate/20120224195521_add_tasks_users.rb +11 -0
- data/spec/support/test_app/db/migrate/20120610091944_create_wice_grid_serialized_queries.rb +14 -0
- data/spec/support/test_app/db/schema.rb +139 -0
- data/spec/support/test_app/db/seeds.rb +10 -0
- data/spec/support/test_app/lib/ar_fixtures.rb +100 -0
- data/spec/support/test_app/lib/assets/.gitkeep +0 -0
- data/spec/support/test_app/lib/tasks/.gitkeep +0 -0
- data/spec/support/test_app/lib/tasks/ar_fixtures.rake +45 -0
- data/spec/support/test_app/public/404.html +26 -0
- data/spec/support/test_app/public/422.html +26 -0
- data/spec/support/test_app/public/500.html +25 -0
- data/spec/support/test_app/public/favicon.ico +0 -0
- data/spec/support/test_app/public/robots.txt +5 -0
- data/spec/wice/grid_output_buffer_spec.rb +2 -2
- data/spec/wice/table_column_matrix_spec.rb +1 -1
- data/vendor/assets/javascripts/wice_grid_init.js.coffee +16 -4
- data/vendor/assets/javascripts/wice_grid_saved_queries_init.js.coffee +1 -0
- data/wice_grid.gemspec +29 -9
- metadata +606 -62
- data/release_notes/RELEASE_NOTES_3.2.pre1.rdoc +0 -81
- data/release_notes/RELEASE_NOTES_3.2.pre2.rdoc +0 -6
- data/release_notes/RELEASE_NOTES_3.3.0.rdoc +0 -21
- data/spec/support/wice_grid_test_config.rb +0 -173
- data/test/readme.txt +0 -1
@@ -0,0 +1,58 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'capybara/rspec'
|
3
|
+
|
4
|
+
# This file is copied to spec/ when you run 'rails generate rspec:install'
|
5
|
+
ENV['RAILS_ENV'] ||= 'test'
|
6
|
+
require File.expand_path('../support/test_app/config/environment', __FILE__)
|
7
|
+
require 'rspec/rails'
|
8
|
+
require 'faker'
|
9
|
+
|
10
|
+
if ENV['BROWSER']
|
11
|
+
Capybara.default_driver = :selenium
|
12
|
+
else
|
13
|
+
require 'capybara/poltergeist'
|
14
|
+
Capybara.javascript_driver = :poltergeist
|
15
|
+
|
16
|
+
require 'capybara-screenshot/rspec'
|
17
|
+
Capybara::Screenshot.prune_strategy = :keep_last_run
|
18
|
+
end
|
19
|
+
|
20
|
+
# Slow down responses to help debug tests that have race conditions.
|
21
|
+
if ENV['TEST_RESPONSE_DELAY']
|
22
|
+
Capybara.default_wait_time += ENV['TEST_RESPONSE_DELAY'].to_i
|
23
|
+
|
24
|
+
class ActionController::Base
|
25
|
+
before_action { sleep ENV['TEST_RESPONSE_DELAY'].to_i }
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
# Requires supporting ruby files with custom matchers and macros, etc,
|
30
|
+
# in spec/support/ and its subdirectories.
|
31
|
+
Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f }
|
32
|
+
|
33
|
+
ALL_TESTS = false
|
34
|
+
|
35
|
+
RSpec.configure do |config|
|
36
|
+
# config.mock_with :mocha
|
37
|
+
# config.mock_with :flexmock
|
38
|
+
# config.mock_with :rr
|
39
|
+
|
40
|
+
config.fixture_path = "spec/fixtures"
|
41
|
+
|
42
|
+
config.use_transactional_fixtures = true
|
43
|
+
|
44
|
+
# If true, the base class of anonymous controllers will be inferred
|
45
|
+
# automatically. This will be the default behavior in future versions of
|
46
|
+
# rspec-rails.
|
47
|
+
config.infer_base_class_for_anonymous_controllers = false
|
48
|
+
|
49
|
+
config.global_fixtures = :all
|
50
|
+
|
51
|
+
config.include Capybara::DSL
|
52
|
+
end
|
53
|
+
|
54
|
+
# Disable SQL logging
|
55
|
+
ActiveRecord::Base.logger = nil
|
56
|
+
|
57
|
+
require 'features/shared.rb'
|
58
|
+
require 'features/shared_detached_filters.rb'
|
@@ -0,0 +1,280 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'acceptance_helper'
|
3
|
+
|
4
|
+
describe 'action_column WiceGrid', type: :request, js: true do
|
5
|
+
before :each do
|
6
|
+
visit '/action_column'
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'should select rows' do
|
10
|
+
510.upto(520).each do |i|
|
11
|
+
find(:css, %(input[type="checkbox"][value="#{i}"])).click
|
12
|
+
end
|
13
|
+
|
14
|
+
first(:css, 'button.btn', text: 'Process tasks').click
|
15
|
+
|
16
|
+
expect(page).to have_content('Selected tasks: 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, and 520')
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'should select rows with the select all button and deselect them with the deselect button' do
|
20
|
+
find(:css, '.clickable.select-all').click
|
21
|
+
|
22
|
+
first(:css, 'button.btn', text: 'Process tasks').click
|
23
|
+
|
24
|
+
expect(page).to have_content('Selected tasks: 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, and 526')
|
25
|
+
|
26
|
+
find(:css, '.clickable.deselect-all').click
|
27
|
+
|
28
|
+
first(:css, 'button.btn', text: 'Process tasks').click
|
29
|
+
|
30
|
+
expect(page).to have_no_content('Selected tasks: 507, 508, 509, 510, 511, 512, 513, 514, 515, 516, 517, 518, 519, 520, 521, 522, 523, 524, 525, and 526')
|
31
|
+
end
|
32
|
+
|
33
|
+
it 'should filter by ID inside a form, two limits' do
|
34
|
+
fill_in('g_f_id_fr', with: 507)
|
35
|
+
fill_in('g_f_id_to', with: 509)
|
36
|
+
|
37
|
+
first(:css, 'button.btn', text: 'Process tasks').click
|
38
|
+
|
39
|
+
within '.pagination_status' do
|
40
|
+
expect(page).to have_content('1-3 / 3')
|
41
|
+
end
|
42
|
+
|
43
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
44
|
+
expect(page).to have_content('507')
|
45
|
+
end
|
46
|
+
|
47
|
+
expect(page).to have_content('508')
|
48
|
+
expect(page).to have_content('509')
|
49
|
+
|
50
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
51
|
+
click_on 'ID'
|
52
|
+
end
|
53
|
+
|
54
|
+
within '.pagination_status' do
|
55
|
+
expect(page).to have_content('1-3 / 3')
|
56
|
+
end
|
57
|
+
|
58
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted.active-filter' do
|
59
|
+
expect(page).to have_content('509')
|
60
|
+
end
|
61
|
+
|
62
|
+
expect(page).to have_content('508')
|
63
|
+
expect(page).to have_content('509')
|
64
|
+
|
65
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
66
|
+
click_on 'ID'
|
67
|
+
end
|
68
|
+
|
69
|
+
within '.pagination_status' do
|
70
|
+
expect(page).to have_content('1-3 / 3')
|
71
|
+
end
|
72
|
+
|
73
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
74
|
+
expect(page).to have_content('507')
|
75
|
+
end
|
76
|
+
|
77
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
78
|
+
click_on 'Title'
|
79
|
+
end
|
80
|
+
|
81
|
+
within '.pagination_status' do
|
82
|
+
expect(page).to have_content('1-3 / 3')
|
83
|
+
end
|
84
|
+
end
|
85
|
+
|
86
|
+
it 'should filter by Archived inside a form' do
|
87
|
+
select 'yes', from: 'g_f_archived'
|
88
|
+
first(:css, 'button.btn', text: 'Process tasks').click
|
89
|
+
|
90
|
+
within '.pagination_status' do
|
91
|
+
expect(page).to have_content('1-4 / 4')
|
92
|
+
end
|
93
|
+
|
94
|
+
within first(:css, 'td.active-filter') do
|
95
|
+
expect(page).to have_content('Yes')
|
96
|
+
end
|
97
|
+
|
98
|
+
select 'no', from: 'g_f_archived'
|
99
|
+
first(:css, 'button.btn', text: 'Process tasks').click
|
100
|
+
|
101
|
+
within '.pagination_status' do
|
102
|
+
expect(page).to have_content('1-20 / 46')
|
103
|
+
end
|
104
|
+
|
105
|
+
within first(:css, 'td.active-filter') do
|
106
|
+
expect(page).to have_content('No')
|
107
|
+
end
|
108
|
+
|
109
|
+
within 'ul.pagination' do
|
110
|
+
click_link '2'
|
111
|
+
end
|
112
|
+
|
113
|
+
within '.pagination_status' do
|
114
|
+
expect(page).to have_content('21-40 / 46')
|
115
|
+
end
|
116
|
+
|
117
|
+
within first(:css, 'td.active-filter') do
|
118
|
+
expect(page).to have_content('No')
|
119
|
+
end
|
120
|
+
end
|
121
|
+
|
122
|
+
it 'should filter by Added inside a form' do
|
123
|
+
set_datepicker(self, 'g_f_created_at_fr_date_placeholder', 2011, 5, 1)
|
124
|
+
|
125
|
+
set_datepicker(self, 'g_f_created_at_to_date_placeholder', 2011, 9, 1)
|
126
|
+
|
127
|
+
first(:css, 'button.btn', text: 'Process tasks').click
|
128
|
+
|
129
|
+
within '.pagination_status' do
|
130
|
+
expect(page).to have_content('1-20 / 29')
|
131
|
+
end
|
132
|
+
|
133
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
134
|
+
expect(page).to have_content('2011-09-13 22:11:12')
|
135
|
+
end
|
136
|
+
|
137
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
138
|
+
click_on 'ID'
|
139
|
+
end
|
140
|
+
|
141
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
142
|
+
expect(page).to have_content('2011-09-29 22:11:12')
|
143
|
+
end
|
144
|
+
|
145
|
+
within '.pagination_status' do
|
146
|
+
expect(page).to have_content('1-20 / 29')
|
147
|
+
end
|
148
|
+
|
149
|
+
within 'ul.pagination' do
|
150
|
+
click_link '2'
|
151
|
+
end
|
152
|
+
|
153
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
154
|
+
# page.should have_content('2011-08-14 22:11:12')
|
155
|
+
expect(page).to have_content('2011-09-22 22:11:12')
|
156
|
+
end
|
157
|
+
end
|
158
|
+
|
159
|
+
it 'should filter by Due Date' do
|
160
|
+
set_datepicker(self, 'g_f_due_date_fr_date_placeholder', 2012, 0, 1)
|
161
|
+
|
162
|
+
set_datepicker(self, 'g_f_due_date_to_date_placeholder', 2013, 0, 1)
|
163
|
+
|
164
|
+
first(:css, 'button.btn', text: 'Process tasks').click
|
165
|
+
|
166
|
+
within '.pagination_status' do
|
167
|
+
expect(page).to have_content('1-20 / 35')
|
168
|
+
end
|
169
|
+
|
170
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
171
|
+
expect(page).to have_content('2012-07-29')
|
172
|
+
end
|
173
|
+
|
174
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
175
|
+
click_on 'ID'
|
176
|
+
end
|
177
|
+
|
178
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
179
|
+
expect(page).to have_content('2012-10-02')
|
180
|
+
end
|
181
|
+
|
182
|
+
within '.pagination_status' do
|
183
|
+
expect(page).to have_content('1-20 / 35')
|
184
|
+
end
|
185
|
+
|
186
|
+
within 'ul.pagination' do
|
187
|
+
click_link '2'
|
188
|
+
end
|
189
|
+
|
190
|
+
within '.pagination_status' do
|
191
|
+
expect(page).to have_content('21-35 / 35')
|
192
|
+
end
|
193
|
+
|
194
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
195
|
+
expect(page).to have_content('2012-07-02')
|
196
|
+
end
|
197
|
+
|
198
|
+
set_datepicker(self, 'g_f_due_date_fr_date_placeholder', 2012, 6, 28)
|
199
|
+
|
200
|
+
set_datepicker(self, 'g_f_due_date_to_date_placeholder', 2012, 6, 31)
|
201
|
+
|
202
|
+
first(:css, 'button.btn', text: 'Process tasks').click
|
203
|
+
|
204
|
+
within '.pagination_status' do
|
205
|
+
expect(page).to have_content('1-1 / 1')
|
206
|
+
end
|
207
|
+
|
208
|
+
find(:css, '#g_f_due_date_fr_date_view').click
|
209
|
+
|
210
|
+
first(:css, 'button.btn', text: 'Process tasks').click
|
211
|
+
|
212
|
+
within '.pagination_status' do
|
213
|
+
expect(page).to have_content('1-10 / 10')
|
214
|
+
end
|
215
|
+
|
216
|
+
find(:css, '#g_f_due_date_to_date_view').click
|
217
|
+
|
218
|
+
first(:css, 'button.btn', text: 'Process tasks').click
|
219
|
+
|
220
|
+
within '.pagination_status' do
|
221
|
+
expect(page).to have_content('1-20 / 50')
|
222
|
+
end
|
223
|
+
end
|
224
|
+
|
225
|
+
it 'should negate the semantics of the text filter inside a form' do
|
226
|
+
fill_in('g_f_title_v', with: 'sed')
|
227
|
+
select 'no', from: 'g_f_archived'
|
228
|
+
|
229
|
+
first(:css, 'button.btn', text: 'Process tasks').click
|
230
|
+
|
231
|
+
expect(page).to have_content('sed impedit iste')
|
232
|
+
|
233
|
+
find(:css, '#g_f_title_n').click
|
234
|
+
|
235
|
+
first(:css, 'button.btn', text: 'Process tasks').click
|
236
|
+
|
237
|
+
expect(page).to have_no_content('sed impedit iste')
|
238
|
+
end
|
239
|
+
|
240
|
+
it 'should reload the title filter' do
|
241
|
+
fill_in('g_f_title_v', with: 'ed')
|
242
|
+
|
243
|
+
first(:css, 'button.btn', text: 'Process tasks').click
|
244
|
+
|
245
|
+
within '.pagination_status' do
|
246
|
+
expect(page).to have_content('1-2 / 2')
|
247
|
+
end
|
248
|
+
|
249
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
250
|
+
expect(page).to have_content('sed impedit iste')
|
251
|
+
end
|
252
|
+
|
253
|
+
expect(page).to have_content('corporis expedita vel')
|
254
|
+
|
255
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
256
|
+
click_on 'Title'
|
257
|
+
end
|
258
|
+
|
259
|
+
within '.pagination_status' do
|
260
|
+
expect(page).to have_content('1-2 / 2')
|
261
|
+
end
|
262
|
+
|
263
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
264
|
+
expect(page).to have_content('corporis expedita vel')
|
265
|
+
end
|
266
|
+
|
267
|
+
expect(page).to have_content('sed impedit iste')
|
268
|
+
|
269
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
270
|
+
click_on 'ID'
|
271
|
+
end
|
272
|
+
|
273
|
+
within '.pagination_status' do
|
274
|
+
expect(page).to have_content('1-2 / 2')
|
275
|
+
end
|
276
|
+
|
277
|
+
expect(page).to have_content('corporis expedita vel')
|
278
|
+
expect(page).to have_content('sed impedit iste')
|
279
|
+
end
|
280
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'acceptance_helper'
|
3
|
+
|
4
|
+
describe 'adding rows WiceGrid', type: :request, js: true do
|
5
|
+
before :each do
|
6
|
+
visit '/adding_rows'
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'should filter by custom filters' do
|
10
|
+
select 'Urgent', from: 'grid_f_priority_id'
|
11
|
+
|
12
|
+
find(:css, '#grid_submit_grid_icon').click
|
13
|
+
|
14
|
+
['inventore architecto aut', 'veniam tempora', 'doloremque', 'qui animi', 'dolor et corporis'].each do |title|
|
15
|
+
expect(page).to have_content(title)
|
16
|
+
expect(page).to have_content("Panic! \"#{title}\"")
|
17
|
+
end
|
18
|
+
|
19
|
+
expect(page).to have_content("Don't panic")
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'acceptance_helper'
|
3
|
+
|
4
|
+
describe 'all records WiceGrid', type: :request, js: true do
|
5
|
+
before :each do
|
6
|
+
visit '/all_records'
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'should filter by custom filters' do
|
10
|
+
within 'div.wice-grid-container table.wice-grid tbody' do
|
11
|
+
expect(page).to have_no_content('show all')
|
12
|
+
end
|
13
|
+
|
14
|
+
within '.pagination_status' do
|
15
|
+
expect(page).to have_content('1-20 / 50')
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,349 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'acceptance_helper'
|
3
|
+
|
4
|
+
describe 'auto reloads 2 WiceGrid', type: :request, js: true do
|
5
|
+
before :each do
|
6
|
+
visit '/auto_reloads2'
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'should filter by Assigned custom filter' do
|
10
|
+
select 'Assigned', from: 'grid_f_status_id'
|
11
|
+
|
12
|
+
within '#grid .pagination_status' do
|
13
|
+
expect(page).to have_content('1-4 / 4')
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'should filter by grid_f_project_id custom filter' do
|
18
|
+
select 'Divine Firmware', from: 'grid_f_project_id'
|
19
|
+
|
20
|
+
within '#grid .pagination_status' do
|
21
|
+
expect(page).to have_content('1-15 / 15')
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'should filter by Added' do
|
26
|
+
set_datepicker(self, 'grid_f_created_at_fr_date_placeholder', 2011, 5, 1)
|
27
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
28
|
+
expect(page).to have_content('2011-09-13 22:11:12')
|
29
|
+
end
|
30
|
+
|
31
|
+
set_datepicker(self, 'grid_f_created_at_to_date_placeholder', 2011, 9, 1)
|
32
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
33
|
+
expect(page).to have_content('2011-09-13 22:11:12')
|
34
|
+
end
|
35
|
+
|
36
|
+
within '.pagination_status' do
|
37
|
+
expect(page).to have_content('1-20 / 29')
|
38
|
+
end
|
39
|
+
|
40
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
41
|
+
click_on 'ID'
|
42
|
+
end
|
43
|
+
|
44
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
45
|
+
expect(page).to have_content('2011-09-29 22:11:12')
|
46
|
+
end
|
47
|
+
|
48
|
+
within '.pagination_status' do
|
49
|
+
expect(page).to have_content('1-20 / 29')
|
50
|
+
end
|
51
|
+
|
52
|
+
within 'ul.pagination' do
|
53
|
+
click_link '2'
|
54
|
+
end
|
55
|
+
|
56
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
57
|
+
expect(page).to have_content('2011-09-22 22:11:12')
|
58
|
+
end
|
59
|
+
|
60
|
+
find(:css, '.wg-external-reset-button').click
|
61
|
+
within '.pagination_status' do
|
62
|
+
expect(page).to have_content('1-20 / 50')
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
66
|
+
it 'should filter by Archived' do
|
67
|
+
select 'yes', from: 'grid_f_archived'
|
68
|
+
# find(:css, '#grid_submit_grid_icon').click
|
69
|
+
|
70
|
+
within '.pagination_status' do
|
71
|
+
expect(page).to have_content('1-4 / 4')
|
72
|
+
end
|
73
|
+
|
74
|
+
within first(:css, 'td.active-filter') do
|
75
|
+
expect(page).to have_content('Yes')
|
76
|
+
end
|
77
|
+
|
78
|
+
select 'no', from: 'grid_f_archived'
|
79
|
+
# find(:css, '#grid_submit_grid_icon').click
|
80
|
+
|
81
|
+
within '.pagination_status' do
|
82
|
+
expect(page).to have_content('1-20 / 46')
|
83
|
+
end
|
84
|
+
|
85
|
+
within first(:css, 'td.active-filter') do
|
86
|
+
expect(page).to have_content('No')
|
87
|
+
end
|
88
|
+
|
89
|
+
within 'ul.pagination' do
|
90
|
+
click_link '2'
|
91
|
+
end
|
92
|
+
|
93
|
+
within '.pagination_status' do
|
94
|
+
expect(page).to have_content('21-40 / 46')
|
95
|
+
end
|
96
|
+
|
97
|
+
within first(:css, 'td.active-filter') do
|
98
|
+
expect(page).to have_content('No')
|
99
|
+
end
|
100
|
+
|
101
|
+
find(:css, '.wg-external-reset-button').click
|
102
|
+
within '.pagination_status' do
|
103
|
+
expect(page).to have_content('1-20 / 50')
|
104
|
+
end
|
105
|
+
end
|
106
|
+
|
107
|
+
it 'should filter by ID, two limits' do
|
108
|
+
fill_in('grid_f_id_fr', with: 507)
|
109
|
+
fill_in('grid_f_id_to', with: 509)
|
110
|
+
|
111
|
+
# find(:css, '#grid_submit_grid_icon').click
|
112
|
+
|
113
|
+
within '.pagination_status' do
|
114
|
+
expect(page).to have_content('1-3 / 3')
|
115
|
+
end
|
116
|
+
|
117
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
118
|
+
expect(page).to have_content('507')
|
119
|
+
end
|
120
|
+
|
121
|
+
expect(page).to have_content('508')
|
122
|
+
expect(page).to have_content('509')
|
123
|
+
|
124
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
125
|
+
click_on 'ID'
|
126
|
+
end
|
127
|
+
|
128
|
+
within '.pagination_status' do
|
129
|
+
expect(page).to have_content('1-3 / 3')
|
130
|
+
end
|
131
|
+
|
132
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted.active-filter' do
|
133
|
+
expect(page).to have_content('509')
|
134
|
+
end
|
135
|
+
|
136
|
+
expect(page).to have_content('507')
|
137
|
+
expect(page).to have_content('508')
|
138
|
+
expect(page).to have_content('509')
|
139
|
+
|
140
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
141
|
+
click_on 'ID'
|
142
|
+
end
|
143
|
+
|
144
|
+
within '.pagination_status' do
|
145
|
+
expect(page).to have_content('1-3 / 3')
|
146
|
+
end
|
147
|
+
|
148
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
149
|
+
expect(page).to have_content('507')
|
150
|
+
end
|
151
|
+
|
152
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
153
|
+
click_on 'Title'
|
154
|
+
end
|
155
|
+
|
156
|
+
within '.pagination_status' do
|
157
|
+
expect(page).to have_content('1-3 / 3')
|
158
|
+
end
|
159
|
+
|
160
|
+
expect(page).to have_content('507')
|
161
|
+
expect(page).to have_content('508')
|
162
|
+
expect(page).to have_content('509')
|
163
|
+
|
164
|
+
find(:css, '.wg-external-reset-button').click
|
165
|
+
within '.pagination_status' do
|
166
|
+
expect(page).to have_content('1-20 / 50')
|
167
|
+
end
|
168
|
+
end
|
169
|
+
|
170
|
+
it 'should filter by ID, one limit' do
|
171
|
+
fill_in('grid_f_id_fr', with: 550)
|
172
|
+
|
173
|
+
# find(:css, '#grid_submit_grid_icon').click
|
174
|
+
|
175
|
+
within '.pagination_status' do
|
176
|
+
expect(page).to have_content('1-7 / 7')
|
177
|
+
end
|
178
|
+
|
179
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
180
|
+
expect(page).to have_content('550')
|
181
|
+
end
|
182
|
+
|
183
|
+
551.upto(556) do |i|
|
184
|
+
expect(page).to have_content(i)
|
185
|
+
end
|
186
|
+
|
187
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
188
|
+
click_on 'ID'
|
189
|
+
end
|
190
|
+
|
191
|
+
within '.pagination_status' do
|
192
|
+
expect(page).to have_content('1-7 / 7')
|
193
|
+
end
|
194
|
+
|
195
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted.active-filter' do
|
196
|
+
expect(page).to have_content('556')
|
197
|
+
end
|
198
|
+
|
199
|
+
551.upto(556) do |i|
|
200
|
+
expect(page).to have_content(i)
|
201
|
+
end
|
202
|
+
|
203
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
204
|
+
click_on 'ID'
|
205
|
+
end
|
206
|
+
|
207
|
+
within '.pagination_status' do
|
208
|
+
expect(page).to have_content('1-7 / 7')
|
209
|
+
end
|
210
|
+
|
211
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
212
|
+
expect(page).to have_content('550')
|
213
|
+
end
|
214
|
+
|
215
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
216
|
+
click_on 'Title'
|
217
|
+
end
|
218
|
+
|
219
|
+
within '.pagination_status' do
|
220
|
+
expect(page).to have_content('1-7 / 7')
|
221
|
+
end
|
222
|
+
|
223
|
+
550.upto(556) do |i|
|
224
|
+
expect(page).to have_content(i)
|
225
|
+
end
|
226
|
+
|
227
|
+
find(:css, '.wg-external-reset-button').click
|
228
|
+
within '.pagination_status' do
|
229
|
+
expect(page).to have_content('1-20 / 50')
|
230
|
+
end
|
231
|
+
end
|
232
|
+
|
233
|
+
it 'should filter by Due Date' do
|
234
|
+
set_datepicker(self, 'grid_f_due_date_fr_date_placeholder', 2012, 0, 1)
|
235
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
236
|
+
expect(page).to have_content('2013-01-26')
|
237
|
+
end
|
238
|
+
|
239
|
+
set_datepicker(self, 'grid_f_due_date_to_date_placeholder', 2013, 0, 1)
|
240
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
241
|
+
expect(page).to have_content('2012-07-29')
|
242
|
+
end
|
243
|
+
|
244
|
+
within '.pagination_status' do
|
245
|
+
expect(page).to have_content('1-20 / 35')
|
246
|
+
end
|
247
|
+
|
248
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
249
|
+
click_on 'ID'
|
250
|
+
end
|
251
|
+
|
252
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
253
|
+
expect(page).to have_content('2012-10-02')
|
254
|
+
end
|
255
|
+
|
256
|
+
within '.pagination_status' do
|
257
|
+
expect(page).to have_content('1-20 / 35')
|
258
|
+
end
|
259
|
+
|
260
|
+
within 'ul.pagination' do
|
261
|
+
click_link '2'
|
262
|
+
end
|
263
|
+
|
264
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
265
|
+
expect(page).to have_content('2012-07-02')
|
266
|
+
end
|
267
|
+
|
268
|
+
set_datepicker(self, 'grid_f_due_date_fr_date_placeholder', 2012, 6, 28)
|
269
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
270
|
+
expect(page).to have_content('2012-10-02')
|
271
|
+
end
|
272
|
+
|
273
|
+
set_datepicker(self, 'grid_f_due_date_to_date_placeholder', 2012, 6, 31)
|
274
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
275
|
+
expect(page).to have_content('2012-07-29')
|
276
|
+
end
|
277
|
+
|
278
|
+
within '.pagination_status' do
|
279
|
+
expect(page).to have_content('1-1 / 1')
|
280
|
+
end
|
281
|
+
|
282
|
+
find(:css, '#grid_f_due_date_fr_date_view').click
|
283
|
+
|
284
|
+
within '.pagination_status' do
|
285
|
+
expect(page).to have_content('1-10 / 10')
|
286
|
+
end
|
287
|
+
|
288
|
+
find(:css, '#grid_f_due_date_to_date_view').click
|
289
|
+
|
290
|
+
within '.pagination_status' do
|
291
|
+
expect(page).to have_content('1-20 / 50')
|
292
|
+
end
|
293
|
+
end
|
294
|
+
|
295
|
+
it 'should negate the semantics of the text filter' do
|
296
|
+
fill_in('grid_f_title_v', with: 'sed')
|
297
|
+
select 'no', from: 'grid_f_archived'
|
298
|
+
|
299
|
+
expect(page).to have_content('sed impedit iste')
|
300
|
+
|
301
|
+
find(:css, '#grid_f_title_n').click
|
302
|
+
|
303
|
+
expect(page).to have_no_content('sed impedit iste')
|
304
|
+
end
|
305
|
+
|
306
|
+
it 'should reload the title filter' do
|
307
|
+
fill_in('grid_f_title_v', with: 'ed')
|
308
|
+
|
309
|
+
within '.pagination_status' do
|
310
|
+
expect(page).to have_content('1-2 / 2')
|
311
|
+
end
|
312
|
+
|
313
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
314
|
+
expect(page).to have_content('sed impedit iste')
|
315
|
+
end
|
316
|
+
|
317
|
+
expect(page).to have_content('corporis expedita vel')
|
318
|
+
|
319
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
320
|
+
click_on 'Title'
|
321
|
+
end
|
322
|
+
|
323
|
+
within '.pagination_status' do
|
324
|
+
expect(page).to have_content('1-2 / 2')
|
325
|
+
end
|
326
|
+
|
327
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
328
|
+
expect(page).to have_content('corporis expedita vel')
|
329
|
+
end
|
330
|
+
|
331
|
+
expect(page).to have_content('sed impedit iste')
|
332
|
+
|
333
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
334
|
+
click_on 'ID'
|
335
|
+
end
|
336
|
+
|
337
|
+
within '.pagination_status' do
|
338
|
+
expect(page).to have_content('1-2 / 2')
|
339
|
+
end
|
340
|
+
|
341
|
+
expect(page).to have_content('corporis expedita vel')
|
342
|
+
expect(page).to have_content('sed impedit iste')
|
343
|
+
|
344
|
+
find(:css, '.wg-external-reset-button').click
|
345
|
+
within '.pagination_status' do
|
346
|
+
expect(page).to have_content('1-20 / 50')
|
347
|
+
end
|
348
|
+
end
|
349
|
+
end
|