diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-10 15:09:12 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-05-10 15:09:12 +0300 |
commit | 0e0df204c1a0d859ccbbe1be83a5e09a53381f17 (patch) | |
tree | e7bf6fed5fa2b74caf31957c468b0cbc303f4c45 /spec/rubocop | |
parent | a2344dbf1942dc3919c55b0684d2566368e03852 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'spec/rubocop')
-rw-r--r-- | spec/rubocop/cop/rspec/avoid_conditional_statements_spec.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/rubocop/cop/rspec/avoid_conditional_statements_spec.rb b/spec/rubocop/cop/rspec/avoid_conditional_statements_spec.rb index d2f5e4aa619..3f45f660aa5 100644 --- a/spec/rubocop/cop/rspec/avoid_conditional_statements_spec.rb +++ b/spec/rubocop/cop/rspec/avoid_conditional_statements_spec.rb @@ -9,7 +9,7 @@ RSpec.describe RuboCop::Cop::RSpec::AvoidConditionalStatements, feature_category it 'flags if conditional' do expect_offense(<<~RUBY) if page.has_css?('[data-testid="begin-commit-button"]') - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Don't use `if` conditional statments in specs, it might create flakiness. See https://gitlab.com/gitlab-org/gitlab/-/issues/385304#note_1345437109 + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Don't use `if` conditional statement in specs, it might create flakiness. See https://gitlab.com/gitlab-org/gitlab/-/issues/385304#note_1345437109 find('[data-testid="begin-commit-button"]').click end RUBY @@ -20,7 +20,7 @@ RSpec.describe RuboCop::Cop::RSpec::AvoidConditionalStatements, feature_category RSpec.describe 'Multi-file editor new directory', :js, feature_category: :web_ide do it 'creates directory in current directory' do unless page.has_css?('[data-testid="begin-commit-button"]') - ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Don't use `unless` conditional statments in specs, it might create flakiness. See https://gitlab.com/gitlab-org/gitlab/-/issues/385304#note_1345437109 + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Don't use `unless` conditional statement in specs, it might create flakiness. See https://gitlab.com/gitlab-org/gitlab/-/issues/385304#note_1345437109 find('[data-testid="begin-commit-button"]').click end end @@ -33,7 +33,7 @@ RSpec.describe RuboCop::Cop::RSpec::AvoidConditionalStatements, feature_category RSpec.describe 'Multi-file editor new directory', :js, feature_category: :web_ide do it 'creates directory in current directory' do user.present ? user : nil - ^^^^^^^^^^^^^^^^^^^^^^^^^ Don't use `(send (send nil :user) :present) ? (ternary)` conditional statments in specs, it might create flakiness. See https://gitlab.com/gitlab-org/gitlab/-/issues/385304#note_1345437109 + ^^^^^^^^^^^^^^^^^^^^^^^^^ Don't use `user.present ? user : nil` conditional statement in specs, it might create flakiness. See https://gitlab.com/gitlab-org/gitlab/-/issues/385304#note_1345437109 end end RUBY |