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 failing tests in team planners

Behrokh Satarnejad3bf74a9b2cb2
diff --git a/modules/team_planner/app/views/team_planner/team_planner/index.html.erb b/modules/team_planner/app/views/team_planner/team_planner/index.html.erb
index 0c6c18f9fb1..a8e6d21fd43 100644
--- a/modules/team_planner/app/views/team_planner/team_planner/index.html.erb
+++ b/modules/team_planner/app/views/team_planner/team_planner/index.html.erb
@@ -11,7 +11,7 @@
<%=
render Primer::OpenProject::SubHeader.new do |subheader|
- subheader.with_action_component do
+ subheader.with_action_component(data: { "test-selector": "add-team-planner-button"}) do
render ::TeamPlanner::AddButtonComponent.new(current_project: @project)
end
end
diff --git a/modules/team_planner/app/views/team_planner/team_planner/overview.html.erb b/modules/team_planner/app/views/team_planner/team_planner/overview.html.erb
index a123874b152..0cfe3fd8cd6 100644
--- a/modules/team_planner/app/views/team_planner/team_planner/overview.html.erb
+++ b/modules/team_planner/app/views/team_planner/team_planner/overview.html.erb
@@ -9,7 +9,7 @@
<%=
render Primer::OpenProject::SubHeader.new do |subheader|
- subheader.with_action_component do
+ subheader.with_action_component(data: { "test-selector": "add-team-planner-button"}) do
render ::TeamPlanner::AddButtonComponent.new
end
end
diff --git a/modules/team_planner/spec/support/pages/team_planner.rb b/modules/team_planner/spec/support/pages/team_planner.rb
index 0e0c3c8a3dd..99cbfb08591 100644
--- a/modules/team_planner/spec/support/pages/team_planner.rb
+++ b/modules/team_planner/spec/support/pages/team_planner.rb
@@ -172,13 +172,13 @@ module Pages
end
def expect_create_button
- within ".toolbar-items" do
+ within '[data-test-selector="add-team-planner-button"]' do
expect(page).to have_link text: "Team planner"
end
end
def expect_no_create_button
- within ".toolbar-items" do
+ within '[data-test-selector="add-team-planner-button"]' do
expect(page).to have_no_link text: "Team planner"
end
end
@@ -192,7 +192,7 @@ module Pages
end
def click_on_create_button
- within ".toolbar-items" do
+ within '[data-test-selector="add-team-planner-button"]' do
click_link "Team planner"
end
end