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
Léo-Paul Géneau
gitlab-ce
Commits
5a6252ff
Commit
5a6252ff
authored
Dec 16, 2016
by
Semyon Pupkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move admin application spinach test to rspec
https://gitlab.com/gitlab-org/gitlab-ce/issues/23036
parent
e47989a5
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
77 deletions
+36
-77
features/admin/applications.feature
features/admin/applications.feature
+0
-18
features/steps/admin/applications.rb
features/steps/admin/applications.rb
+0
-55
features/steps/shared/paths.rb
features/steps/shared/paths.rb
+0
-4
spec/features/admin/admin_manage_applications_spec.rb
spec/features/admin/admin_manage_applications_spec.rb
+36
-0
No files found.
features/admin/applications.feature
deleted
100644 → 0
View file @
e47989a5
@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
deleted
100644 → 0
View file @
e47989a5
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
expect
(
page
).
to
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
expect
(
page
).
to
have_content
"Application: test"
expect
(
page
).
to
have_content
"Application Id"
expect
(
page
).
to
have_content
"Secret"
end
step
'I click edit'
do
click_on
"Edit"
end
step
'I see edit application form'
do
expect
(
page
).
to
have_content
"Edit application"
end
step
'I change name of application and submit'
do
expect
(
page
).
to
have_content
"Edit application"
fill_in
:doorkeeper_application_name
,
with:
'test_changed'
click_on
"Submit"
end
step
'I see that application was changed'
do
expect
(
page
).
to
have_content
"test_changed"
expect
(
page
).
to
have_content
"Application Id"
expect
(
page
).
to
have_content
"Secret"
end
step
'I click to remove application'
do
page
.
within
'.oauth-applications'
do
click_on
"Destroy"
end
end
step
"I see that application is removed"
do
expect
(
page
.
find
(
".oauth-applications"
)).
not_to
have_content
"test_changed"
end
end
features/steps/shared/paths.rb
View file @
5a6252ff
...
...
@@ -207,10 +207,6 @@ module SharedPaths
visit
admin_spam_logs_path
end
step
'I visit applications page'
do
visit
admin_applications_path
end
# ----------------------------------------
# Generic Project
# ----------------------------------------
...
...
spec/features/admin/admin_manage_applications_spec.rb
0 → 100644
View file @
5a6252ff
require
'spec_helper'
RSpec
.
describe
'admin manage applications'
,
feature:
true
do
before
do
login_as
:admin
end
it
do
visit
admin_applications_path
click_on
'New Application'
expect
(
page
).
to
have_content
(
'New application'
)
fill_in
:doorkeeper_application_name
,
with:
'test'
fill_in
:doorkeeper_application_redirect_uri
,
with:
'https://test.com'
click_on
'Submit'
expect
(
page
).
to
have_content
(
'Application: test'
)
expect
(
page
).
to
have_content
(
'Application Id'
)
expect
(
page
).
to
have_content
(
'Secret'
)
click_on
'Edit'
expect
(
page
).
to
have_content
(
'Edit application'
)
fill_in
:doorkeeper_application_name
,
with:
'test_changed'
click_on
'Submit'
expect
(
page
).
to
have_content
(
'test_changed'
)
expect
(
page
).
to
have_content
(
'Application Id'
)
expect
(
page
).
to
have_content
(
'Secret'
)
visit
admin_applications_path
page
.
within
'.oauth-applications'
do
click_on
'Destroy'
end
expect
(
page
.
find
(
'.oauth-applications'
)).
not_to
have_content
(
'test_changed'
)
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