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

Fix team planner query handling spec

Henriette Dargeefc31654d85f
diff --git a/modules/team_planner/spec/features/query_handling_spec.rb b/modules/team_planner/spec/features/query_handling_spec.rb
index b09c49b67fe..73c14ca5a67 100644
--- a/modules/team_planner/spec/features/query_handling_spec.rb
+++ b/modules/team_planner/spec/features/query_handling_spec.rb
@@ -85,6 +85,8 @@ describe 'Team planner query handling', type: :feature, js: true do
login_as user
team_planner.visit!
+ team_planner.add_assignee user
+ loading_indicator_saveguard
team_planner.expect_assignee user
team_planner.within_lane(user) do
team_planner.expect_event bug
@@ -113,8 +115,8 @@ describe 'Team planner query handling', type: :feature, js: true do
end
it 'shows only team planner queries' do
- # Go to team planner where no query is shown
- query_menu.expect_no_menu_entry
+ # Go to team planner where no query is shown, only the create option
+ query_menu.expect_menu_entry 'Create new planner'
# Change filter
filters.open
diff --git a/modules/team_planner/spec/support/pages/team_planner.rb b/modules/team_planner/spec/support/pages/team_planner.rb
index 7bcb34e5003..2a3abfba71f 100644
--- a/modules/team_planner/spec/support/pages/team_planner.rb
+++ b/modules/team_planner/spec/support/pages/team_planner.rb
@@ -80,6 +80,12 @@ module Pages
::Pages::SplitWorkPackage.new(work_package, project)
end
+ def add_assignee(name)
+ click_add_user
+ search_user_to_add name
+ select_user_to_add name
+ end
+
def click_add_user
page.find('[data-qa-selector="tp-assignee-add-button"]').click
end