summaryrefslogtreecommitdiff
path: root/features
diff options
context:
space:
mode:
authorRobert Speicher <rspeicher@gmail.com>2012-11-21 15:01:40 -0500
committerRobert Speicher <rspeicher@gmail.com>2012-11-21 15:01:40 -0500
commit30a66c065a14be05f05099118938fb20c8989b3e (patch)
treec559b7110b6fc6f8c80771dabe744c3d234c403a /features
parent00464099704ec16ad64faa3fe8c19d931ee7037a (diff)
downloadgitlab-ce-30a66c065a14be05f05099118938fb20c8989b3e.tar.gz
Improve user feedback on the Profile > Design page
- Header changes immediately without a page reload - Lets the user know that we actually saved their setting when changed
Diffstat (limited to 'features')
-rw-r--r--features/profile/profile.feature13
-rw-r--r--features/steps/profile/profile.rb17
2 files changed, 30 insertions, 0 deletions
diff --git a/features/profile/profile.feature b/features/profile/profile.feature
index a98988b8ded..95b85a9f911 100644
--- a/features/profile/profile.feature
+++ b/features/profile/profile.feature
@@ -30,3 +30,16 @@ Feature: Profile
Given I have activity
When I visit profile history page
Then I should see my activity
+
+ @javascript
+ Scenario: I change my application theme
+ Given I visit profile design page
+ When I change my application theme
+ Then I should see the theme change immediately
+ And I should receive feedback that the changes were saved
+
+ @javascript
+ Scenario: I change my code preview theme
+ Given I visit profile design page
+ When I change my code preview theme
+ Then I should receive feedback that the changes were saved
diff --git a/features/steps/profile/profile.rb b/features/steps/profile/profile.rb
index 151182f687b..b6833f2bde2 100644
--- a/features/steps/profile/profile.rb
+++ b/features/steps/profile/profile.rb
@@ -59,4 +59,21 @@ class Profile < Spinach::FeatureSteps
Then 'I should see my activity' do
page.should have_content "#{current_user.name} closed issue"
end
+
+ When "I change my application theme" do
+ choose "Violet"
+ end
+
+ When "I change my code preview theme" do
+ choose "Dark code preview"
+ end
+
+ Then "I should see the theme change immediately" do
+ page.should have_selector('body.ui_color')
+ page.should_not have_selector('body.ui_basic')
+ end
+
+ Then "I should receive feedback that the changes were saved" do
+ page.should have_content("Saved")
+ end
end