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
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 @@
...
@@ -10,7 +10,7 @@
-
if
create_group_project
||
create_group_subgroup
-
if
create_group_project
||
create_group_subgroup
%li
.dropdown-bold-header
This group
%li
.dropdown-bold-header
This group
-
if
create_group_project
-
if
create_group_project
%li
%li
.header-new-group-project
=
link_to
'New project'
,
new_project_path
(
namespace_id:
@group
.
id
)
=
link_to
'New project'
,
new_project_path
(
namespace_id:
@group
.
id
)
-
if
create_group_subgroup
-
if
create_group_subgroup
%li
%li
...
@@ -31,7 +31,7 @@
...
@@ -31,7 +31,7 @@
%li
%li
=
link_to
'New merge request'
,
new_namespace_project_merge_request_path
(
merge_project
.
namespace
,
merge_project
)
=
link_to
'New merge request'
,
new_namespace_project_merge_request_path
(
merge_project
.
namespace
,
merge_project
)
-
if
create_project_snippet
-
if
create_project_snippet
%li
%li
.header-new-project-snippet
=
link_to
'New snippet'
,
new_namespace_project_snippet_path
(
@project
.
namespace
,
@project
)
=
link_to
'New snippet'
,
new_namespace_project_snippet_path
(
@project
.
namespace
,
@project
)
%li
.divider
%li
.divider
%li
.dropdown-bold-header
GitLab
%li
.dropdown-bold-header
GitLab
...
...
features/explore/new_menu.feature
View file @
beb41aac
@explore
@explore
Feature
:
New Menu
Feature
:
New Menu
Background
:
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 own project
"Shop"
And
I visit dashboard page
And
I visit dashboard page
...
@@ -38,5 +39,17 @@ Background:
...
@@ -38,5 +39,17 @@ Background:
@javascript
@javascript
Scenario
:
I
should see New Project Snippet page
Scenario
:
I
should see New Project Snippet page
When
I visit project
"Shop"
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
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
...
@@ -4,42 +4,42 @@ class Spinach::Features::NewMenu < Spinach::FeatureSteps
include
SharedProject
include
SharedProject
step
'I click "New project" in top right menu'
do
step
'I click "New project" in top right menu'
do
page
.
within
'.header-content'
do
click_topmenuitem
(
"New project"
)
find
(
'.header-new-dropdown-toggle'
).
trigger
(
'click'
)
expect
(
page
).
to
have_selector
(
'.header-new.dropdown.open'
,
count:
1
)
click_link
"New project"
end
end
end
step
'I click "New group" in top right menu'
do
step
'I click "New group" in top right menu'
do
page
.
within
'.header-content'
do
click_topmenuitem
(
"New group"
)
find
(
'.header-new-dropdown-toggle'
).
trigger
(
'click'
)
expect
(
page
).
to
have_selector
(
'.header-new.dropdown.open'
,
count:
1
)
click_link
"New group"
end
end
end
step
'I click "New snippet" in top right menu'
do
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
page
.
within
'.header-content'
do
find
(
'.header-new-dropdown-toggle'
).
trigger
(
'click'
)
find
(
'.header-new-dropdown-toggle'
).
trigger
(
'click'
)
expect
(
page
).
to
have_selector
(
'.header-new.dropdown.open'
,
count:
1
)
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
end
end
step
'I click "New issue" in top right menu'
do
step
'I click "New issue" in top right menu'
do
page
.
within
'.header-content'
do
click_topmenuitem
(
"New issue"
)
find
(
'.header-new-dropdown-toggle'
).
trigger
(
'click'
)
expect
(
page
).
to
have_selector
(
'.header-new.dropdown.open'
,
count:
1
)
click_link
"New issue"
end
end
end
step
'I click "New merge request" in top right menu'
do
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
page
.
within
'.header-content'
do
find
(
'.header-new-dropdown-toggle'
).
trigger
(
'click'
)
find
(
'.header-new-dropdown-toggle'
).
trigger
(
'click'
)
expect
(
page
).
to
have_selector
(
'.header-new.dropdown.open'
,
count:
1
)
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
end
end
...
@@ -68,4 +68,12 @@ class Spinach::Features::NewMenu < Spinach::FeatureSteps
...
@@ -68,4 +68,12 @@ class Spinach::Features::NewMenu < Spinach::FeatureSteps
expect
(
page
).
to
have_content
(
'Source branch'
)
expect
(
page
).
to
have_content
(
'Source branch'
)
expect
(
page
).
to
have_content
(
'Target branch'
)
expect
(
page
).
to
have_content
(
'Target branch'
)
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
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