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:
Diffstat (limited to 'spec/support/helpers/feature_flag_helpers.rb')
-rw-r--r--spec/support/helpers/feature_flag_helpers.rb24
1 files changed, 17 insertions, 7 deletions
diff --git a/spec/support/helpers/feature_flag_helpers.rb b/spec/support/helpers/feature_flag_helpers.rb
index 4e57002a7c6..3cf611c66e6 100644
--- a/spec/support/helpers/feature_flag_helpers.rb
+++ b/spec/support/helpers/feature_flag_helpers.rb
@@ -2,22 +2,32 @@
module FeatureFlagHelpers
def create_flag(project, name, active = true, description: nil, version: Operations::FeatureFlag.versions['new_version_flag'])
- create(:operations_feature_flag, name: name, active: active, version: version,
- description: description, project: project)
+ create(
+ :operations_feature_flag,
+ name: name,
+ active: active,
+ version: version,
+ description: description,
+ project: project
+ )
end
def create_scope(feature_flag, environment_scope, active = true, strategies = [{ name: "default", parameters: {} }])
- create(:operations_feature_flag_scope,
+ create(
+ :operations_feature_flag_scope,
feature_flag: feature_flag,
environment_scope: environment_scope,
active: active,
- strategies: strategies)
+ strategies: strategies
+ )
end
def create_strategy(feature_flag, name = 'default', parameters = {})
- create(:operations_strategy,
+ create(
+ :operations_strategy,
feature_flag: feature_flag,
- name: name)
+ name: name
+ )
end
def within_feature_flag_row(index)
@@ -95,6 +105,6 @@ module FeatureFlagHelpers
end
def expect_user_to_see_feature_flags_index_page
- expect(page).to have_text('Feature Flags')
+ expect(page).to have_text('Feature flags')
end
end