Skip to content

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

Rename overview page spec helper methods

Dombi Attila13ce90b1995d
diff --git a/spec/features/projects/copy_spec.rb b/spec/features/projects/copy_spec.rb
index 2577e7c5a00..1c2ae9555ae 100644
--- a/spec/features/projects/copy_spec.rb
+++ b/spec/features/projects/copy_spec.rb
@@ -391,7 +391,7 @@ RSpec.describe "Projects copy", :js, :with_cuprite,
overview_page = Pages::Projects::Show.new(copied_project)
overview_page.visit!
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
# User has no permission to edit project attributes.
expect(page).to have_no_css("[data-test-selector='project-custom-field-section-edit-button']")
# The custom fields are still copied from the parent project.
diff --git a/spec/features/projects/project_custom_fields/overview_page/dialog/permission_spec.rb b/spec/features/projects/project_custom_fields/overview_page/dialog/permission_spec.rb
index df7bc3a8464..ba44fca7a03 100644
--- a/spec/features/projects/project_custom_fields/overview_page/dialog/permission_spec.rb
+++ b/spec/features/projects/project_custom_fields/overview_page/dialog/permission_spec.rb
@@ -52,7 +52,7 @@ RSpec.describe "Edit project custom fields on project overview page", :js do
end
it "shows the attributes sidebar" do
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
expect(page).to have_text("Input fields")
end
end
@@ -65,7 +65,7 @@ RSpec.describe "Edit project custom fields on project overview page", :js do
end
it "does not show the edit buttons" do
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
expect(page).to have_no_css("[data-test-selector='project-custom-field-section-edit-button']")
end
end
@@ -81,7 +81,7 @@ RSpec.describe "Edit project custom fields on project overview page", :js do
end
it "does not show the edit buttons" do
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
expect(page).to have_no_css("[data-test-selector='project-custom-field-section-edit-button']")
end
end
@@ -94,7 +94,7 @@ RSpec.describe "Edit project custom fields on project overview page", :js do
end
it "shows the edit buttons" do
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
expect(page).to have_css("[data-test-selector='project-custom-field-section-edit-button']", count: 3)
end
end
diff --git a/spec/features/projects/project_custom_fields/overview_page/sidebar_spec.rb b/spec/features/projects/project_custom_fields/overview_page/sidebar_spec.rb
index 23bb5d72ff2..1f96df0b8a0 100644
--- a/spec/features/projects/project_custom_fields/overview_page/sidebar_spec.rb
+++ b/spec/features/projects/project_custom_fields/overview_page/sidebar_spec.rb
@@ -50,7 +50,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows the project custom field sections in the correct order" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
sections = page.all(".op-project-custom-field-section-container")
expect(sections.size).to eq(3)
@@ -64,7 +64,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
sections = page.all(".op-project-custom-field-section-container")
expect(sections.size).to eq(3)
@@ -78,7 +78,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows the project custom fields in the correct order within the sections" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_section_container(section_for_input_fields) do
fields = page.all(".op-project-custom-field-container")
@@ -118,7 +118,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_section_container(section_for_input_fields) do
fields = page.all(".op-project-custom-field-container")
@@ -140,7 +140,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
expect(page).to have_no_text "String field enabled for other project"
end
end
@@ -152,7 +152,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows the correct value for the project custom field if given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(boolean_project_custom_field) do
expect(page).to have_text "Boolean field"
expect(page).to have_text "Yes"
@@ -170,7 +170,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows the correct value for the project custom field if given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(boolean_project_custom_field) do
expect(page).to have_text "Boolean field"
expect(page).to have_text "No"
@@ -187,7 +187,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows an N/A text for the project custom field if no value given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(boolean_project_custom_field) do
expect(page).to have_text "Boolean field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -200,7 +200,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(boolean_project_custom_field) do
expect(page).to have_text "Boolean field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -211,7 +211,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(boolean_project_custom_field) do
expect(page).to have_text "Boolean field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -226,7 +226,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows the correct value for the project custom field if given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(string_project_custom_field) do
expect(page).to have_text "String field"
expect(page).to have_text "Foo"
@@ -243,7 +243,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows the correct value for the project custom field if given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(string_project_custom_field) do
expect(page).to have_text "String field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -260,7 +260,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows an N/A text for the project custom field if no value given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(string_project_custom_field) do
expect(page).to have_text "String field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -273,7 +273,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(string_project_custom_field) do
expect(page).to have_text "String field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -288,7 +288,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows the correct value for the project custom field if given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(integer_project_custom_field) do
expect(page).to have_text "Integer field"
expect(page).to have_text "123"
@@ -305,7 +305,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows the correct value for the project custom field if given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(integer_project_custom_field) do
expect(page).to have_text "Integer field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -322,7 +322,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows an N/A text for the project custom field if no value given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(integer_project_custom_field) do
expect(page).to have_text "Integer field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -335,7 +335,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(integer_project_custom_field) do
expect(page).to have_text "Integer field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -350,7 +350,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows the correct value for the project custom field if given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(date_project_custom_field) do
expect(page).to have_text "Date field"
expect(page).to have_text "01/01/2024"
@@ -367,7 +367,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows the correct value for the project custom field if given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(date_project_custom_field) do
expect(page).to have_text "Date field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -384,7 +384,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows an N/A text for the project custom field if no value given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(date_project_custom_field) do
expect(page).to have_text "Date field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -397,7 +397,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(date_project_custom_field) do
expect(page).to have_text "Date field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -412,7 +412,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows the correct value for the project custom field if given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(float_project_custom_field) do
expect(page).to have_text "Float field"
expect(page).to have_text "123.456"
@@ -429,7 +429,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows the correct value for the project custom field if given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(float_project_custom_field) do
expect(page).to have_text "Float field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -446,7 +446,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows an N/A text for the project custom field if no value given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(float_project_custom_field) do
expect(page).to have_text "Float field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -459,7 +459,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(float_project_custom_field) do
expect(page).to have_text "Float field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -479,7 +479,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows the correct value for the project custom field if given without truncation and dialog button" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(text_project_custom_field) do
expect(page).to have_text "Text field"
expect(page).to have_text "Lorem ipsum"
@@ -500,7 +500,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows the correct value for the project custom field if given with truncation and dialog button" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(text_project_custom_field) do
expect(page).to have_text "Text field"
expect(page).to have_text (("lorem " * 5).to_s)
@@ -523,7 +523,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows the correct value for the project custom field if given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(text_project_custom_field) do
expect(page).to have_text "Text field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -542,7 +542,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows an N/A text for the project custom field if no value given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(text_project_custom_field) do
expect(page).to have_text "Text field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -557,7 +557,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(text_project_custom_field) do
expect(page).to have_text "Text field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -574,7 +574,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows the correct value for the project custom field if given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(list_project_custom_field) do
expect(page).to have_text "List field"
expect(page).to have_text "Option 1"
@@ -591,7 +591,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows the correct value for the project custom field if given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(list_project_custom_field) do
expect(page).to have_text "List field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -608,7 +608,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows an N/A text for the project custom field if no value given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(list_project_custom_field) do
expect(page).to have_text "List field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -621,7 +621,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(list_project_custom_field) do
expect(page).to have_text "List field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -636,7 +636,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows the correct value for the project custom field if given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(version_project_custom_field) do
expect(page).to have_text "Version field"
expect(page).to have_text "Version 1"
@@ -653,7 +653,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows the correct value for the project custom field if given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(version_project_custom_field) do
expect(page).to have_text "Version field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -670,7 +670,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows an N/A text for the project custom field if no value given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(version_project_custom_field) do
expect(page).to have_text "Version field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -685,7 +685,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows the correct value for the project custom field if given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(user_project_custom_field) do
expect(page).to have_text "User field"
expect(page).to have_css("opce-principal")
@@ -703,7 +703,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows the correct value for the project custom field if given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(user_project_custom_field) do
expect(page).to have_text "User field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -720,7 +720,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows an N/A text for the project custom field if no value given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(user_project_custom_field) do
expect(page).to have_text "User field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -735,7 +735,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows the correct values for the project custom field if given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(multi_list_project_custom_field) do
expect(page).to have_text "Multi list field"
expect(page).to have_text "Option 1, Option 2"
@@ -752,7 +752,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows an N/A text for the project custom field if no value given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(multi_list_project_custom_field) do
expect(page).to have_text "Multi list field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -766,7 +766,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(multi_list_project_custom_field) do
expect(page).to have_text "Multi list field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -781,7 +781,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows the correct values for the project custom field if given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(multi_version_project_custom_field) do
expect(page).to have_text "Multi version field"
expect(page).to have_text "Version 1, Version 2"
@@ -798,7 +798,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows an N/A text for the project custom field if no value given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(multi_version_project_custom_field) do
expect(page).to have_text "Multi version field"
expect(page).to have_text I18n.t("placeholders.default")
@@ -813,7 +813,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows the correct values for the project custom field if given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(multi_user_project_custom_field) do
expect(page).to have_text "Multi user field"
expect(page).to have_css "opce-principal", count: 2
@@ -832,7 +832,7 @@ RSpec.describe "Show project custom fields on project overview page", :js, :with
it "shows an N/A text for the project custom field if no value given" do
overview_page.visit_page
- overview_page.within_async_loaded_sidebar do
+ overview_page.within_project_attributes_sidebar do
overview_page.within_custom_field_container(multi_user_project_custom_field) do
expect(page).to have_text "Multi user field"
expect(page).to have_text I18n.t("placeholders.default")
diff --git a/spec/support/pages/projects/show.rb b/spec/support/pages/projects/show.rb
index 7e1ea638a05..9cf4b2f662e 100644
--- a/spec/support/pages/projects/show.rb
+++ b/spec/support/pages/projects/show.rb
@@ -56,7 +56,7 @@ module Pages
expect(page).to have_no_css(".op-grid-page--grid-container")
end
- def within_async_loaded_sidebar(&)
+ def within_project_attributes_sidebar(&)
within "#project-custom-fields-sidebar" do
expect(page).to have_css("[data-test-selector='project-custom-fields-sidebar-async-content']")
yield
@@ -72,7 +72,7 @@ module Pages
end
def open_edit_dialog_for_section(section)
- within_async_loaded_sidebar do
+ within_project_attributes_sidebar do
scroll_to_element(page.find("[data-test-selector='project-custom-field-section-#{section.id}']"))
within_custom_field_section_container(section) do
page.find("[data-test-selector='project-custom-field-section-edit-button']").click