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
4d3011f3
Commit
4d3011f3
authored
Feb 02, 2017
by
Fatih Acet
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'fix-broken-buil-9724713' into 'master'
Fixes broken build: Use jquery to get the element position in the page See merge request !8926
parents
ef0f1336
21ea4863
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
3 deletions
+2
-3
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 @
4d3011f3
...
@@ -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