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
c7bf2bfd
Commit
c7bf2bfd
authored
Jun 07, 2017
by
Tim Zallmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Converting Tests to Spec Tests
parent
f20337ca
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
0 deletions
+58
-0
spec/features/explore/new_menu_spec.rb
spec/features/explore/new_menu_spec.rb
+58
-0
No files found.
spec/features/explore/new_menu_spec.rb
0 → 100644
View file @
c7bf2bfd
require
'spec_helper'
describe
'Top Plus Menu'
,
:js
,
:feature
do
let!
(
:user
)
{
create
:user
}
let!
(
:group
)
{
create
(
:group
)
}
let!
(
:public_group
)
{
create
(
:group
,
:public
)
}
let!
(
:private_group
)
{
create
(
:group
,
:private
)
}
let!
(
:empty_project
)
{
create
(
:empty_project
,
group:
public_group
)
}
before
do
group
.
add_owner
(
user
)
login_as
(
user
)
visit
explore_groups_path
end
context
'used by full user'
do
before
do
login_as
:user
end
scenario
'click on New project shows new project page'
visit
root_dashboard_path
click_topmenuitem
(
"New project"
)
expect
(
page
).
to
have_content
(
'Project path'
)
expect
(
page
).
to
have_content
(
'Project name'
)
end
scenario
'click on New group shows new group page'
visit
root_dashboard_path
click_topmenuitem
(
"New group"
)
expect
(
page
).
to
have_content
(
'Group path'
)
expect
(
page
).
to
have_content
(
'Group name'
)
end
scenario
'click on New group shows new group page'
visit
root_dashboard_path
click_topmenuitem
(
"New snippet"
)
expect
(
page
).
to
have_content
(
'New Snippet'
)
expect
(
page
).
to
have_content
(
'Title'
)
end
end
def
click_topmenuitem
(
item_name
)
page
.
within
'.header-content'
do
find
(
'.header-new-dropdown-toggle'
).
trigger
(
'click'
)
expect
(
page
).
to
have_selector
(
'.header-new.dropdown.open'
,
count:
1
)
click_link
item_name
end
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