From 2046adcc49e89fee28832d978c4cb46731cb8c5a Mon Sep 17 00:00:00 2001 From: Jonas Jenwald Date: Wed, 23 Oct 2019 20:30:25 +0200 Subject: [PATCH] Change the 'gets viewport respecting "dontFlip" argument' unit-test to use a valid rotation angle As can be seen in `PageViewport` only multiples of 90 degrees are really supported by the code, hence the unit-test doesn't really make sense. (Possibly this should be enforced in the API, to avoid surprises, but given that this problem has always existed I'm passing on that for now.) --- test/unit/api_spec.js | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/test/unit/api_spec.js b/test/unit/api_spec.js index c42e943ad..6548c8706 100644 --- a/test/unit/api_spec.js +++ b/test/unit/api_spec.js @@ -1101,8 +1101,7 @@ describe('api', function() { expect(viewport.height).toEqual(892.92); }); it('gets viewport respecting "dontFlip" argument', function () { - const scale = 1; - const rotation = 135; + const scale = 1, rotation = 0; let viewport = page.getViewport({ scale, rotation, }); let dontFlipViewport = page.getViewport({ scale, rotation, dontFlip: true, });