From 61851f3ed29ebb9d6e7ad151494dced369e58128 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Vitters=C3=B8?= Date: Tue, 5 Nov 2024 10:11:58 +0100 Subject: [PATCH] test: update test to work with new code --- tests/login.test.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/login.test.tsx b/tests/login.test.tsx index 15d189a..d4ef350 100644 --- a/tests/login.test.tsx +++ b/tests/login.test.tsx @@ -21,6 +21,9 @@ test('First page visit should redirect to auth provider for login', async () => }) test('First page visit should popup to auth provider for login', async () => { + // set window size to 1200x800 to make test predictable in different environments + global.innerWidth = 1200 + global.innerHeight = 800 render( @@ -33,7 +36,7 @@ test('First page visit should popup to auth provider for login', async () => { /^myAuthEndpoint\?response_type=code&client_id=myClientID&redirect_uri=http%3A%2F%2Flocalhost%2F&code_challenge=.{43}&code_challenge_method=S256&scope=someScope\+openid&state=testState/gm ), 'loginPopup', - 'popup width=600 height=600' + 'width=600,height=600,top=100,left=300' ) }) })