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

Use a synchronous matcher for checking custom action button title.

Dombi Attila1d53df53e2c0
diff --git a/spec/features/work_packages/custom_actions/custom_actions_spec.rb b/spec/features/work_packages/custom_actions/custom_actions_spec.rb
index 88e100809b3..6422839b1bf 100644
--- a/spec/features/work_packages/custom_actions/custom_actions_spec.rb
+++ b/spec/features/work_packages/custom_actions/custom_actions_spec.rb
@@ -312,9 +312,8 @@ RSpec.describe "Custom actions", :js, with_ee: %i[custom_actions] do
within(".custom-actions") do
# When hovering over the button, the description is displayed
- button = find(".custom-action--button", text: "Unassign")
- expect(button["title"])
- .to eql "Removes the assignee"
+ expect(page)
+ .to have_button("Unassign", title: "Removes the assignee")
end
wp_page.click_custom_action("Unassign")