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
Tatuya Kamada
gitlab-ce
Commits
049ef298
Commit
049ef298
authored
Feb 07, 2017
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update param name, add test for `e.which = 2`
parent
ef99b5e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
spec/javascripts/merge_request_tabs_spec.js
spec/javascripts/merge_request_tabs_spec.js
+19
-2
No files found.
spec/javascripts/merge_request_tabs_spec.js
View file @
049ef298
...
@@ -84,9 +84,9 @@ require('vendor/jquery.scrollTo');
...
@@ -84,9 +84,9 @@ require('vendor/jquery.scrollTo');
const
tabUrl
=
$
(
commitsLink
).
attr
(
'
href
'
);
const
tabUrl
=
$
(
commitsLink
).
attr
(
'
href
'
);
spyOn
(
$
.
fn
,
'
attr
'
).
and
.
returnValue
(
tabUrl
);
spyOn
(
$
.
fn
,
'
attr
'
).
and
.
returnValue
(
tabUrl
);
spyOn
(
window
,
'
open
'
).
and
.
callFake
(
function
(
url
,
name
)
{
spyOn
(
window
,
'
open
'
).
and
.
callFake
(
function
(
url
,
target
)
{
expect
(
url
).
toEqual
(
tabUrl
);
expect
(
url
).
toEqual
(
tabUrl
);
expect
(
name
).
toEqual
(
'
_blank
'
);
expect
(
target
).
toEqual
(
'
_blank
'
);
});
});
this
.
class
.
clickTab
({
this
.
class
.
clickTab
({
...
@@ -96,6 +96,23 @@ require('vendor/jquery.scrollTo');
...
@@ -96,6 +96,23 @@ require('vendor/jquery.scrollTo');
stopImmediatePropagation
:
function
()
{}
stopImmediatePropagation
:
function
()
{}
});
});
});
});
it
(
'
opens page tab in a new browser tab with Middle-click - Mac/PC
'
,
function
()
{
const
commitsLink
=
'
.commits-tab li a
'
;
const
tabUrl
=
$
(
commitsLink
).
attr
(
'
href
'
);
spyOn
(
$
.
fn
,
'
attr
'
).
and
.
returnValue
(
tabUrl
);
spyOn
(
window
,
'
open
'
).
and
.
callFake
(
function
(
url
,
target
)
{
expect
(
url
).
toEqual
(
tabUrl
);
expect
(
target
).
toEqual
(
'
_blank
'
);
});
this
.
class
.
clickTab
({
metaKey
:
false
,
ctrlKey
:
false
,
which
:
2
,
stopImmediatePropagation
:
function
()
{}
});
});
});
});
describe
(
'
#setCurrentAction
'
,
function
()
{
describe
(
'
#setCurrentAction
'
,
function
()
{
...
...
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