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
8a4da740
Commit
8a4da740
authored
Feb 06, 2017
by
Kushal Pandya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Tests for clickTab with Mac and PC
parent
00018892
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
36 additions
and
0 deletions
+36
-0
spec/javascripts/merge_request_tabs_spec.js
spec/javascripts/merge_request_tabs_spec.js
+36
-0
No files found.
spec/javascripts/merge_request_tabs_spec.js
View file @
8a4da740
...
...
@@ -61,6 +61,42 @@ require('vendor/jquery.scrollTo');
expect
(
$
(
'
#diffs
'
)).
toHaveClass
(
'
active
'
);
});
});
describe
(
'
#opensInNewTab
'
,
function
()
{
it
(
'
opens page tab in a new browser tab with Ctrl+Click - Windows/Linux
'
,
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
,
name
)
{
expect
(
url
).
toEqual
(
tabUrl
);
expect
(
name
).
toEqual
(
'
_blank
'
);
});
this
.
class
.
clickTab
({
metaKey
:
false
,
ctrlKey
:
true
,
which
:
1
,
stopImmediatePropagation
:
function
()
{}
});
});
it
(
'
opens page tab in a new browser tab with Cmd+Click - Mac
'
,
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
,
name
)
{
expect
(
url
).
toEqual
(
tabUrl
);
expect
(
name
).
toEqual
(
'
_blank
'
);
});
this
.
class
.
clickTab
({
metaKey
:
true
,
ctrlKey
:
false
,
which
:
1
,
stopImmediatePropagation
:
function
()
{}
});
});
});
describe
(
'
#setCurrentAction
'
,
function
()
{
beforeEach
(
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