summaryrefslogtreecommitdiff
path: root/spec/features/profiles
diff options
context:
space:
mode:
authorBob Van Landuyt <bob@vanlanduyt.co>2018-07-24 16:16:09 +0200
committerBob Van Landuyt <bob@vanlanduyt.co>2018-07-30 15:01:26 +0200
commit9252414078c61a9642889d19fd166cf658492ef2 (patch)
tree2b456a25dc9375b28af242171c7c9c4b702a84fb /spec/features/profiles
parentf1d3ea63cf74d2791a9a863b29ab2d919ea61bd0 (diff)
downloadgitlab-ce-9252414078c61a9642889d19fd166cf658492ef2.tar.gz
Hide the status fields behind a feature flag
Since the frontend for this feature isn't ready, better to hide the confusing field behind a feature flag.
Diffstat (limited to 'spec/features/profiles')
-rw-r--r--spec/features/profiles/user_edit_profile_spec.rb27
1 files changed, 27 insertions, 0 deletions
diff --git a/spec/features/profiles/user_edit_profile_spec.rb b/spec/features/profiles/user_edit_profile_spec.rb
index 0b5eacbe916..96bbe6f93f1 100644
--- a/spec/features/profiles/user_edit_profile_spec.rb
+++ b/spec/features/profiles/user_edit_profile_spec.rb
@@ -55,4 +55,31 @@ describe 'User edit profile' do
expect(page).to have_link('gravatar.com')
end
end
+
+ context 'user status' do
+ it 'hides user status when the feature is disabled' do
+ stub_feature_flags(user_status_form: false)
+
+ visit(profile_path)
+
+ expect(page).not_to have_content('Current Status')
+ end
+
+ it 'shows the status form when the feature is enabled' do
+ stub_feature_flags(user_status_form: true)
+
+ visit(profile_path)
+
+ expect(page).to have_content('Current Status')
+ end
+
+ it 'shows the status form when the feature is enabled by setting a cookie', :js do
+ stub_feature_flags(user_status_form: false)
+ set_cookie('feature_user_status_form', 'true')
+
+ visit(profile_path)
+
+ expect(page).to have_content('Current Status')
+ end
+ end
end