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,40 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'acceptance_helper'
|
3
|
+
|
4
|
+
describe 'joining_tables WiceGrid', type: :request, js: true do
|
5
|
+
before :each do
|
6
|
+
visit '/joining_tables'
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'should have filters for joined tables' do
|
10
|
+
expect(page).to have_field('grid[f][priorities.name]')
|
11
|
+
expect(page).to have_field('grid[f][statuses.name]')
|
12
|
+
expect(page).to have_field('grid[f][projects.name]')
|
13
|
+
expect(page).to have_field('grid[f][users.name]')
|
14
|
+
end
|
15
|
+
|
16
|
+
it 'should have filter joined tables' do
|
17
|
+
fill_in('grid_f_priorities_name', with: 'Normal')
|
18
|
+
fill_in('grid_f_statuses_name', with: 'Postponed')
|
19
|
+
fill_in('grid_f_projects_name', with: 'Super')
|
20
|
+
fill_in('grid_f_users_name', with: 'Koobus')
|
21
|
+
|
22
|
+
find(:css, '#grid_submit_grid_icon').click
|
23
|
+
|
24
|
+
within '.pagination_status' do
|
25
|
+
expect(page).to have_content('1-1 / 1')
|
26
|
+
end
|
27
|
+
|
28
|
+
within first(:css, 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter') do
|
29
|
+
expect(page).to have_content('Normal')
|
30
|
+
end
|
31
|
+
|
32
|
+
within first(:css, 'div.wice-grid-container table.wice-grid tbody tr:first-child td') do
|
33
|
+
expect(page).to have_content('508')
|
34
|
+
end
|
35
|
+
|
36
|
+
within 'div.wice-grid-container table.wice-grid tbody' do
|
37
|
+
expect(page).to have_content('sequi')
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# encoding: UTF-8
|
2
|
+
require 'acceptance_helper'
|
3
|
+
|
4
|
+
describe 'localization WiceGrid', type: :request, js: true do
|
5
|
+
before :each do
|
6
|
+
visit '/localization'
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'should switch to different languages' do
|
10
|
+
click_on('en')
|
11
|
+
expect(page).to have_content('show all')
|
12
|
+
|
13
|
+
click_on('nl')
|
14
|
+
expect(page).to have_content('Alle rijen tonen')
|
15
|
+
|
16
|
+
click_on('fr')
|
17
|
+
expect(page).to have_content('Voir tous')
|
18
|
+
|
19
|
+
click_on('is')
|
20
|
+
expect(page).to have_content('Sýna all')
|
21
|
+
|
22
|
+
click_on('en')
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,104 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'acceptance_helper'
|
3
|
+
|
4
|
+
describe 'many_grids_on_page WiceGrid', type: :request, js: true do
|
5
|
+
before :each do
|
6
|
+
visit '/many_grids_on_page'
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'should sort independantly' do
|
10
|
+
within 'div#g1.wice-grid-container table.wice-grid thead' do
|
11
|
+
click_on 'Title'
|
12
|
+
end
|
13
|
+
|
14
|
+
within 'div#g1.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
15
|
+
expect(page).to have_content('ab')
|
16
|
+
end
|
17
|
+
|
18
|
+
within 'div#g2.wice-grid-container table.wice-grid thead' do
|
19
|
+
click_on 'Description'
|
20
|
+
end
|
21
|
+
|
22
|
+
within 'div#g1.wice-grid-container table.wice-grid thead th.sorted a.asc' do
|
23
|
+
expect(page).to have_content('Title')
|
24
|
+
end
|
25
|
+
|
26
|
+
within 'div#g2.wice-grid-container table.wice-grid thead th.sorted a.asc' do
|
27
|
+
expect(page).to have_content('Description')
|
28
|
+
end
|
29
|
+
|
30
|
+
within 'div#g1.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
31
|
+
expect(page).to have_content('ab')
|
32
|
+
end
|
33
|
+
|
34
|
+
within 'div#g2.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
35
|
+
expect(page).to have_content('Accusamus voluptas sunt deleniti iusto dolorem repudiandae.')
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'should paginate independantly' do
|
40
|
+
within '#g1 ul.pagination' do
|
41
|
+
click_link '2'
|
42
|
+
end
|
43
|
+
|
44
|
+
expect(page).to have_selector('#g1 ul.pagination li.active', text: '2')
|
45
|
+
|
46
|
+
within '#g2 ul.pagination' do
|
47
|
+
click_link '3'
|
48
|
+
end
|
49
|
+
|
50
|
+
expect(page).to have_selector('#g2 ul.pagination li.active', text: '3')
|
51
|
+
end
|
52
|
+
|
53
|
+
it 'should show all records independantly for the two grids' do
|
54
|
+
within '#g1' do
|
55
|
+
click_on 'show all'
|
56
|
+
end
|
57
|
+
|
58
|
+
within 'div#g1.wice-grid-container table.wice-grid' do
|
59
|
+
expect(page).to have_selector('a.wg-back-to-pagination-link')
|
60
|
+
end
|
61
|
+
|
62
|
+
within '#g1 .pagination_status' do
|
63
|
+
expect(page).to have_content('1-50 / 50')
|
64
|
+
end
|
65
|
+
|
66
|
+
within '#g2 .pagination_status' do
|
67
|
+
expect(page).to have_content('1-20 / 50')
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
71
|
+
it 'should filter independantly' do
|
72
|
+
fill_in('g1_f_description', with: 've')
|
73
|
+
|
74
|
+
find(:css, '#g1_submit_grid_icon').click
|
75
|
+
|
76
|
+
within '#g1 .pagination_status' do
|
77
|
+
expect(page).to have_content('1-12 / 12')
|
78
|
+
end
|
79
|
+
|
80
|
+
within 'div#g1.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
81
|
+
expect(page).to have_content('Velit atque sapiente aspernatur sint fuga.')
|
82
|
+
end
|
83
|
+
|
84
|
+
fill_in('g2_f_description', with: 'voluptas')
|
85
|
+
|
86
|
+
find(:css, '#g2_submit_grid_icon').click
|
87
|
+
|
88
|
+
within '#g2 .pagination_status' do
|
89
|
+
expect(page).to have_content('1-1 / 1')
|
90
|
+
end
|
91
|
+
|
92
|
+
within 'div#g2.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
93
|
+
expect(page).to have_content('Accusamus voluptas sunt deleniti iusto dolorem repudiandae.')
|
94
|
+
end
|
95
|
+
|
96
|
+
within '#g1 .pagination_status' do
|
97
|
+
expect(page).to have_content('1-12 / 12')
|
98
|
+
end
|
99
|
+
|
100
|
+
within 'div#g1.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
101
|
+
expect(page).to have_content('Velit atque sapiente aspernatur sint fuga.')
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'acceptance_helper'
|
3
|
+
|
4
|
+
describe 'negation WiceGrid', type: :request, js: true do
|
5
|
+
before :each do
|
6
|
+
visit '/negation'
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'should negate the semantics of the text filter' do
|
10
|
+
fill_in('grid_f_title_v', with: 'sed')
|
11
|
+
select 'no', from: 'grid_f_archived'
|
12
|
+
|
13
|
+
find(:css, '#grid_submit_grid_icon').click
|
14
|
+
|
15
|
+
expect(page).to have_content('sed impedit iste')
|
16
|
+
expect(page).to have_no_content('ut ipsum excepturi')
|
17
|
+
|
18
|
+
find(:css, '#grid_f_title_n').click
|
19
|
+
|
20
|
+
find(:css, '#grid_submit_grid_icon').click
|
21
|
+
|
22
|
+
expect(page).to have_no_content('sed impedit iste')
|
23
|
+
expect(page).to have_content('ut ipsum excepturi')
|
24
|
+
end
|
25
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'acceptance_helper'
|
3
|
+
|
4
|
+
describe 'no_records WiceGrid', type: :request, js: true do
|
5
|
+
before :each do
|
6
|
+
visit '/no_records'
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'should contain a No Records block for example 1' do
|
10
|
+
within '.example1' do
|
11
|
+
expect(page).to have_content('No records found')
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
it 'should contain a No Records block for example 2' do
|
16
|
+
within '.example2' do
|
17
|
+
expect(page).to have_content('No records found')
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'should contain a No Records block for example 3' do
|
22
|
+
within '.example3' do
|
23
|
+
expect(page).to have_content('No records found')
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'acceptance_helper'
|
3
|
+
|
4
|
+
describe 'with_resultset 2 WiceGrid', type: :request, js: true do
|
5
|
+
before :each do
|
6
|
+
visit '/resultset_processings2'
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'should show records displayed on all pages' do
|
10
|
+
find(:css, '#process').click
|
11
|
+
expect(page).to have_content('50 records on all pages: 507, 519, 537, 540, 511, 515, 523, 524, 527, 531, 542, 551, 518, 520, 532, 535, 539, 512, 514, 516, 521, 522, 543, 544, 546, 550, 552, 510, 541, 553, 508, 513, 528, 529, 548, 556, 525, 534, 547, 555, 509, 517, 526, 536, 538, 545, 549, 530, 533, and 554')
|
12
|
+
end
|
13
|
+
|
14
|
+
it 'should show records displayed on all pages with a text filter selection' do
|
15
|
+
fill_in('g_f_title', with: 'ed')
|
16
|
+
expect(page).to have_content('1-2 / 2')
|
17
|
+
find(:css, '#process').click
|
18
|
+
expect(page).to have_content('2 records on all pages: 507 and 534')
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'should show records displayed on all pages with a custom filter selection' do
|
22
|
+
select 'Cancelled', from: 'g_f_status_id'
|
23
|
+
expect(page).to have_content('1-5 / 8')
|
24
|
+
find(:css, '#process').click
|
25
|
+
expect(page).to have_content('8 records on all pages: 511, 515, 523, 524, 527, 531, 542, and 551')
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'acceptance_helper'
|
3
|
+
|
4
|
+
describe 'with_resultset WiceGrid', type: :request, js: true do
|
5
|
+
before :each do
|
6
|
+
visit '/resultset_processings'
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'should return records displayed on the page' do
|
10
|
+
expect(page).to have_content('10 records on the current page: 507, 519, 537, 540, 511, 515, 523, 524, 527, and 531')
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'should show records displayed on all pages with a text filter selection' do
|
14
|
+
fill_in('g_f_title', with: 'ed')
|
15
|
+
expect(page).to have_content('1-2 / 2')
|
16
|
+
expect(page).to have_content('2 records on the current page: 507 and 534')
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'should show records displayed on all pages with a filter selection' do
|
20
|
+
select 'no', from: 'g_f_archived'
|
21
|
+
expect(page).to have_content('1-10 / 46')
|
22
|
+
expect(page).to have_content('10 records on the current page: 507, 519, 537, 540, 511, 515, 523, 527, 531, and 542')
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'should show records displayed on all pages with a custom filter selection' do
|
26
|
+
select 'Cancelled', from: 'g_f_status_id'
|
27
|
+
expect(page).to have_content('1-8 / 8')
|
28
|
+
expect(page).to have_content('8 records on the current page: 511, 515, 523, 524, 527, 531, 542, and 551')
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,120 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
require 'acceptance_helper'
|
3
|
+
|
4
|
+
describe 'auto reloads WiceGrid', type: :request, js: true do
|
5
|
+
before :each do
|
6
|
+
visit '/saved_queries'
|
7
|
+
end
|
8
|
+
|
9
|
+
def delete_all_saved_queries(context)
|
10
|
+
while delete_link = context.find(:css, '.wice-grid-delete-query')
|
11
|
+
delete_link.click
|
12
|
+
expect(page).to have_selector('#grid_notification_messages', text: 'Saved query deleted.')
|
13
|
+
end
|
14
|
+
rescue Capybara::ElementNotFound
|
15
|
+
true
|
16
|
+
end
|
17
|
+
|
18
|
+
it 'should filter by Added' do
|
19
|
+
check_saved_query = lambda do
|
20
|
+
within '.pagination_status' do
|
21
|
+
expect(page).to have_content('1-20 / 29')
|
22
|
+
end
|
23
|
+
|
24
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
25
|
+
expect(page).to have_content('2011-08-13 22:11:12')
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
delete_all_saved_queries self
|
30
|
+
|
31
|
+
set_datepicker(self, 'grid_f_created_at_fr_date_placeholder', 2011, 5, 1)
|
32
|
+
|
33
|
+
set_datepicker(self, 'grid_f_created_at_to_date_placeholder', 2011, 9, 1)
|
34
|
+
|
35
|
+
find(:css, '#grid_submit_grid_icon').click
|
36
|
+
|
37
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
38
|
+
expect(page).to have_content('2011-09-13 22:11:12')
|
39
|
+
end
|
40
|
+
|
41
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
42
|
+
click_on 'Title'
|
43
|
+
end
|
44
|
+
|
45
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
46
|
+
expect(page).to have_content('2011-08-13 22:11:12')
|
47
|
+
end
|
48
|
+
|
49
|
+
check_saved_query.call
|
50
|
+
|
51
|
+
fill_in('grid_saved_query_name', with: 'test query 1')
|
52
|
+
click_on 'Save the state of filters'
|
53
|
+
|
54
|
+
expect(page).to have_content('Query saved.')
|
55
|
+
expect(page).to have_content('test query 1')
|
56
|
+
|
57
|
+
find(:css, '#grid_reset_grid_icon').click
|
58
|
+
within '.pagination_status' do
|
59
|
+
expect(page).to have_content('1-20 / 50')
|
60
|
+
end
|
61
|
+
|
62
|
+
expect(page).to have_content('test query 1')
|
63
|
+
|
64
|
+
find(:css, '.wice-grid-query-load-link[title="Load query test query 1"]').click
|
65
|
+
|
66
|
+
check_saved_query.call
|
67
|
+
|
68
|
+
within '.wice-grid-container' do
|
69
|
+
expect(page).to have_content('test query 1')
|
70
|
+
end
|
71
|
+
|
72
|
+
delete_all_saved_queries self
|
73
|
+
expect(page).to have_content('Saved query deleted.')
|
74
|
+
end
|
75
|
+
|
76
|
+
it 'should filter by Archived and Project Name' do
|
77
|
+
check_saved_query = lambda do
|
78
|
+
within '.pagination_status' do
|
79
|
+
expect(page).to have_content('1-2 / 2')
|
80
|
+
end
|
81
|
+
|
82
|
+
within first(:css, 'td.active-filter') do
|
83
|
+
expect(page).to have_content('Ultimate Website')
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
delete_all_saved_queries self
|
88
|
+
|
89
|
+
select 'yes', from: 'grid_f_archived'
|
90
|
+
select 'Ultimate Website', from: 'grid_f_project_id'
|
91
|
+
|
92
|
+
find(:css, '#grid_submit_grid_icon').click
|
93
|
+
|
94
|
+
check_saved_query.call
|
95
|
+
|
96
|
+
fill_in('grid_saved_query_name', with: 'test query 2')
|
97
|
+
click_on 'Save the state of filters'
|
98
|
+
|
99
|
+
expect(page).to have_content('Query saved.')
|
100
|
+
expect(page).to have_content('test query 2')
|
101
|
+
|
102
|
+
find(:css, '#grid_reset_grid_icon').click
|
103
|
+
within '.pagination_status' do
|
104
|
+
expect(page).to have_content('1-20 / 50')
|
105
|
+
end
|
106
|
+
|
107
|
+
expect(page).to have_content('test query 2')
|
108
|
+
|
109
|
+
find(:css, '.wice-grid-query-load-link[title="Load query test query 2"]').click
|
110
|
+
|
111
|
+
check_saved_query.call
|
112
|
+
|
113
|
+
within '.wice-grid-container' do
|
114
|
+
expect(page).to have_content('test query 2')
|
115
|
+
end
|
116
|
+
|
117
|
+
delete_all_saved_queries self
|
118
|
+
expect(page).to have_content('Saved query deleted.')
|
119
|
+
end
|
120
|
+
end
|
@@ -0,0 +1,1005 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
shared_examples 'basic task table specs' do
|
3
|
+
it 'is present on the page' do
|
4
|
+
expect(page).to have_selector('div.wice-grid-container table.wice-grid')
|
5
|
+
end
|
6
|
+
|
7
|
+
it 'should have a show all link' do
|
8
|
+
within 'div.wice-grid-container table.wice-grid' do
|
9
|
+
expect(page).to have_selector('a.wg-show-all-link')
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'should change pages' do
|
14
|
+
within 'ul.pagination' do
|
15
|
+
click_link '2'
|
16
|
+
end
|
17
|
+
|
18
|
+
within '.wice-grid li.active' do
|
19
|
+
expect(page).to have_content('2')
|
20
|
+
end
|
21
|
+
|
22
|
+
within '.pagination_status' do
|
23
|
+
expect(page).to have_content('21-40 / 50')
|
24
|
+
end
|
25
|
+
|
26
|
+
within 'ul.pagination' do
|
27
|
+
click_link '3'
|
28
|
+
end
|
29
|
+
|
30
|
+
within '.wice-grid li.active' do
|
31
|
+
expect(page).to have_content('3')
|
32
|
+
end
|
33
|
+
|
34
|
+
within '.pagination_status' do
|
35
|
+
expect(page).to have_content('41-50 / 50')
|
36
|
+
end
|
37
|
+
end
|
38
|
+
|
39
|
+
it 'should have a pagination status with page 1 as the current page' do
|
40
|
+
within 'div.wice-grid-container table.wice-grid' do
|
41
|
+
expect(page).to have_selector('div.pagination')
|
42
|
+
|
43
|
+
within 'div.pagination' do
|
44
|
+
expect(page).to have_selector('li.active')
|
45
|
+
within 'li.active' do
|
46
|
+
expect(page).to have_content('1')
|
47
|
+
end
|
48
|
+
|
49
|
+
expect(page).to have_content('2')
|
50
|
+
expect(page).to have_content('3')
|
51
|
+
expect(page).to have_no_content('4')
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
shared_examples 'show all and back' do
|
58
|
+
it 'should show all records when asked' do
|
59
|
+
click_on 'show all'
|
60
|
+
|
61
|
+
within 'div.wice-grid-container table.wice-grid' do
|
62
|
+
expect(page).to have_selector('a.wg-back-to-pagination-link')
|
63
|
+
end
|
64
|
+
|
65
|
+
within '.pagination_status' do
|
66
|
+
expect(page).to have_content('1-50 / 50')
|
67
|
+
end
|
68
|
+
|
69
|
+
click_on 'back to paginated view'
|
70
|
+
|
71
|
+
within '.pagination_status' do
|
72
|
+
expect(page).to have_content('1-20 / 50')
|
73
|
+
end
|
74
|
+
end
|
75
|
+
end
|
76
|
+
|
77
|
+
shared_examples 'names of columns' do
|
78
|
+
it 'should have names of columns' do
|
79
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
80
|
+
expect(page).to have_content('ID')
|
81
|
+
expect(page).to have_content('Title')
|
82
|
+
expect(page).to have_content('Description')
|
83
|
+
expect(page).to have_content('Archived')
|
84
|
+
expect(page).to have_content('Added')
|
85
|
+
end
|
86
|
+
end
|
87
|
+
end
|
88
|
+
|
89
|
+
shared_examples 'sorting ID' do
|
90
|
+
it 'should sort column ID' do
|
91
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
92
|
+
click_on 'ID'
|
93
|
+
end
|
94
|
+
|
95
|
+
within 'div.wice-grid-container table.wice-grid thead th.sorted a.desc' do
|
96
|
+
expect(page).to have_content('ID')
|
97
|
+
end
|
98
|
+
|
99
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
100
|
+
expect(page).to have_content('556')
|
101
|
+
end
|
102
|
+
|
103
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
104
|
+
click_on 'ID'
|
105
|
+
end
|
106
|
+
|
107
|
+
within 'div.wice-grid-container table.wice-grid thead th.sorted a.asc' do
|
108
|
+
expect(page).to have_content('ID')
|
109
|
+
end
|
110
|
+
|
111
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
112
|
+
expect(page).to have_content('507')
|
113
|
+
end
|
114
|
+
|
115
|
+
within 'ul.pagination' do
|
116
|
+
click_link '2'
|
117
|
+
end
|
118
|
+
|
119
|
+
within '.wice-grid li.active' do
|
120
|
+
expect(page).to have_content('2')
|
121
|
+
end
|
122
|
+
|
123
|
+
within 'div.wice-grid-container table.wice-grid thead th.sorted a.asc' do
|
124
|
+
expect(page).to have_content('ID')
|
125
|
+
end
|
126
|
+
|
127
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
128
|
+
expect(page).to have_content('527')
|
129
|
+
end
|
130
|
+
end
|
131
|
+
end
|
132
|
+
|
133
|
+
shared_examples 'sorting Title' do
|
134
|
+
it 'should sort column Title' do
|
135
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
136
|
+
click_on 'Title'
|
137
|
+
end
|
138
|
+
|
139
|
+
within 'div.wice-grid-container table.wice-grid thead th.sorted a.asc' do
|
140
|
+
expect(page).to have_content('Title')
|
141
|
+
end
|
142
|
+
|
143
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
144
|
+
expect(page).to have_content('ab')
|
145
|
+
end
|
146
|
+
|
147
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
148
|
+
click_on 'Title'
|
149
|
+
end
|
150
|
+
|
151
|
+
within 'div.wice-grid-container table.wice-grid thead th.sorted a.desc' do
|
152
|
+
expect(page).to have_content('Title')
|
153
|
+
end
|
154
|
+
|
155
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
156
|
+
expect(page).to have_content('voluptatum non')
|
157
|
+
end
|
158
|
+
|
159
|
+
within 'ul.pagination' do
|
160
|
+
click_link '2'
|
161
|
+
end
|
162
|
+
|
163
|
+
within '.wice-grid li.active' do
|
164
|
+
expect(page).to have_content('2')
|
165
|
+
end
|
166
|
+
|
167
|
+
within 'div.wice-grid-container table.wice-grid thead th.sorted a.desc' do
|
168
|
+
expect(page).to have_content('Title')
|
169
|
+
end
|
170
|
+
|
171
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
172
|
+
expect(page).to have_content('quia dignissimos maiores')
|
173
|
+
end
|
174
|
+
end
|
175
|
+
end
|
176
|
+
|
177
|
+
shared_examples 'sorting Description' do
|
178
|
+
it 'should sort column Description' do
|
179
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
180
|
+
click_on 'Description'
|
181
|
+
end
|
182
|
+
|
183
|
+
within 'div.wice-grid-container table.wice-grid thead th.sorted a.asc' do
|
184
|
+
expect(page).to have_content('Description')
|
185
|
+
end
|
186
|
+
|
187
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
188
|
+
expect(page).to have_content('Accusamus voluptas sunt deleniti iusto dolorem repudiandae.')
|
189
|
+
end
|
190
|
+
|
191
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
192
|
+
click_on 'Description'
|
193
|
+
end
|
194
|
+
|
195
|
+
within 'div.wice-grid-container table.wice-grid thead th.sorted a.desc' do
|
196
|
+
expect(page).to have_content('Description')
|
197
|
+
end
|
198
|
+
|
199
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
200
|
+
expect(page).to have_content('Voluptate occaecati quisquam in et qui nostrum eos minus.')
|
201
|
+
end
|
202
|
+
|
203
|
+
within 'ul.pagination' do
|
204
|
+
click_link '2'
|
205
|
+
end
|
206
|
+
|
207
|
+
within '.wice-grid li.active' do
|
208
|
+
expect(page).to have_content('2')
|
209
|
+
end
|
210
|
+
|
211
|
+
within 'div.wice-grid-container table.wice-grid thead th.sorted a.desc' do
|
212
|
+
expect(page).to have_content('Description')
|
213
|
+
end
|
214
|
+
|
215
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
216
|
+
expect(page).to have_content('Iure tenetur cum aut optio et quia similique debitis.')
|
217
|
+
end
|
218
|
+
end
|
219
|
+
end
|
220
|
+
|
221
|
+
shared_examples 'sorting Archived' do
|
222
|
+
it 'should sort column Archived' do
|
223
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
224
|
+
click_on 'Archived'
|
225
|
+
end
|
226
|
+
|
227
|
+
within 'div.wice-grid-container table.wice-grid thead th.sorted a.asc' do
|
228
|
+
expect(page).to have_content('Archived')
|
229
|
+
end
|
230
|
+
|
231
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
232
|
+
expect(page).to have_content('No')
|
233
|
+
end
|
234
|
+
|
235
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
236
|
+
click_on 'Archived'
|
237
|
+
end
|
238
|
+
|
239
|
+
within 'div.wice-grid-container table.wice-grid thead th.sorted a.desc' do
|
240
|
+
expect(page).to have_content('Archived')
|
241
|
+
end
|
242
|
+
|
243
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
244
|
+
expect(page).to have_content('Yes')
|
245
|
+
end
|
246
|
+
|
247
|
+
within 'ul.pagination' do
|
248
|
+
click_link '2'
|
249
|
+
end
|
250
|
+
|
251
|
+
within '.wice-grid li.active' do
|
252
|
+
expect(page).to have_content('2')
|
253
|
+
end
|
254
|
+
|
255
|
+
within 'div.wice-grid-container table.wice-grid thead th.sorted a.desc' do
|
256
|
+
expect(page).to have_content('Archived')
|
257
|
+
end
|
258
|
+
|
259
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
260
|
+
expect(page).to have_content('No')
|
261
|
+
end
|
262
|
+
end
|
263
|
+
end
|
264
|
+
|
265
|
+
shared_examples 'sorting Due Date' do
|
266
|
+
it 'should sort column Due Date' do
|
267
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
268
|
+
click_on 'Due Date'
|
269
|
+
end
|
270
|
+
|
271
|
+
within 'div.wice-grid-container table.wice-grid thead th.sorted a.asc' do
|
272
|
+
expect(page).to have_content('Due Date')
|
273
|
+
end
|
274
|
+
|
275
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
276
|
+
expect(page).to have_content('2012-06-12')
|
277
|
+
end
|
278
|
+
|
279
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
280
|
+
click_on 'Due Date'
|
281
|
+
end
|
282
|
+
|
283
|
+
within 'div.wice-grid-container table.wice-grid thead th.sorted a.desc' do
|
284
|
+
expect(page).to have_content('Due Date')
|
285
|
+
end
|
286
|
+
|
287
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
288
|
+
expect(page).to have_content('2013-03-30')
|
289
|
+
end
|
290
|
+
|
291
|
+
within 'ul.pagination' do
|
292
|
+
click_link '2'
|
293
|
+
end
|
294
|
+
|
295
|
+
within '.wice-grid li.active' do
|
296
|
+
expect(page).to have_content('2')
|
297
|
+
end
|
298
|
+
|
299
|
+
within 'div.wice-grid-container table.wice-grid thead th.sorted a.desc' do
|
300
|
+
expect(page).to have_content('Due Date')
|
301
|
+
end
|
302
|
+
|
303
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
304
|
+
expect(page).to have_content('2012-12-13')
|
305
|
+
end
|
306
|
+
end
|
307
|
+
end
|
308
|
+
|
309
|
+
shared_examples 'sorting ID in all records mode' do
|
310
|
+
it 'should sort column ID' do
|
311
|
+
click_on 'show all'
|
312
|
+
|
313
|
+
within '.pagination_status' do
|
314
|
+
expect(page).to have_content('1-50 / 50')
|
315
|
+
end
|
316
|
+
|
317
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
318
|
+
click_on 'ID'
|
319
|
+
end
|
320
|
+
|
321
|
+
within 'div.wice-grid-container table.wice-grid thead th.sorted a.desc' do
|
322
|
+
expect(page).to have_content('ID')
|
323
|
+
end
|
324
|
+
|
325
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
326
|
+
expect(page).to have_content('556')
|
327
|
+
end
|
328
|
+
|
329
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
330
|
+
click_on 'ID'
|
331
|
+
end
|
332
|
+
|
333
|
+
within 'div.wice-grid-container table.wice-grid thead th.sorted a.asc' do
|
334
|
+
expect(page).to have_content('ID')
|
335
|
+
end
|
336
|
+
|
337
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
338
|
+
expect(page).to have_content('507')
|
339
|
+
end
|
340
|
+
end
|
341
|
+
end
|
342
|
+
|
343
|
+
shared_examples 'sorting Title in all records mode' do
|
344
|
+
it 'should sort column Title' do
|
345
|
+
click_on 'show all'
|
346
|
+
|
347
|
+
within '.pagination_status' do
|
348
|
+
expect(page).to have_content('1-50 / 50')
|
349
|
+
end
|
350
|
+
|
351
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
352
|
+
click_on 'Title'
|
353
|
+
end
|
354
|
+
|
355
|
+
within 'div.wice-grid-container table.wice-grid thead th.sorted a.asc' do
|
356
|
+
expect(page).to have_content('Title')
|
357
|
+
end
|
358
|
+
|
359
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
360
|
+
expect(page).to have_content('ab')
|
361
|
+
end
|
362
|
+
|
363
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
364
|
+
click_on 'Title'
|
365
|
+
end
|
366
|
+
|
367
|
+
within 'div.wice-grid-container table.wice-grid thead th.sorted a.desc' do
|
368
|
+
expect(page).to have_content('Title')
|
369
|
+
end
|
370
|
+
|
371
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
372
|
+
expect(page).to have_content('voluptatum non')
|
373
|
+
end
|
374
|
+
end
|
375
|
+
end
|
376
|
+
|
377
|
+
shared_examples 'sorting Description in all records mode' do
|
378
|
+
it 'should sort column Description' do
|
379
|
+
click_on 'show all'
|
380
|
+
|
381
|
+
within '.pagination_status' do
|
382
|
+
expect(page).to have_content('1-50 / 50')
|
383
|
+
end
|
384
|
+
|
385
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
386
|
+
click_on 'Description'
|
387
|
+
end
|
388
|
+
|
389
|
+
within 'div.wice-grid-container table.wice-grid thead th.sorted a.asc' do
|
390
|
+
expect(page).to have_content('Description')
|
391
|
+
end
|
392
|
+
|
393
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
394
|
+
expect(page).to have_content('Accusamus voluptas sunt deleniti iusto dolorem repudiandae.')
|
395
|
+
end
|
396
|
+
|
397
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
398
|
+
click_on 'Description'
|
399
|
+
end
|
400
|
+
|
401
|
+
within 'div.wice-grid-container table.wice-grid thead th.sorted a.desc' do
|
402
|
+
expect(page).to have_content('Description')
|
403
|
+
end
|
404
|
+
|
405
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
406
|
+
expect(page).to have_content('Voluptate occaecati quisquam in et qui nostrum eos minus.')
|
407
|
+
end
|
408
|
+
end
|
409
|
+
end
|
410
|
+
|
411
|
+
shared_examples 'sorting Archived in all records mode' do
|
412
|
+
it 'should sort column Archived' do
|
413
|
+
click_on 'show all'
|
414
|
+
|
415
|
+
within '.pagination_status' do
|
416
|
+
expect(page).to have_content('back to paginated view')
|
417
|
+
expect(page).to have_content('1-50 / 50')
|
418
|
+
end
|
419
|
+
|
420
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
421
|
+
click_on 'Archived'
|
422
|
+
end
|
423
|
+
|
424
|
+
within 'div.wice-grid-container table.wice-grid thead th.sorted a.asc' do
|
425
|
+
expect(page).to have_content('Archived')
|
426
|
+
end
|
427
|
+
|
428
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
429
|
+
expect(page).to have_content('No')
|
430
|
+
end
|
431
|
+
|
432
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
433
|
+
click_on 'Archived'
|
434
|
+
end
|
435
|
+
|
436
|
+
within 'div.wice-grid-container table.wice-grid thead th.sorted a.desc' do
|
437
|
+
expect(page).to have_content('Archived')
|
438
|
+
end
|
439
|
+
|
440
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
441
|
+
expect(page).to have_content('Yes')
|
442
|
+
end
|
443
|
+
end
|
444
|
+
end
|
445
|
+
|
446
|
+
shared_examples 'sorting Due Date in all records mode' do
|
447
|
+
it 'should sort column Due Date' do
|
448
|
+
click_on 'show all'
|
449
|
+
|
450
|
+
within '.pagination_status' do
|
451
|
+
expect(page).to have_content('1-50 / 50')
|
452
|
+
end
|
453
|
+
|
454
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
455
|
+
click_on 'Due Date'
|
456
|
+
end
|
457
|
+
|
458
|
+
within 'div.wice-grid-container table.wice-grid thead th.sorted a.asc' do
|
459
|
+
expect(page).to have_content('Due Date')
|
460
|
+
end
|
461
|
+
|
462
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
463
|
+
expect(page).to have_content('2012-06-12')
|
464
|
+
end
|
465
|
+
|
466
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
467
|
+
click_on 'Due Date'
|
468
|
+
end
|
469
|
+
|
470
|
+
within 'div.wice-grid-container table.wice-grid thead th.sorted a.desc' do
|
471
|
+
expect(page).to have_content('Due Date')
|
472
|
+
end
|
473
|
+
|
474
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
475
|
+
expect(page).to have_content('2013-03-30')
|
476
|
+
end
|
477
|
+
end
|
478
|
+
end
|
479
|
+
|
480
|
+
MONTH_NAMES = %w(Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec)
|
481
|
+
|
482
|
+
|
483
|
+
def set_datepicker(context, picker, year, month, day)
|
484
|
+
context.find(:css, "##{picker} .ui-datepicker-trigger").click
|
485
|
+
|
486
|
+
year_select = context.find(:css, '.ui-datepicker-year')
|
487
|
+
|
488
|
+
year_select.select(year.to_s)
|
489
|
+
|
490
|
+
month_select = context.find(:css, '.ui-datepicker-month')
|
491
|
+
month_select.select(MONTH_NAMES[month])
|
492
|
+
|
493
|
+
context.within '.ui-datepicker-calendar' do
|
494
|
+
context.click_on(day.to_s)
|
495
|
+
end
|
496
|
+
end
|
497
|
+
|
498
|
+
shared_examples 'Due Date datepicker filtering' do
|
499
|
+
it 'should filter by Due Date' do
|
500
|
+
set_datepicker(self, 'grid_f_due_date_fr_date_placeholder', 2012, 0, 1)
|
501
|
+
|
502
|
+
set_datepicker(self, 'grid_f_due_date_to_date_placeholder', 2013, 0, 1)
|
503
|
+
|
504
|
+
find(:css, '#grid_submit_grid_icon').click
|
505
|
+
|
506
|
+
within '.pagination_status' do
|
507
|
+
expect(page).to have_content('1-20 / 35')
|
508
|
+
end
|
509
|
+
|
510
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
511
|
+
expect(page).to have_content('2012-07-29')
|
512
|
+
end
|
513
|
+
|
514
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
515
|
+
click_on 'ID'
|
516
|
+
end
|
517
|
+
|
518
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
519
|
+
expect(page).to have_content('2012-10-02')
|
520
|
+
end
|
521
|
+
|
522
|
+
within '.pagination_status' do
|
523
|
+
expect(page).to have_content('1-20 / 35')
|
524
|
+
end
|
525
|
+
|
526
|
+
within 'ul.pagination' do
|
527
|
+
click_link '2'
|
528
|
+
end
|
529
|
+
|
530
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
531
|
+
expect(page).to have_content('2012-07-02')
|
532
|
+
end
|
533
|
+
|
534
|
+
set_datepicker(self, 'grid_f_due_date_fr_date_placeholder', 2012, 6, 28)
|
535
|
+
|
536
|
+
set_datepicker(self, 'grid_f_due_date_to_date_placeholder', 2012, 6, 31)
|
537
|
+
|
538
|
+
find(:css, '#grid_submit_grid_icon').click
|
539
|
+
|
540
|
+
within '.pagination_status' do
|
541
|
+
expect(page).to have_content('1-1 / 1')
|
542
|
+
end
|
543
|
+
|
544
|
+
find(:css, '#grid_f_due_date_fr_date_view').click
|
545
|
+
|
546
|
+
find(:css, '#grid_submit_grid_icon').click
|
547
|
+
|
548
|
+
within '.pagination_status' do
|
549
|
+
expect(page).to have_content('1-10 / 10')
|
550
|
+
end
|
551
|
+
|
552
|
+
find(:css, '#grid_f_due_date_to_date_view').click
|
553
|
+
|
554
|
+
find(:css, '#grid_submit_grid_icon').click
|
555
|
+
|
556
|
+
within '.pagination_status' do
|
557
|
+
expect(page).to have_content('1-20 / 50')
|
558
|
+
end
|
559
|
+
end
|
560
|
+
end
|
561
|
+
|
562
|
+
shared_examples 'Added datepicker filtering' do
|
563
|
+
it 'should filter by Added' do
|
564
|
+
set_datepicker(self, 'grid_f_created_at_fr_date_placeholder', 2011, 5, 1)
|
565
|
+
|
566
|
+
set_datepicker(self, 'grid_f_created_at_to_date_placeholder', 2011, 9, 1)
|
567
|
+
|
568
|
+
find(:css, '#grid_submit_grid_icon').click
|
569
|
+
|
570
|
+
within '.pagination_status' do
|
571
|
+
expect(page).to have_content('1-20 / 29')
|
572
|
+
end
|
573
|
+
|
574
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
575
|
+
expect(page).to have_content('2011-09-13 22:11:12')
|
576
|
+
end
|
577
|
+
|
578
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
579
|
+
click_on 'ID'
|
580
|
+
end
|
581
|
+
|
582
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
583
|
+
expect(page).to have_content('2011-09-29 22:11:12')
|
584
|
+
end
|
585
|
+
|
586
|
+
within '.pagination_status' do
|
587
|
+
expect(page).to have_content('1-20 / 29')
|
588
|
+
end
|
589
|
+
|
590
|
+
within 'ul.pagination' do
|
591
|
+
click_link '2'
|
592
|
+
end
|
593
|
+
|
594
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
595
|
+
expect(page).to have_content('2011-09-22 22:11:12')
|
596
|
+
end
|
597
|
+
|
598
|
+
find(:css, '#grid_reset_grid_icon').click
|
599
|
+
|
600
|
+
within '.pagination_status' do
|
601
|
+
expect(page).to have_content('1-20 / 50')
|
602
|
+
end
|
603
|
+
end
|
604
|
+
end
|
605
|
+
|
606
|
+
# !!!
|
607
|
+
shared_examples 'Due Date standard filtering' do
|
608
|
+
it 'should filter by Due Date (standard filter)' do
|
609
|
+
select '2011', from: 'grid_f_created_at_fr_year'
|
610
|
+
select 'February', from: 'grid_f_created_at_fr_month'
|
611
|
+
select '8', from: 'grid_f_created_at_fr_day'
|
612
|
+
select '00', from: 'grid_f_created_at_fr_hour'
|
613
|
+
select '00', from: 'grid_f_created_at_fr_minute'
|
614
|
+
|
615
|
+
select '2011', from: 'grid_f_created_at_to_year'
|
616
|
+
select 'September', from: 'grid_f_created_at_to_month'
|
617
|
+
select '10', from: 'grid_f_created_at_to_day'
|
618
|
+
select '00', from: 'grid_f_created_at_to_hour'
|
619
|
+
select '00', from: 'grid_f_created_at_to_minute'
|
620
|
+
|
621
|
+
find(:css, '#grid_submit_grid_icon').click
|
622
|
+
|
623
|
+
within '.pagination_status' do
|
624
|
+
expect(page).to have_content('1-16 / 16')
|
625
|
+
end
|
626
|
+
|
627
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
628
|
+
expect(page).to have_content('13 Aug 22:11')
|
629
|
+
end
|
630
|
+
|
631
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
632
|
+
click_on 'ID'
|
633
|
+
end
|
634
|
+
|
635
|
+
within '.pagination_status' do
|
636
|
+
expect(page).to have_content('1-16 / 16')
|
637
|
+
end
|
638
|
+
|
639
|
+
find(:css, '#grid_reset_grid_icon').click
|
640
|
+
within '.pagination_status' do
|
641
|
+
expect(page).to have_content('1-20 / 50')
|
642
|
+
end
|
643
|
+
end
|
644
|
+
end
|
645
|
+
|
646
|
+
shared_examples 'Created At standard filtering' do
|
647
|
+
it 'should filter by created_at' do
|
648
|
+
select '2011', from: 'grid_f_updated_at_fr_year'
|
649
|
+
select 'January', from: 'grid_f_updated_at_fr_month'
|
650
|
+
select '8', from: 'grid_f_updated_at_fr_day'
|
651
|
+
select '00', from: 'grid_f_updated_at_fr_hour'
|
652
|
+
select '00', from: 'grid_f_updated_at_fr_minute'
|
653
|
+
|
654
|
+
select '2011', from: 'grid_f_updated_at_to_year'
|
655
|
+
select 'December', from: 'grid_f_updated_at_to_month'
|
656
|
+
select '10', from: 'grid_f_updated_at_to_day'
|
657
|
+
select '00', from: 'grid_f_updated_at_to_hour'
|
658
|
+
select '00', from: 'grid_f_updated_at_to_minute'
|
659
|
+
|
660
|
+
find(:css, '#grid_submit_grid_icon').click
|
661
|
+
|
662
|
+
within '.pagination_status' do
|
663
|
+
expect(page).to have_content('1-14 / 14')
|
664
|
+
end
|
665
|
+
|
666
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
667
|
+
expect(page).to have_content('2011-11-26 22:11:12')
|
668
|
+
end
|
669
|
+
|
670
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
671
|
+
click_on 'ID'
|
672
|
+
end
|
673
|
+
|
674
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
675
|
+
expect(page).to have_content('2011-12-07 22:11:12')
|
676
|
+
end
|
677
|
+
|
678
|
+
within '.pagination_status' do
|
679
|
+
expect(page).to have_content('1-14 / 14')
|
680
|
+
end
|
681
|
+
|
682
|
+
find(:css, '#grid_reset_grid_icon').click
|
683
|
+
|
684
|
+
within '.pagination_status' do
|
685
|
+
expect(page).to have_content('1-20 / 50')
|
686
|
+
end
|
687
|
+
end
|
688
|
+
end
|
689
|
+
|
690
|
+
shared_examples 'Description filtering' do
|
691
|
+
it 'should filter by Description' do
|
692
|
+
fill_in('grid_f_description', with: 've')
|
693
|
+
|
694
|
+
find(:css, '#grid_submit_grid_icon').click
|
695
|
+
|
696
|
+
within '.pagination_status' do
|
697
|
+
expect(page).to have_content('1-12 / 12')
|
698
|
+
end
|
699
|
+
|
700
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
701
|
+
expect(page).to have_content('Velit atque sapiente aspernatur sint fuga.')
|
702
|
+
end
|
703
|
+
|
704
|
+
expect(page).to have_content('Vero sit voluptate sed tempora et provident sequi nihil.')
|
705
|
+
|
706
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
707
|
+
click_on 'Description'
|
708
|
+
end
|
709
|
+
|
710
|
+
within '.pagination_status' do
|
711
|
+
expect(page).to have_content('1-12 / 12')
|
712
|
+
end
|
713
|
+
|
714
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
715
|
+
expect(page).to have_content('Ad sunt vel maxime labore temporibus incidunt quidem.')
|
716
|
+
end
|
717
|
+
|
718
|
+
expect(page).to have_content('Adipisci voluptate sed esse velit.')
|
719
|
+
|
720
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
721
|
+
click_on 'ID'
|
722
|
+
end
|
723
|
+
|
724
|
+
within '.pagination_status' do
|
725
|
+
expect(page).to have_content('1-12 / 12')
|
726
|
+
end
|
727
|
+
|
728
|
+
expect(page).to have_content('Adipisci voluptate sed esse velit.')
|
729
|
+
expect(page).to have_content('Ad sunt vel maxime labore temporibus incidunt quidem.')
|
730
|
+
|
731
|
+
find(:css, '#grid_reset_grid_icon').click
|
732
|
+
within '.pagination_status' do
|
733
|
+
expect(page).to have_content('1-20 / 50')
|
734
|
+
end
|
735
|
+
end
|
736
|
+
end
|
737
|
+
|
738
|
+
shared_examples 'ID filtering' do
|
739
|
+
it 'should filter by ID, one limit' do
|
740
|
+
fill_in('grid_f_id_eq', with: 550)
|
741
|
+
|
742
|
+
find(:css, '#grid_submit_grid_icon').click
|
743
|
+
|
744
|
+
within '.pagination_status' do
|
745
|
+
expect(page).to have_content('1-1 / 1')
|
746
|
+
end
|
747
|
+
|
748
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
749
|
+
expect(page).to have_content('550')
|
750
|
+
end
|
751
|
+
end
|
752
|
+
end
|
753
|
+
|
754
|
+
shared_examples 'ID filtering, range' do
|
755
|
+
it 'should filter by ID, one limit' do
|
756
|
+
fill_in('grid_f_id_fr', with: 550)
|
757
|
+
|
758
|
+
find(:css, '#grid_submit_grid_icon').click
|
759
|
+
|
760
|
+
within '.pagination_status' do
|
761
|
+
expect(page).to have_content('1-7 / 7')
|
762
|
+
end
|
763
|
+
|
764
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
765
|
+
expect(page).to have_content('550')
|
766
|
+
end
|
767
|
+
|
768
|
+
551.upto(556) do |i|
|
769
|
+
expect(page).to have_content(i)
|
770
|
+
end
|
771
|
+
|
772
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
773
|
+
click_on 'ID'
|
774
|
+
end
|
775
|
+
|
776
|
+
within '.pagination_status' do
|
777
|
+
expect(page).to have_content('1-7 / 7')
|
778
|
+
end
|
779
|
+
|
780
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted.active-filter' do
|
781
|
+
expect(page).to have_content('550')
|
782
|
+
end
|
783
|
+
|
784
|
+
551.upto(556) do |i|
|
785
|
+
expect(page).to have_content(i)
|
786
|
+
end
|
787
|
+
|
788
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
789
|
+
click_on 'ID'
|
790
|
+
end
|
791
|
+
|
792
|
+
within '.pagination_status' do
|
793
|
+
expect(page).to have_content('1-7 / 7')
|
794
|
+
end
|
795
|
+
|
796
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
797
|
+
expect(page).to have_content('556')
|
798
|
+
end
|
799
|
+
|
800
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
801
|
+
click_on 'Title'
|
802
|
+
end
|
803
|
+
|
804
|
+
within '.pagination_status' do
|
805
|
+
expect(page).to have_content('1-7 / 7')
|
806
|
+
end
|
807
|
+
|
808
|
+
550.upto(556) do |i|
|
809
|
+
expect(page).to have_content(i)
|
810
|
+
end
|
811
|
+
|
812
|
+
find(:css, '#grid_reset_grid_icon').click
|
813
|
+
within '.pagination_status' do
|
814
|
+
expect(page).to have_content('1-20 / 50')
|
815
|
+
end
|
816
|
+
end
|
817
|
+
end
|
818
|
+
|
819
|
+
shared_examples 'ID two limits filtering' do
|
820
|
+
it 'should filter by ID, two limits' do
|
821
|
+
fill_in('grid_f_id_fr', with: 507)
|
822
|
+
fill_in('grid_f_id_to', with: 509)
|
823
|
+
|
824
|
+
find(:css, '#grid_submit_grid_icon').click
|
825
|
+
|
826
|
+
within '.pagination_status' do
|
827
|
+
expect(page).to have_content('1-3 / 3')
|
828
|
+
end
|
829
|
+
|
830
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
831
|
+
expect(page).to have_content('507')
|
832
|
+
end
|
833
|
+
|
834
|
+
expect(page).to have_content('508')
|
835
|
+
expect(page).to have_content('509')
|
836
|
+
|
837
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
838
|
+
click_on 'ID'
|
839
|
+
end
|
840
|
+
|
841
|
+
within '.pagination_status' do
|
842
|
+
expect(page).to have_content('1-3 / 3')
|
843
|
+
end
|
844
|
+
|
845
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted.active-filter' do
|
846
|
+
expect(page).to have_content('507')
|
847
|
+
end
|
848
|
+
|
849
|
+
expect(page).to have_content('508')
|
850
|
+
expect(page).to have_content('509')
|
851
|
+
|
852
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
853
|
+
click_on 'ID'
|
854
|
+
end
|
855
|
+
|
856
|
+
within '.pagination_status' do
|
857
|
+
expect(page).to have_content('1-3 / 3')
|
858
|
+
end
|
859
|
+
|
860
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.sorted' do
|
861
|
+
expect(page).to have_content('509')
|
862
|
+
end
|
863
|
+
|
864
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
865
|
+
click_on 'Title'
|
866
|
+
end
|
867
|
+
|
868
|
+
within '.pagination_status' do
|
869
|
+
expect(page).to have_content('1-3 / 3')
|
870
|
+
end
|
871
|
+
|
872
|
+
expect(page).to have_content('507')
|
873
|
+
expect(page).to have_content('508')
|
874
|
+
expect(page).to have_content('509')
|
875
|
+
|
876
|
+
find(:css, '#grid_reset_grid_icon').click
|
877
|
+
within '.pagination_status' do
|
878
|
+
expect(page).to have_content('1-20 / 50')
|
879
|
+
end
|
880
|
+
end
|
881
|
+
end
|
882
|
+
|
883
|
+
shared_examples 'Description and Title filtering' do
|
884
|
+
it 'should filter by multiple columns' do
|
885
|
+
fill_in('grid_f_description', with: 'v')
|
886
|
+
fill_in('grid_f_title', with: 's')
|
887
|
+
select 'no', from: 'grid_f_archived'
|
888
|
+
|
889
|
+
find(:css, '#grid_submit_grid_icon').click
|
890
|
+
|
891
|
+
within '.pagination_status' do
|
892
|
+
expect(page).to have_content('1-11 / 11')
|
893
|
+
end
|
894
|
+
|
895
|
+
expect(page).to have_content('Inventore iure eos labore ipsum.')
|
896
|
+
expect(page).to have_content('Velit atque sapiente aspernatur sint fuga.')
|
897
|
+
|
898
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
899
|
+
click_on 'Description'
|
900
|
+
end
|
901
|
+
|
902
|
+
within '.pagination_status' do
|
903
|
+
expect(page).to have_content('1-11 / 11')
|
904
|
+
end
|
905
|
+
|
906
|
+
expect(page).to have_content('Inventore iure eos labore ipsum.')
|
907
|
+
expect(page).to have_content('Velit atque sapiente aspernatur sint fuga.')
|
908
|
+
|
909
|
+
find(:css, '#grid_reset_grid_icon').click
|
910
|
+
within '.pagination_status' do
|
911
|
+
expect(page).to have_content('1-20 / 50')
|
912
|
+
end
|
913
|
+
end
|
914
|
+
end
|
915
|
+
|
916
|
+
shared_examples 'Archived filtering' do
|
917
|
+
it 'should filter by Archived' do
|
918
|
+
select 'yes', from: 'grid_f_archived'
|
919
|
+
find(:css, '#grid_submit_grid_icon').click
|
920
|
+
|
921
|
+
within '.pagination_status' do
|
922
|
+
expect(page).to have_content('1-4 / 4')
|
923
|
+
end
|
924
|
+
|
925
|
+
within first(:css, 'td.active-filter') do
|
926
|
+
expect(page).to have_content('Yes')
|
927
|
+
end
|
928
|
+
|
929
|
+
select 'no', from: 'grid_f_archived'
|
930
|
+
find(:css, '#grid_submit_grid_icon').click
|
931
|
+
|
932
|
+
within '.pagination_status' do
|
933
|
+
expect(page).to have_content('1-20 / 46')
|
934
|
+
end
|
935
|
+
|
936
|
+
within first(:css, 'td.active-filter') do
|
937
|
+
expect(page).to have_content('No')
|
938
|
+
end
|
939
|
+
|
940
|
+
within 'ul.pagination' do
|
941
|
+
click_link '2'
|
942
|
+
end
|
943
|
+
|
944
|
+
within '.pagination_status' do
|
945
|
+
expect(page).to have_content('21-40 / 46')
|
946
|
+
end
|
947
|
+
|
948
|
+
within(first(:css, 'td.active-filter')) do
|
949
|
+
expect(page).to have_content('No')
|
950
|
+
end
|
951
|
+
|
952
|
+
find(:css, '#grid_reset_grid_icon').click
|
953
|
+
within '.pagination_status' do
|
954
|
+
expect(page).to have_content('1-20 / 50')
|
955
|
+
end
|
956
|
+
end
|
957
|
+
end
|
958
|
+
|
959
|
+
shared_examples 'Title filtering' do
|
960
|
+
it 'should filter by Title' do
|
961
|
+
fill_in('grid_f_title', with: 'ed')
|
962
|
+
|
963
|
+
find(:css, '#grid_submit_grid_icon').click
|
964
|
+
|
965
|
+
within '.pagination_status' do
|
966
|
+
expect(page).to have_content('1-2 / 2')
|
967
|
+
end
|
968
|
+
|
969
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
970
|
+
expect(page).to have_content('sed impedit iste')
|
971
|
+
end
|
972
|
+
|
973
|
+
expect(page).to have_content('corporis expedita vel')
|
974
|
+
|
975
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
976
|
+
click_on 'Title'
|
977
|
+
end
|
978
|
+
|
979
|
+
within '.pagination_status' do
|
980
|
+
expect(page).to have_content('1-2 / 2')
|
981
|
+
end
|
982
|
+
|
983
|
+
within 'div.wice-grid-container table.wice-grid tbody tr:first-child td.active-filter' do
|
984
|
+
expect(page).to have_content('corporis expedita vel')
|
985
|
+
end
|
986
|
+
|
987
|
+
expect(page).to have_content('sed impedit iste')
|
988
|
+
|
989
|
+
within 'div.wice-grid-container table.wice-grid thead' do
|
990
|
+
click_on 'ID'
|
991
|
+
end
|
992
|
+
|
993
|
+
within '.pagination_status' do
|
994
|
+
expect(page).to have_content('1-2 / 2')
|
995
|
+
end
|
996
|
+
|
997
|
+
expect(page).to have_content('corporis expedita vel')
|
998
|
+
expect(page).to have_content('sed impedit iste')
|
999
|
+
|
1000
|
+
find(:css, '#grid_reset_grid_icon').click
|
1001
|
+
within '.pagination_status' do
|
1002
|
+
expect(page).to have_content('1-20 / 50')
|
1003
|
+
end
|
1004
|
+
end
|
1005
|
+
end
|