Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2023-05-10 15:09:12 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2023-05-10 15:09:12 +0300
commit0e0df204c1a0d859ccbbe1be83a5e09a53381f17 (patch)
treee7bf6fed5fa2b74caf31957c468b0cbc303f4c45 /spec/rubocop
parenta2344dbf1942dc3919c55b0684d2566368e03852 (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.rb6
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