Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
a7680d7e
Commit
a7680d7e
authored
Apr 14, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Spinach feature for appearance
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
cfa7e24b
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
65 additions
and
0 deletions
+65
-0
features/admin/appearance.feature
features/admin/appearance.feature
+19
-0
features/steps/admin/appearance.rb
features/steps/admin/appearance.rb
+38
-0
features/steps/shared/paths.rb
features/steps/shared/paths.rb
+8
-0
No files found.
features/admin/appearance.feature
0 → 100644
View file @
a7680d7e
Feature
:
Admin Appearance
Scenario
:
Create new appearance
Given
I sign in as an admin
And
I visit admin appearance page
When
submit form with new appearance
Then
I should be redirected to admin appearance page
And
I should see newly created appearance
Scenario
:
Preview appearance
Given
application has custom appearance
And
I sign in as an admin
When
I visit admin appearance page
And
I click preview button
Then
I should see a customized appearance
Scenario
:
Custom sign-in page
Given
application has custom appearance
When
I visit login page
Then
I should see a customized appearance
features/steps/admin/appearance.rb
0 → 100644
View file @
a7680d7e
class
Spinach::Features::AdminAppearance
<
Spinach
::
FeatureSteps
include
SharedAuthentication
include
SharedPaths
step
'submit form with new appearance'
do
fill_in
'appearance_title'
,
with:
'MyCompany'
fill_in
'appearance_description'
,
with:
'dev server'
click_button
'Save'
end
step
'I should be redirected to admin appearance page'
do
current_path
.
should
==
admin_appearances_path
page
.
should
have_content
'Appearance settings'
end
step
'I should see newly created appearance'
do
page
.
should
have_field
(
'appearance_title'
,
with:
'MyCompany'
)
page
.
should
have_field
(
'appearance_description'
,
with:
'dev server'
)
page
.
should
have_content
'Last edit'
end
step
'I click preview button'
do
click_link
"Preview"
end
step
'application has custom appearance'
do
create
(
:appearance
)
end
step
'I should see a customized appearance'
do
page
.
should
have_content
appearance
.
title
page
.
should
have_content
appearance
.
description
end
def
appearance
Appearance
.
last
end
end
features/steps/shared/paths.rb
View file @
a7680d7e
...
@@ -5,6 +5,10 @@ module SharedPaths
...
@@ -5,6 +5,10 @@ module SharedPaths
visit
new_project_path
visit
new_project_path
end
end
step
'I visit login page'
do
visit
new_user_session_path
end
# ----------------------------------------
# ----------------------------------------
# User
# User
# ----------------------------------------
# ----------------------------------------
...
@@ -157,6 +161,10 @@ module SharedPaths
...
@@ -157,6 +161,10 @@ module SharedPaths
visit
admin_groups_path
visit
admin_groups_path
end
end
step
'I visit admin appearance page'
do
visit
admin_appearances_path
end
step
'I visit admin teams page'
do
step
'I visit admin teams page'
do
visit
admin_teams_path
visit
admin_teams_path
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment