summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorDan Davison <ddavison@gitlab.com>2019-05-28 16:44:22 +0000
committerDan Davison <ddavison@gitlab.com>2019-05-28 16:44:22 +0000
commite6c6acaf0750700614e9a28d1eb42ae6a206f90f (patch)
treeb9dfc35f0559ab7ad8f0bc1985e61abf7b6d0bd0 /spec
parent2efc284a99e5791a486da5bfd137142d465fb38c (diff)
parent83cfd20ca86d5f0992438c44707b074a711b7752 (diff)
downloadgitlab-ce-e6c6acaf0750700614e9a28d1eb42ae6a206f90f.tar.gz
Merge branch 'qa-extend-click-visit-actions' into 'master'
Implement dynamic validation on QA Pages Closes gitlab-qa#280 See merge request gitlab-org/gitlab-ce!25704
Diffstat (limited to 'spec')
-rw-r--r--spec/rubocop/cop/qa/element_with_pattern_spec.rb11
1 files changed, 10 insertions, 1 deletions
diff --git a/spec/rubocop/cop/qa/element_with_pattern_spec.rb b/spec/rubocop/cop/qa/element_with_pattern_spec.rb
index c5beb40f9fd..ef20d9a1f26 100644
--- a/spec/rubocop/cop/qa/element_with_pattern_spec.rb
+++ b/spec/rubocop/cop/qa/element_with_pattern_spec.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
require 'spec_helper'
require 'rubocop'
@@ -23,7 +25,7 @@ describe RuboCop::Cop::QA::ElementWithPattern do
element :groups_filter, 'search_field_tag :filter'
^^^^^^^^^^^^^^^^^^^^^^^^^^ Don't use a pattern for element, create a corresponding `qa-groups-filter` instead.
element :groups_filter_placeholder, /Search by name/
- ^^^^^^^^^^^^^^^^ Don't use a pattern for element, create a corresponding `qa-groups-filter-placeholder` instead.
+ ^^^^^^^^^^^^^^ Don't use a pattern for element, create a corresponding `qa-groups-filter-placeholder` instead.
end
RUBY
end
@@ -35,6 +37,13 @@ describe RuboCop::Cop::QA::ElementWithPattern do
element :groups_filter_placeholder
end
RUBY
+
+ expect_no_offenses(<<-RUBY)
+ view 'app/views/shared/groups/_search_form.html.haml' do
+ element :groups_filter, required: true
+ element :groups_filter_placeholder, required: false
+ end
+ RUBY
end
end