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
beb41aac
Commit
beb41aac
authored
Jun 07, 2017
by
Tim Zallmann
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added additional classes for easier identifaction during tests
Greenfield Tests for Dropdown Menu finished
parent
4871cb7a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
42 additions
and
21 deletions
+42
-21
app/views/layouts/header/_new_dropdown.haml
app/views/layouts/header/_new_dropdown.haml
+2
-2
features/explore/new_menu.feature
features/explore/new_menu.feature
+15
-2
features/steps/explore/new_menu.rb
features/steps/explore/new_menu.rb
+25
-17
No files found.
app/views/layouts/header/_new_dropdown.haml
View file @
beb41aac
...
...
@@ -10,7 +10,7 @@
-
if
create_group_project
||
create_group_subgroup
%li
.dropdown-bold-header
This group
-
if
create_group_project
%li
%li
.header-new-group-project
=
link_to
'New project'
,
new_project_path
(
namespace_id:
@group
.
id
)
-
if
create_group_subgroup
%li
...
...
@@ -31,7 +31,7 @@
%li
=
link_to
'New merge request'
,
new_namespace_project_merge_request_path
(
merge_project
.
namespace
,
merge_project
)
-
if
create_project_snippet
%li
%li
.header-new-project-snippet
=
link_to
'New snippet'
,
new_namespace_project_snippet_path
(
@project
.
namespace
,
@project
)
%li
.divider
%li
.dropdown-bold-header
GitLab
...
...
features/explore/new_menu.feature
View file @
beb41aac
@explore
Feature
:
New Menu
Background
:
Given
I sign in as a user
Given
I sign in as
"John Doe"
And
"John Doe"
is owner of group
"Owned"
And
I own project
"Shop"
And
I visit dashboard page
...
...
@@ -38,5 +39,17 @@ Background:
@javascript
Scenario
:
I
should see New Project Snippet page
When
I visit project
"Shop"
page
And
I click
"New snippet"
in top right menu
And
I click
"New
project
snippet"
in top right menu
Then
I see
"New Snippet"
page
@javascript
Scenario
:
I
should see New Group Project page
When
I visit group
"Owned"
page
And
I click
"New group project"
in top right menu
Then
I see
"New Project"
page
@javascript
Scenario
:
I
should see New Subgroup page
When
I visit group
"Owned"
page
And
I click
"New subgroup"
in top right menu
Then
I see
"New Group"
page
features/steps/explore/new_menu.rb
View file @
beb41aac
...
...
@@ -4,42 +4,42 @@ class Spinach::Features::NewMenu < Spinach::FeatureSteps
include
SharedProject
step
'I click "New project" in top right menu'
do
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
"New project"
end
click_topmenuitem
(
"New project"
)
end
step
'I click "New group" in top right menu'
do
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
"New group"
end
click_topmenuitem
(
"New group"
)
end
step
'I click "New snippet" in top right menu'
do
click_topmenuitem
(
"New snippet"
)
end
step
'I click "New project snippet" in top right menu'
do
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
"New snippet"
find
(
'.header-new-project-snippet a'
).
trigger
(
'click'
)
end
end
step
'I click "New issue" in top right menu'
do
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
"New issue"
end
click_topmenuitem
(
"New issue"
)
end
step
'I click "New merge request" in top right menu'
do
click_topmenuitem
(
"New merge request"
)
end
step
'I click "New subgroup" in top right menu'
do
click_topmenuitem
(
"New subgroup"
)
end
step
'I click "New group project" in top right menu'
do
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
"New merge request"
find
(
'.header-new-group-project a'
).
trigger
(
'click'
)
end
end
...
...
@@ -68,4 +68,12 @@ class Spinach::Features::NewMenu < Spinach::FeatureSteps
expect
(
page
).
to
have_content
(
'Source branch'
)
expect
(
page
).
to
have_content
(
'Target branch'
)
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