Page Menu
Home
Software Heritage
Search
Configure Global Search
Log In
Files
F9123348
back-to-top.spec.js
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Size
864 B
Subscribers
None
back-to-top.spec.js
View Options
/**
* Copyright (C) 2019 The Software Heritage developers
* See the AUTHORS file at the top-level directory of this distribution
* License: GNU Affero General Public License version 3, or any later version
* See top-level LICENSE file for more information
*/
const
url
=
'api/'
;
describe
(
'Back-to-top button tests'
,
function
()
{
beforeEach
(
function
()
{
cy
.
visit
(
url
);
});
it
(
'should be hidden when on top'
,
function
()
{
cy
.
get
(
'#back-to-top'
).
should
(
'not.be.visible'
);
});
it
(
'should be visible when scrolled down'
,
function
()
{
cy
.
scrollTo
(
'bottom'
)
.
get
(
'#back-to-top'
)
.
should
(
'be.visible'
);
});
it
(
'should scroll to top when clicked'
,
function
()
{
cy
.
scrollTo
(
'bottom'
)
.
get
(
'#back-to-top'
)
.
click
()
.
window
()
.
then
(
win
=>
{
assert
.
equal
(
win
.
scrollY
,
0
);
});
});
});
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jun 21, 5:21 PM (1 w, 3 d ago)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3315544
Attached To
rDWAPPS Web applications
Event Timeline
Log In to Comment