Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 2 additions & 10 deletions test/e2e/specs/scroll-behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,8 @@ module.exports = {
null,
'restore scroll position on back'
)

// with manual scroll restoration
// https://developers.google.com/web/updates/2015/09/history-api-scroll-restoration
.execute(function () {
window.scrollTo(0, 100)
history.scrollRestoration = 'manual'
})
.click('li:nth-child(2) a')
.waitForElementPresent('.view.foo', TIMEOUT)
Expand Down Expand Up @@ -107,19 +103,15 @@ module.exports = {
'scroll to anchor'
)

.execute(function () {
document.querySelector('li:nth-child(5) a').click()
})
.click('li:nth-child(5) a')
.assert.evaluate(
function () {
return document.getElementById('anchor2').getBoundingClientRect().top < 101
},
null,
'scroll to anchor with offset'
)
.execute(function () {
document.querySelector('li:nth-child(6) a').click()
})
.click('li:nth-child(6) a')
.assert.evaluate(
function () {
return document.getElementById('1number').getBoundingClientRect().top < 1
Expand Down