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
ca4a6e98
Commit
ca4a6e98
authored
Sep 02, 2017
by
kushalpandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove spec as no longer necessary
parent
24bada31
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
0 additions
and
103 deletions
+0
-103
spec/features/projects_spec.rb
spec/features/projects_spec.rb
+0
-43
spec/javascripts/project_title_spec.js
spec/javascripts/project_title_spec.js
+0
-60
No files found.
spec/features/projects_spec.rb
View file @
ca4a6e98
...
@@ -95,49 +95,6 @@ feature 'Project' do
...
@@ -95,49 +95,6 @@ feature 'Project' do
end
end
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
describe
'tree view (default view is set to Files)'
do
let
(
:user
)
{
create
(
:user
,
project_view:
'files'
)
}
let
(
:user
)
{
create
(
:user
,
project_view:
'files'
)
}
let
(
:project
)
{
create
(
:forked_project_with_submodules
)
}
let
(
:project
)
{
create
(
:forked_project_with_submodules
)
}
...
...
spec/javascripts/project_title_spec.js
deleted
100644 → 0
View file @
24bada31
/* global Project */
import
'
select2/select2
'
;
import
'
~/gl_dropdown
'
;
import
'
~/api
'
;
import
'
~/project_select
'
;
import
'
~/project
'
;
describe
(
'
Project Title
'
,
()
=>
{
const
dummyApiVersion
=
'
v3000
'
;
preloadFixtures
(
'
issues/open-issue.html.raw
'
);
loadJSONFixtures
(
'
projects.json
'
);
beforeEach
(()
=>
{
loadFixtures
(
'
issues/open-issue.html.raw
'
);
window
.
gon
=
{};
window
.
gon
.
api_version
=
dummyApiVersion
;
// eslint-disable-next-line no-new
new
Project
();
});
describe
(
'
project list
'
,
()
=>
{
let
reqUrl
;
let
reqData
;
beforeEach
(()
=>
{
const
fakeResponseData
=
getJSONFixture
(
'
projects.json
'
);
spyOn
(
jQuery
,
'
ajax
'
).
and
.
callFake
((
req
)
=>
{
const
def
=
$
.
Deferred
();
reqUrl
=
req
.
url
;
reqData
=
req
.
data
;
def
.
resolve
(
fakeResponseData
);
return
def
.
promise
();
});
});
it
(
'
toggles dropdown
'
,
()
=>
{
const
$menu
=
$
(
'
.js-dropdown-menu-projects
'
);
window
.
gon
.
current_user_id
=
1
;
$
(
'
.js-projects-dropdown-toggle
'
).
click
();
expect
(
$menu
).
toHaveClass
(
'
open
'
);
expect
(
reqUrl
).
toBe
(
`/api/
${
dummyApiVersion
}
/projects.json`
);
expect
(
reqData
).
toEqual
({
search
:
''
,
order_by
:
'
last_activity_at
'
,
per_page
:
20
,
membership
:
true
,
simple
:
true
,
});
$menu
.
find
(
'
.dropdown-menu-close-icon
'
).
click
();
expect
(
$menu
).
not
.
toHaveClass
(
'
open
'
);
});
});
afterEach
(()
=>
{
window
.
gon
=
{};
});
});
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