OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub
Ruby agile-developmentangularbcfboardsbug-trackerganttgantt-chartifcissue-trackerjira-alternativekanbanopenprojectproduct-managementproject-managementproject-planningroadmaprubyscrumtimelineworkflows
tests[Op#57989]: With single records, assert against pagination options
Kabiru Mwenja7d9a4e45d718
diff --git a/modules/storages/spec/features/storages/admin/project_storages_spec.rb b/modules/storages/spec/features/storages/admin/project_storages_spec.rbindex 20a2d7f97ae..4f7d8f98ffe 100644--- a/modules/storages/spec/features/storages/admin/project_storages_spec.rb+++ b/modules/storages/spec/features/storages/admin/project_storages_spec.rb@@ -230,7 +230,7 @@ RSpec.describe "Admin lists project mappings for a storage",expect(page).to have_text(subproject.name)aggregate_failures "pagination links maintain the correct url" do- project_storages_index_page.expect_correct_pagination_links(model: storage)+ project_storages_index_page.expect_correct_pagination_options(model: storage)endend@@ -303,7 +303,7 @@ RSpec.describe "Admin lists project mappings for a storage",endaggregate_failures "pagination links maintain the correct url" do- project_storages_index_page.expect_correct_pagination_links(model: storage)+ project_storages_index_page.expect_correct_pagination_options(model: storage)endenddiff --git a/spec/features/admin/custom_fields/custom_fields_project_spec.rb b/spec/features/admin/custom_fields/custom_fields_project_spec.rbindex ad769c064fb..a12a4d90181 100644--- a/spec/features/admin/custom_fields/custom_fields_project_spec.rb+++ b/spec/features/admin/custom_fields/custom_fields_project_spec.rb@@ -115,7 +115,7 @@ RSpec.describe "Custom Fields Multi-Project Activation", :js doexpect(page).to have_text(subproject.name)aggregate_failures "pagination links maintain the correct url" do- custom_field_projects_page.expect_correct_pagination_links(model: custom_field)+ custom_field_projects_page.expect_correct_pagination_options(model: custom_field)endenddiff --git a/spec/features/admin/project_custom_fields/project_mappings_spec.rb b/spec/features/admin/project_custom_fields/project_mappings_spec.rbindex 9aaeaa5e48e..880222955d4 100644--- a/spec/features/admin/project_custom_fields/project_mappings_spec.rb+++ b/spec/features/admin/project_custom_fields/project_mappings_spec.rb@@ -119,7 +119,7 @@ RSpec.describe "Project Custom Field Mappings", :js doexpect(page).to have_text(subproject.name)aggregate_failures "pagination links maintain the correct url" do- project_custom_field_mappings_page.expect_correct_pagination_links(model: project_custom_field)+ project_custom_field_mappings_page.expect_correct_pagination_options(model: project_custom_field)endenddiff --git a/spec/support/pages/projects/index.rb b/spec/support/pages/projects/index.rbindex c33a469d875..8a2fe2aa999 100644--- a/spec/support/pages/projects/index.rb+++ b/spec/support/pages/projects/index.rb@@ -147,6 +147,18 @@ module Pagesendend+ def expect_correct_pagination_options(model:)+ within ".op-pagination--options" do+ pagination_links = page.all(".op-pagination--item-link")+ expect(pagination_links.size).to be_positive++ pagination_links.each do |pagination_link|+ uri = URI.parse(pagination_link["href"])+ expect(uri.path).to eq(path(model))+ end+ end+ end+def expect_filters_container_toggledexpect(page).to have_css(".op-filters-form")end