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
297dfe6a
Commit
297dfe6a
authored
Sep 13, 2017
by
Vitaliy @blackst0ne Klachkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Replace the 'profile/active_tab.feature' spinach test with an rspec analog
parent
373ff978
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
79 additions
and
58 deletions
+79
-58
changelogs/unreleased/replace_profile_active_tab-feature.yml
changelogs/unreleased/replace_profile_active_tab-feature.yml
+5
-0
features/profile/active_tab.feature
features/profile/active_tab.feature
+0
-29
features/steps/profile/active_tab.rb
features/steps/profile/active_tab.rb
+0
-25
spec/features/profiles/user_visits_profile_account_page_spec.rb
...eatures/profiles/user_visits_profile_account_page_spec.rb
+16
-0
spec/features/profiles/user_visits_profile_authentication_log_page_spec.rb
...files/user_visits_profile_authentication_log_page_spec.rb
+16
-0
spec/features/profiles/user_visits_profile_page_spec.rb
spec/features/profiles/user_visits_profile_page_spec.rb
+16
-0
spec/features/profiles/user_visits_profile_preferences_page_spec.rb
...res/profiles/user_visits_profile_preferences_page_spec.rb
+10
-4
spec/features/profiles/user_visits_profile_ssh_keys_page_spec.rb
...atures/profiles/user_visits_profile_ssh_keys_page_spec.rb
+16
-0
No files found.
changelogs/unreleased/replace_profile_active_tab-feature.yml
0 → 100644
View file @
297dfe6a
---
title
:
Replace the 'profile/active_tab.feature' spinach test with an rspec analog
merge_request
:
14239
author
:
Vitaliy @blackst0ne Klachkov
type
:
other
features/profile/active_tab.feature
deleted
100644 → 0
View file @
373ff978
@profile
Feature
:
Profile Active Tab
Background
:
Given
I sign in as a user
Scenario
:
On Profile Home
Given
I visit profile page
Then
the active main tab should be Home
And
no other main tabs should be active
Scenario
:
On Profile Account
Given
I visit profile account page
Then
the active main tab should be Account
And
no other main tabs should be active
Scenario
:
On Profile SSH Keys
Given
I visit profile SSH keys page
Then
the active main tab should be SSH Keys
And
no other main tabs should be active
Scenario
:
On Profile Preferences
Given
I visit profile preferences page
Then
the active main tab should be Preferences
And
no other main tabs should be active
Scenario
:
On Profile Authentication log
Given
I visit Authentication log page
Then
the active main tab should be Authentication log
And
no other main tabs should be active
features/steps/profile/active_tab.rb
deleted
100644 → 0
View file @
373ff978
class
Spinach::Features::ProfileActiveTab
<
Spinach
::
FeatureSteps
include
SharedAuthentication
include
SharedPaths
include
SharedActiveTab
step
'the active main tab should be Home'
do
ensure_active_main_tab
(
'Profile'
)
end
step
'the active main tab should be Account'
do
ensure_active_main_tab
(
'Account'
)
end
step
'the active main tab should be SSH Keys'
do
ensure_active_main_tab
(
'SSH Keys'
)
end
step
'the active main tab should be Preferences'
do
ensure_active_main_tab
(
'Preferences'
)
end
step
'the active main tab should be Authentication log'
do
ensure_active_main_tab
(
'Authentication log'
)
end
end
spec/features/profiles/user_visits_profile_account_page_spec.rb
0 → 100644
View file @
297dfe6a
require
'spec_helper'
describe
'User visits the profile account page'
do
let
(
:user
)
{
create
(
:user
)
}
before
do
sign_in
(
user
)
visit
(
profile_account_path
)
end
it
'shows correct menu item'
do
expect
(
find
(
'.sidebar-top-level-items > li.active'
)).
to
have_content
(
'Account'
)
expect
(
page
).
to
have_selector
(
'.sidebar-top-level-items > li.active'
,
count:
1
)
end
end
spec/features/profiles/user_visits_profile_authentication_log_page_spec.rb
0 → 100644
View file @
297dfe6a
require
'spec_helper'
describe
'User visits the authentication log page'
do
let
(
:user
)
{
create
(
:user
)
}
before
do
sign_in
(
user
)
visit
(
audit_log_profile_path
)
end
it
'shows correct menu item'
do
expect
(
find
(
'.sidebar-top-level-items > li.active'
)).
to
have_content
(
'Authentication log'
)
expect
(
page
).
to
have_selector
(
'.sidebar-top-level-items > li.active'
,
count:
1
)
end
end
spec/features/profiles/user_visits_profile_page_spec.rb
0 → 100644
View file @
297dfe6a
require
'spec_helper'
describe
'User visits the profile page'
do
let
(
:user
)
{
create
(
:user
)
}
before
do
sign_in
(
user
)
visit
(
profile_path
)
end
it
'shows correct menu item'
do
expect
(
find
(
'.sidebar-top-level-items > li.active'
)).
to
have_content
(
'Profile'
)
expect
(
page
).
to
have_selector
(
'.sidebar-top-level-items > li.active'
,
count:
1
)
end
end
spec/features/profiles/
preferences
_spec.rb
→
spec/features/profiles/
user_visits_profile_preferences_page
_spec.rb
View file @
297dfe6a
require
'spec_helper'
describe
'
Profile > Preferences'
,
:js
do
describe
'
User visits the profile preferences page'
do
let
(
:user
)
{
create
(
:user
)
}
before
do
sign_in
(
user
)
visit
profile_preferences_path
visit
(
profile_preferences_path
)
end
it
'shows correct menu item'
do
expect
(
find
(
'.sidebar-top-level-items > li.active'
)).
to
have_content
(
'Preferences'
)
expect
(
page
).
to
have_selector
(
'.sidebar-top-level-items > li.active'
,
count:
1
)
end
describe
'User changes their syntax highlighting theme'
do
describe
'User changes their syntax highlighting theme'
,
:js
do
it
'creates a flash message'
do
choose
'user_color_scheme_id_5'
...
...
@@ -27,7 +33,7 @@ describe 'Profile > Preferences', :js do
end
end
describe
'User changes their default dashboard'
do
describe
'User changes their default dashboard'
,
:js
do
it
'creates a flash message'
do
select
'Starred Projects'
,
from:
'user_dashboard'
click_button
'Save'
...
...
spec/features/profiles/user_visits_profile_ssh_keys_page_spec.rb
0 → 100644
View file @
297dfe6a
require
'spec_helper'
describe
'User visits the profile SSH keys page'
do
let
(
:user
)
{
create
(
:user
)
}
before
do
sign_in
(
user
)
visit
(
profile_keys_path
)
end
it
'shows correct menu item'
do
expect
(
find
(
'.sidebar-top-level-items > li.active'
)).
to
have_content
(
'SSH Keys'
)
expect
(
page
).
to
have_selector
(
'.sidebar-top-level-items > li.active'
,
count:
1
)
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