Skip to content

Commit b9f04df

Browse files
committed
Fix Capybara locator type warnings in Backlogs
Fixes: <internal:warning>:54:in 'Kernel.warn': Locator Type:#<Type id: 1008, name: "Type No. 1", position: 5, is_in_roadmap: true, is_milestone: false, is_default: false, color_id: nil, created_at: "2025-11-04 12:57:37.377907000 +0000", updated_at: "2025-11-04 12:57:37.377926000 +0000", is_standard: false, attribute_groups: [], description: nil, patterns: #<data WorkPackageTypes::Patterns::Collection patterns={}>, pdf_export_templates_config: {}> for selector :option must be an instance of String or Symbol or Integer. This will raise an error in a future version of Capybara. Called from: /home/git-repos/openproject/modules/backlogs/spec/support/pages/backlogs.rb:61 (StructuredWarnings::BuiltInWarning) <internal:warning>:54:in 'Kernel.warn': Locator Integer:255 for selector :link must be an instance of String or Symbol or Array. This will raise an error in a future version of Capybara. Called from: /home/git-repos/openproject/modules/backlogs/spec/support/pages/backlogs.rb:214 (StructuredWarnings::BuiltInWarning)
1 parent b958b5b commit b9f04df

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/backlogs/spec/support/pages/backlogs.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,9 @@ def alter_attributes_in_edit_story_mode(story, attributes)
5656
field_name = WorkPackage.human_attribute_name(key)
5757
case key
5858
when :subject, :story_points
59-
fill_in field_name, with: value
59+
fill_in field_name, with: value.to_s
6060
when :status, :type
61-
select value, from: field_name
61+
select value.to_s, from: field_name
6262
else
6363
raise NotImplementedError
6464
end
@@ -211,7 +211,7 @@ def expect_for_story(story, attributes)
211211
def expect_story_link_to_wp_page(story)
212212
within_story(story) do
213213
expect(page)
214-
.to have_link(story.id, href: work_package_path(story))
214+
.to have_link(story.to_param, href: work_package_path(story))
215215
end
216216
end
217217

0 commit comments

Comments
 (0)