Skip to content
代码片段 群组 项目
未验证 提交 97a5f1ae 编辑于 作者: Kerri Miller's avatar Kerri Miller 提交者: GitLab
浏览文件

Merge branch 'sf/chore/update-rubocop-message-for-qa-selectors' into 'master'

Update advice for QA selectors in rubocop output

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/141745



Merged-by: default avatarKerri Miller <kerrizor@kerrizor.com>
Approved-by: default avatarWill Meek <wmeek@gitlab.com>
Approved-by: default avatarKerri Miller <kerrizor@kerrizor.com>
Co-authored-by: default avatarSam Figueroa <sfigueroa@gitlab.com>
No related branches found
No related tags found
无相关合并请求
......@@ -30,7 +30,7 @@ def on_send(node)
return if args.first.nil?
args.first.each_node(:str) do |arg|
add_offense(arg, message: MESSAGE % "data-qa-selector=#{element_name.value}")
add_offense(arg, message: MESSAGE % "data-testid=#{element_name.value}")
end
end
......
......@@ -16,9 +16,9 @@
expect_offense(<<-RUBY)
view 'app/views/shared/groups/_search_form.html.haml' do
element :groups_filter, 'search_field_tag :filter'
^^^^^^^^^^^^^^^^^^^^^^^^^^ Don't use a pattern for element, create a corresponding `data-qa-selector=groups_filter` instead.
^^^^^^^^^^^^^^^^^^^^^^^^^^ Don't use a pattern for element, create a corresponding `data-testid=groups_filter` instead.
element :groups_filter_placeholder, /Search by name/
^^^^^^^^^^^^^^ Don't use a pattern for element, create a corresponding `data-qa-selector=groups_filter_placeholder` instead.
^^^^^^^^^^^^^^ Don't use a pattern for element, create a corresponding `data-testid=groups_filter_placeholder` instead.
end
RUBY
end
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册