-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into rename-ci-env-var-names
- Loading branch information
Showing
5 changed files
with
24 additions
and
28 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,11 @@ | ||
import type { Page } from '@playwright/test'; | ||
|
||
export async function getJWKS(page: Page, jwksUrl: string) { | ||
type JWKS = { keys: { kid: string }[] }; | ||
return await page.evaluate(async (jwksUrl) => { | ||
return await fetch(jwksUrl).then((r) => r.json() as Promise<JWKS>); | ||
}, jwksUrl); | ||
const OPEN_PAYMENTS_REDIRECT_URL = `https://webmonetization.org/welcome`; | ||
|
||
export async function waitForWelcomePage(page: Page) { | ||
await page.waitForURL( | ||
(url) => | ||
url.href.startsWith(OPEN_PAYMENTS_REDIRECT_URL) && | ||
url.searchParams.get('result') === 'grant_success', | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters