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
a27c0013
Commit
a27c0013
authored
Sep 05, 2017
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test fixes
removed un-used file
parent
365adcf6
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
4 additions
and
129 deletions
+4
-129
app/assets/javascripts/dispatcher.js
app/assets/javascripts/dispatcher.js
+0
-5
app/assets/javascripts/group_name.js
app/assets/javascripts/group_name.js
+0
-76
features/steps/explore/projects.rb
features/steps/explore/projects.rb
+2
-2
features/steps/project/redirects.rb
features/steps/project/redirects.rb
+1
-1
spec/features/projects/sub_group_issuables_spec.rb
spec/features/projects/sub_group_issuables_spec.rb
+1
-2
spec/features/projects_spec.rb
spec/features/projects_spec.rb
+0
-43
No files found.
app/assets/javascripts/dispatcher.js
View file @
a27c0013
...
...
@@ -41,7 +41,6 @@ import Issue from './issue';
import
BindInOut
from
'
./behaviors/bind_in_out
'
;
import
DeleteModal
from
'
./branches/branches_delete_modal
'
;
import
Group
from
'
./group
'
;
import
GroupName
from
'
./group_name
'
;
import
GroupsList
from
'
./groups_list
'
;
import
ProjectsList
from
'
./projects_list
'
;
import
setupProjectEdit
from
'
./project_edit
'
;
...
...
@@ -554,9 +553,6 @@ import initChangesDropdown from './init_changes_dropdown';
case
'
root
'
:
new
UserCallout
();
break
;
case
'
groups
'
:
new
GroupName
();
break
;
case
'
profiles
'
:
new
NotificationsForm
();
new
NotificationsDropdown
();
...
...
@@ -564,7 +560,6 @@ import initChangesDropdown from './init_changes_dropdown';
case
'
projects
'
:
new
Project
();
new
ProjectAvatar
();
new
GroupName
();
switch
(
path
[
1
])
{
case
'
compare
'
:
new
CompareAutocomplete
();
...
...
app/assets/javascripts/group_name.js
deleted
100644 → 0
View file @
365adcf6
import
Cookies
from
'
js-cookie
'
;
import
_
from
'
underscore
'
;
export
default
class
GroupName
{
constructor
()
{
this
.
titleContainer
=
document
.
querySelector
(
'
.js-title-container
'
);
this
.
title
=
this
.
titleContainer
.
querySelector
(
'
.title
'
);
if
(
this
.
title
)
{
this
.
titleWidth
=
this
.
title
.
offsetWidth
;
this
.
groupTitle
=
this
.
titleContainer
.
querySelector
(
'
.group-title
'
);
this
.
groups
=
this
.
titleContainer
.
querySelectorAll
(
'
.group-path
'
);
this
.
toggle
=
null
;
this
.
isHidden
=
false
;
this
.
init
();
}
}
init
()
{
if
(
this
.
groups
.
length
>
0
)
{
this
.
groups
[
this
.
groups
.
length
-
1
].
classList
.
remove
(
'
hidable
'
);
this
.
toggleHandler
();
window
.
addEventListener
(
'
resize
'
,
_
.
debounce
(
this
.
toggleHandler
.
bind
(
this
),
100
));
}
this
.
render
();
}
toggleHandler
()
{
if
(
this
.
titleWidth
>
this
.
titleContainer
.
offsetWidth
)
{
if
(
!
this
.
toggle
)
this
.
createToggle
();
this
.
showToggle
();
}
else
if
(
this
.
toggle
)
{
this
.
hideToggle
();
}
}
createToggle
()
{
this
.
toggle
=
document
.
createElement
(
'
button
'
);
this
.
toggle
.
setAttribute
(
'
type
'
,
'
button
'
);
this
.
toggle
.
className
=
'
text-expander group-name-toggle
'
;
this
.
toggle
.
setAttribute
(
'
aria-label
'
,
'
Toggle full path
'
);
if
(
Cookies
.
get
(
'
new_nav
'
)
===
'
true
'
)
{
this
.
toggle
.
innerHTML
=
'
<i class="fa fa-ellipsis-h" aria-hidden="true"></i>
'
;
}
else
{
this
.
toggle
.
innerHTML
=
'
...
'
;
}
this
.
toggle
.
addEventListener
(
'
click
'
,
this
.
toggleGroups
.
bind
(
this
));
if
(
Cookies
.
get
(
'
new_nav
'
)
===
'
true
'
)
{
this
.
title
.
insertBefore
(
this
.
toggle
,
this
.
groupTitle
);
}
else
{
this
.
titleContainer
.
insertBefore
(
this
.
toggle
,
this
.
title
);
}
this
.
toggleGroups
();
}
showToggle
()
{
this
.
title
.
classList
.
add
(
'
wrap
'
);
this
.
toggle
.
classList
.
remove
(
'
hidden
'
);
if
(
this
.
isHidden
)
this
.
groupTitle
.
classList
.
add
(
'
hidden
'
);
}
hideToggle
()
{
this
.
title
.
classList
.
remove
(
'
wrap
'
);
this
.
toggle
.
classList
.
add
(
'
hidden
'
);
if
(
this
.
isHidden
)
this
.
groupTitle
.
classList
.
remove
(
'
hidden
'
);
}
toggleGroups
()
{
this
.
isHidden
=
!
this
.
isHidden
;
this
.
groupTitle
.
classList
.
toggle
(
'
hidden
'
);
}
render
()
{
this
.
title
.
classList
.
remove
(
'
initializing
'
);
}
}
features/steps/explore/projects.rb
View file @
a27c0013
...
...
@@ -36,13 +36,13 @@ class Spinach::Features::ExploreProjects < Spinach::FeatureSteps
end
step
'I should see project "Community" home page'
do
page
.
within
'.breadcrumbs .
titl
e'
do
page
.
within
'.breadcrumbs .
breadcrumb-item-project-nam
e'
do
expect
(
page
).
to
have_content
'Community'
end
end
step
'I should see project "Internal" home page'
do
page
.
within
'.breadcrumbs .
titl
e'
do
page
.
within
'.breadcrumbs .
breadcrumb-item-project-nam
e'
do
expect
(
page
).
to
have_content
'Internal'
end
end
...
...
features/steps/project/redirects.rb
View file @
a27c0013
...
...
@@ -18,7 +18,7 @@ class Spinach::Features::ProjectRedirects < Spinach::FeatureSteps
step
'I should see project "Community" home page'
do
Gitlab
.
config
.
gitlab
.
should_receive
(
:host
).
and_return
(
"www.example.com"
)
page
.
within
'.breadcrumbs .
titl
e'
do
page
.
within
'.breadcrumbs .
breadcrumb-item-project-nam
e'
do
expect
(
page
).
to
have_content
'Community'
end
end
...
...
spec/features/projects/sub_group_issuables_spec.rb
View file @
a27c0013
...
...
@@ -26,7 +26,6 @@ describe 'Subgroup Issuables', :js, :nested_groups do
def
expect_to_have_full_subgroup_title
title
=
find
(
'.breadcrumbs-links'
)
expect
(
title
).
not_to
have_selector
'.initializing'
expect
(
title
).
to
have_content
'group / subgroup / project'
expect
(
title
).
to
have_content
'group subgroup project'
end
end
spec/features/projects_spec.rb
View file @
a27c0013
...
...
@@ -95,49 +95,6 @@ feature 'Project' do
end
end
describe
'project title'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
user
.
namespace
)
}
before
do
sign_in
(
user
)
project
.
add_user
(
user
,
Gitlab
::
Access
::
MASTER
)
visit
project_path
(
project
)
end
it
'clicks toggle and shows dropdown'
,
js:
true
do
find
(
'.js-projects-dropdown-toggle'
).
click
expect
(
page
).
to
have_css
(
'.dropdown-menu-projects .dropdown-content li'
,
count:
1
)
end
end
describe
'project title'
do
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
namespace:
user
.
namespace
)
}
let
(
:project2
)
{
create
(
:project
,
namespace:
user
.
namespace
,
path:
'test'
)
}
let
(
:issue
)
{
create
(
:issue
,
project:
project
)
}
context
'on issues page'
,
js:
true
do
before
do
sign_in
(
user
)
project
.
add_user
(
user
,
Gitlab
::
Access
::
MASTER
)
project2
.
add_user
(
user
,
Gitlab
::
Access
::
MASTER
)
visit
project_issue_path
(
project
,
issue
)
end
it
'clicks toggle and shows dropdown'
do
find
(
'.js-projects-dropdown-toggle'
).
click
expect
(
page
).
to
have_css
(
'.dropdown-menu-projects .dropdown-content li'
,
count:
2
)
page
.
within
'.dropdown-menu-projects'
do
click_link
project
.
name_with_namespace
end
expect
(
page
).
to
have_content
project
.
name
end
end
end
describe
'tree view (default view is set to Files)'
do
let
(
:user
)
{
create
(
:user
,
project_view:
'files'
)
}
let
(
:project
)
{
create
(
:forked_project_with_submodules
)
}
...
...
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