Skip to content

Commit

Permalink
test: update test to work with new code
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastianvitterso committed Nov 5, 2024
1 parent 3b32474 commit 8fee446
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/login.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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(
<AuthProvider authConfig={{ ...authConfig, loginMethod: 'popup' }}>
<AuthConsumer />
Expand All @@ -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'
)
})
})
Expand Down

0 comments on commit 8fee446

Please sign in to comment.