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
0
Merge Requests
0
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
Boxiang Sun
gitlab-ce
Commits
0166d8d8
Commit
0166d8d8
authored
Jan 19, 2015
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'spinach_admin_application' into 'master'
Spinach admin application See merge request !1410
parents
465f4167
1809b3ee
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
78 additions
and
1 deletion
+78
-1
app/views/admin/applications/index.html.haml
app/views/admin/applications/index.html.haml
+1
-1
features/admin/applications.feature
features/admin/applications.feature
+18
-0
features/steps/admin/applications.rb
features/steps/admin/applications.rb
+55
-0
features/steps/shared/paths.rb
features/steps/shared/paths.rb
+4
-0
No files found.
app/views/admin/applications/index.html.haml
View file @
0166d8d8
...
...
@@ -12,7 +12,7 @@
%th
Clients
%th
%th
%tbody
%tbody
.oauth-applications
-
@applications
.
each
do
|
application
|
%tr
{
:id
=>
"application_#{application.id}"
}
%td
=
link_to
application
.
name
,
admin_application_path
(
application
)
...
...
features/admin/applications.feature
0 → 100644
View file @
0166d8d8
@admin
Feature
:
Admin Applications
Background
:
Given
I sign in as an admin
And
I visit applications page
Scenario
:
I
can manage application
Then
I click on new application button
And
I should see application form
Then
I fill application form out and submit
And
I see application
Then
I click edit
And
I see edit application form
Then
I change name of application and submit
And
I see that application was changed
Then
I visit applications page
And
I click to remove application
Then
I see that application is removed
\ No newline at end of file
features/steps/admin/applications.rb
0 → 100644
View file @
0166d8d8
class
Spinach::Features::AdminApplications
<
Spinach
::
FeatureSteps
include
SharedAuthentication
include
SharedPaths
include
SharedAdmin
step
'I click on new application button'
do
click_on
'New Application'
end
step
'I should see application form'
do
page
.
should
have_content
"New application"
end
step
'I fill application form out and submit'
do
fill_in
:doorkeeper_application_name
,
with:
'test'
fill_in
:doorkeeper_application_redirect_uri
,
with:
'https://test.com'
click_on
"Submit"
end
step
'I see application'
do
page
.
should
have_content
"Application: test"
page
.
should
have_content
"Application Id"
page
.
should
have_content
"Secret"
end
step
'I click edit'
do
click_on
"Edit"
end
step
'I see edit application form'
do
page
.
should
have_content
"Edit application"
end
step
'I change name of application and submit'
do
page
.
should
have_content
"Edit application"
fill_in
:doorkeeper_application_name
,
with:
'test_changed'
click_on
"Submit"
end
step
'I see that application was changed'
do
page
.
should
have_content
"test_changed"
page
.
should
have_content
"Application Id"
page
.
should
have_content
"Secret"
end
step
'I click to remove application'
do
within
'.oauth-applications'
do
click_on
"Destroy"
end
end
step
"I see that application is removed"
do
page
.
find
(
".oauth-applications"
).
should_not
have_content
"test_changed"
end
end
features/steps/shared/paths.rb
View file @
0166d8d8
...
...
@@ -171,6 +171,10 @@ module SharedPaths
visit
admin_application_settings_path
end
step
'I visit applications page'
do
visit
admin_applications_path
end
# ----------------------------------------
# Generic Project
# ----------------------------------------
...
...
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