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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
517895da
Commit
517895da
authored
Oct 10, 2016
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't run affix tabs in test env
This was messing up other tests
parent
ef1b5988
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
1 addition
and
34 deletions
+1
-34
app/views/projects/merge_requests/_show.html.haml
app/views/projects/merge_requests/_show.html.haml
+1
-1
spec/features/merge_requests/sticky_tabs_spec.rb
spec/features/merge_requests/sticky_tabs_spec.rb
+0
-33
No files found.
app/views/projects/merge_requests/_show.html.haml
View file @
517895da
...
@@ -47,7 +47,7 @@
...
@@ -47,7 +47,7 @@
=
link_to
"command line"
,
"#modal_merge_info"
,
class:
"how_to_merge_link vlink"
,
title:
"How To Merge"
,
"data-toggle"
=>
"modal"
=
link_to
"command line"
,
"#modal_merge_info"
,
class:
"how_to_merge_link vlink"
,
title:
"How To Merge"
,
"data-toggle"
=>
"modal"
-
if
@commits_count
.
nonzero?
-
if
@commits_count
.
nonzero?
%ul
.merge-request-tabs.nav-links.no-top.no-bottom
.js-tabs-affix
%ul
.merge-request-tabs.nav-links.no-top.no-bottom
{
class:
(
"js-tabs-affix"
unless
ENV
[
'RAILS_ENV'
]
==
'test'
)
}
%li
.notes-tab
%li
.notes-tab
=
link_to
namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
data:
{
target:
'div#notes'
,
action:
'notes'
,
toggle:
'tab'
}
do
=
link_to
namespace_project_merge_request_path
(
@project
.
namespace
,
@project
,
@merge_request
),
data:
{
target:
'div#notes'
,
action:
'notes'
,
toggle:
'tab'
}
do
Discussion
Discussion
...
...
spec/features/merge_requests/sticky_tabs_spec.rb
deleted
100644 → 0
View file @
ef1b5988
require
'spec_helper'
feature
'Merge request tabs'
,
js:
true
,
feature:
true
do
include
WaitForAjax
let
(
:user
)
{
create
(
:user
)
}
let
(
:project
)
{
create
(
:project
,
:public
)
}
let
(
:merge_request
)
{
create
(
:merge_request_with_diffs
,
source_project:
project
,
author:
user
,
title:
"Bug NS-04"
)
}
before
do
project
.
team
<<
[
user
,
:master
]
login_as
user
visit
diffs_namespace_project_merge_request_path
(
project
.
namespace
,
project
,
merge_request
)
wait_for_ajax
end
it
'affixes to top of page when scrolling'
do
page
.
execute_script
"window.scroll(0,10000)"
expect
(
page
).
to
have_selector
(
'.js-tabs-affix.affix'
)
end
it
'removes affix when scrolling to top'
do
page
.
execute_script
"window.scroll(0,10000)"
expect
(
page
).
to
have_selector
(
'.js-tabs-affix.affix'
)
page
.
execute_script
"window.scroll(0,-10000)"
expect
(
page
).
to
have_selector
(
'.js-tabs-affix.affix-top'
)
end
end
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