1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-16 11:37:36 +02:00
ferret/e2e/tests/dynamic/doc/viewport/size.fql
Tim Voronov 63201148ac
Added possibility to set custom viewport size (#334)
* Added possibility to set custom viewport size

* Fixed linting issue

* Renamed ScreenSize to Viewport

* Updated e2e test
2019-07-17 13:29:16 -04:00

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)