mirror of
https://github.com/MontFerret/ferret.git
synced 2024-12-16 11:37:36 +02:00
63201148ac
* Added possibility to set custom viewport size * Fixed linting issue * Renamed ScreenSize to Viewport * Updated e2e test
16 lines
380 B
Plaintext
16 lines
380 B
Plaintext
LET url = @dynamic + "?redirect=/media"
|
|
LET expectedW = 1920
|
|
LET expectedH = 1080
|
|
|
|
LET doc = DOCUMENT(url, {
|
|
driver: 'cdp',
|
|
viewport: {
|
|
width: expectedW,
|
|
height: expectedH
|
|
}
|
|
})
|
|
|
|
LET actualW = TO_INT(INNER_TEXT(doc, '#screen-width'))
|
|
LET actualH = TO_INT(INNER_TEXT(doc, '#screen-height'))
|
|
|
|
RETURN EXPECT(expectedW, actualW) + EXPECT(expectedH, actualH) |