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]: elevate project pagination link assertions to base projects index
Kabiru Mwenjadf6bfc5280bb
diff --git a/modules/storages/spec/support/pages/admin/storages/project_storages/project_storages_index.rb b/modules/storages/spec/support/pages/admin/storages/project_storages/project_storages_index.rbindex b1008cb411a..ebd99db68b2 100644--- a/modules/storages/spec/support/pages/admin/storages/project_storages/project_storages_index.rb+++ b/modules/storages/spec/support/pages/admin/storages/project_storages/project_storages_index.rb@@ -33,7 +33,7 @@ module Pagesmodule Storagesmodule ProjectStoragesclass Index < ::Pages::Projects::Index- def path+ def path(storage)"/admin/settings/storages/#{storage.id}/project_storages"enddiff --git a/spec/support/pages/admin/custom_fields/custom_fields_projects/custom_field_projects_index.rb b/spec/support/pages/admin/custom_fields/custom_fields_projects/custom_field_projects_index.rbindex 1b692f34369..78fb409497e 100644--- a/spec/support/pages/admin/custom_fields/custom_fields_projects/custom_field_projects_index.rb+++ b/spec/support/pages/admin/custom_fields/custom_fields_projects/custom_field_projects_index.rb@@ -45,19 +45,6 @@ module Pagesendend- def expect_correct_pagination_links(model:)- within ".op-pagination" do- pagination_links = page.all(".op-pagination--item-link")- expect(pagination_links.size).to be_positive-- pagination_links.each.with_index(1) do |pagination_link, page_number|- uri = URI.parse(pagination_link["href"])- expect(uri.path).to eq(path(model))- expect(uri.query).to include("page=#{page_number}")- end- end- end-def row_id_prefix = "#admin-custom-fields-custom-field-projects-row-component-project"endenddiff --git a/spec/support/pages/projects/index.rb b/spec/support/pages/projects/index.rbindex 66810eb38d4..9b504a33526 100644--- a/spec/support/pages/projects/index.rb+++ b/spec/support/pages/projects/index.rb@@ -33,7 +33,7 @@ module Pagesclass Index < ::Pages::Pageinclude ::Components::Autocompleter::NgSelectAutocompleteHelpers- def path+ def path(*)"/projects"end@@ -127,6 +127,19 @@ module Pagesendend+ def expect_correct_pagination_links(model:)+ within ".op-pagination" do+ pagination_links = page.all(".op-pagination--item-link")+ expect(pagination_links.size).to be_positive++ pagination_links.each.with_index(1) do |pagination_link, page_number|+ uri = URI.parse(pagination_link["href"])+ expect(uri.path).to eq(path(model))+ expect(uri.query).to include("page=#{page_number}")+ end+ end+ end+def expect_filters_container_toggledexpect(page).to have_css(".op-filters-form")end