BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
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
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
2 deletions
+19
-2
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');
const
tabUrl
=
$
(
commitsLink
).
attr
(
'href'
);
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
(
name
).
toEqual
(
'_blank'
);
expect
(
target
).
toEqual
(
'_blank'
);
});
this
.
class
.
clickTab
({
...
...
@@ -96,6 +96,23 @@ require('vendor/jquery.scrollTo');
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
()
{
...
...
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