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
21ea4863
Commit
21ea4863
authored
Feb 02, 2017
by
Filipa Lacerda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes broken build: Use jquery to get the element position in the page
parent
74607020
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
spec/features/merge_requests/toggler_behavior_spec.rb
spec/features/merge_requests/toggler_behavior_spec.rb
+2
-3
No files found.
spec/features/merge_requests/toggler_behavior_spec.rb
View file @
21ea4863
...
@@ -18,11 +18,10 @@ feature 'toggler_behavior', js: true, feature: true do
...
@@ -18,11 +18,10 @@ feature 'toggler_behavior', js: true, feature: true do
it
'should be scrolled down to fragment'
do
it
'should be scrolled down to fragment'
do
page_height
=
page
.
current_window
.
size
[
1
]
page_height
=
page
.
current_window
.
size
[
1
]
page_scroll_y
=
page
.
evaluate_script
(
"window.scrollY"
)
page_scroll_y
=
page
.
evaluate_script
(
"window.scrollY"
)
fragment_position_top
=
page
.
evaluate_script
(
"document.querySelector('
#{
fragment_id
}
').getBoundingClientRect().top"
)
fragment_position_top
=
page
.
evaluate_script
(
"$('
#{
fragment_id
}
').offset().top"
)
expect
(
find
(
'.js-toggle-content'
).
visible?
).
to
eq
true
expect
(
find
(
'.js-toggle-content'
).
visible?
).
to
eq
true
expect
(
find
(
fragment_id
).
visible?
).
to
eq
true
expect
(
find
(
fragment_id
).
visible?
).
to
eq
true
expect
(
fragment_position_top
).
to
be
>
page_scroll_y
expect
(
fragment_position_top
).
to
be
>
=
page_scroll_y
expect
(
fragment_position_top
).
to
be
<
(
page_scroll_y
+
page_height
)
expect
(
fragment_position_top
).
to
be
<
(
page_scroll_y
+
page_height
)
end
end
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