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
Jérome Perrin
gitlab-ce
Commits
bf601f07
Commit
bf601f07
authored
Jun 07, 2017
by
Tim Zallmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed spec test syntax errors
parent
c7bf2bfd
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
58 additions
and
4 deletions
+58
-4
spec/features/explore/new_menu_spec.rb
spec/features/explore/new_menu_spec.rb
+58
-4
No files found.
spec/features/explore/new_menu_spec.rb
View file @
bf601f07
require
'spec_helper'
require
'spec_helper'
describe
'Top Plus Menu'
,
:js
,
:featur
e
do
feature
'Top Plus Menu'
,
feature:
true
,
js:
tru
e
do
let!
(
:user
)
{
create
:user
}
let!
(
:user
)
{
create
:user
}
let!
(
:group
)
{
create
(
:group
)
}
let!
(
:group
)
{
create
(
:group
)
}
let!
(
:public_group
)
{
create
(
:group
,
:public
)
}
let!
(
:public_group
)
{
create
(
:group
,
:public
)
}
...
@@ -20,7 +20,7 @@ describe 'Top Plus Menu', :js, :feature do
...
@@ -20,7 +20,7 @@ describe 'Top Plus Menu', :js, :feature do
login_as
:user
login_as
:user
end
end
scenario
'click on New project shows new project page'
scenario
'click on New project shows new project page'
do
visit
root_dashboard_path
visit
root_dashboard_path
click_topmenuitem
(
"New project"
)
click_topmenuitem
(
"New project"
)
...
@@ -29,7 +29,7 @@ describe 'Top Plus Menu', :js, :feature do
...
@@ -29,7 +29,7 @@ describe 'Top Plus Menu', :js, :feature do
expect
(
page
).
to
have_content
(
'Project name'
)
expect
(
page
).
to
have_content
(
'Project name'
)
end
end
scenario
'click on New group shows new group page'
scenario
'click on New group shows new group page'
do
visit
root_dashboard_path
visit
root_dashboard_path
click_topmenuitem
(
"New group"
)
click_topmenuitem
(
"New group"
)
...
@@ -38,7 +38,7 @@ describe 'Top Plus Menu', :js, :feature do
...
@@ -38,7 +38,7 @@ describe 'Top Plus Menu', :js, :feature do
expect
(
page
).
to
have_content
(
'Group name'
)
expect
(
page
).
to
have_content
(
'Group name'
)
end
end
scenario
'click on New
group shows new group page'
scenario
'click on New
snippet shows new snippet page'
do
visit
root_dashboard_path
visit
root_dashboard_path
click_topmenuitem
(
"New snippet"
)
click_topmenuitem
(
"New snippet"
)
...
@@ -46,6 +46,60 @@ describe 'Top Plus Menu', :js, :feature do
...
@@ -46,6 +46,60 @@ describe 'Top Plus Menu', :js, :feature do
expect
(
page
).
to
have_content
(
'New Snippet'
)
expect
(
page
).
to
have_content
(
'New Snippet'
)
expect
(
page
).
to
have_content
(
'Title'
)
expect
(
page
).
to
have_content
(
'Title'
)
end
end
scenario
'click on New issue shows new issue page'
do
visit
namespace_project_path
(
empty_project
.
namespace
,
empty_project
)
click_topmenuitem
(
"New issue"
)
expect
(
page
).
to
have_content
(
'New Issue'
)
expect
(
page
).
to
have_content
(
'Title'
)
end
scenario
'click on New merge request shows new merge request page'
do
visit
namespace_project_path
(
empty_project
.
namespace
,
empty_project
)
click_topmenuitem
(
"New merge request"
)
expect
(
page
).
to
have_content
(
'New Merge Request'
)
expect
(
page
).
to
have_content
(
'Source branch'
)
expect
(
page
).
to
have_content
(
'Target branch'
)
end
scenario
'click on New project snippet shows new snippet page'
do
visit
namespace_project_path
(
empty_project
.
namespace
,
empty_project
)
page
.
within
'.header-content'
do
find
(
'.header-new-dropdown-toggle'
).
trigger
(
'click'
)
expect
(
page
).
to
have_selector
(
'.header-new.dropdown.open'
,
count:
1
)
find
(
'.header-new-project-snippet a'
).
trigger
(
'click'
)
end
expect
(
page
).
to
have_content
(
'New Snippet'
)
expect
(
page
).
to
have_content
(
'Title'
)
end
scenario
'Click on New subgroup shows new group page'
do
visit
group_path
(
group
)
click_topmenuitem
(
"New subgroup"
)
expect
(
page
).
to
have_content
(
'Group path'
)
expect
(
page
).
to
have_content
(
'Group name'
)
end
scenario
'Click on New project in group shows new project page'
do
visit
group_path
(
group
)
page
.
within
'.header-content'
do
find
(
'.header-new-dropdown-toggle'
).
trigger
(
'click'
)
expect
(
page
).
to
have_selector
(
'.header-new.dropdown.open'
,
count:
1
)
find
(
'.header-new-group-project a'
).
trigger
(
'click'
)
end
expect
(
page
).
to
have_content
(
'Project path'
)
expect
(
page
).
to
have_content
(
'Project name'
)
end
end
end
def
click_topmenuitem
(
item_name
)
def
click_topmenuitem
(
item_name
)
...
...
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