-
Notifications
You must be signed in to change notification settings - Fork 18
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
33 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import { test, expect } from "@playwright/test"; | ||
|
||
const BASE_URL = | ||
process.env.PLAYWRIGHT_TEST_BASE_URL || "http://localhost:3000"; | ||
const validTenants = ["optimism", "ens", "etherfi", "lyra"]; | ||
const tenant: string = process.env.NEXT_PUBLIC_AGORA_INSTANCE_NAME || ""; | ||
|
||
if (!validTenants.includes(tenant)) { | ||
throw new Error( | ||
`NEXT_PUBLIC_AGORA_INSTANCE_NAME must be one of ${validTenants.join( | ||
", " | ||
)}, but got '${tenant}'` | ||
); | ||
} | ||
|
||
test.describe('homepage desktop', () => { | ||
test('connect wallet button', async ({ page }) => { | ||
await page.goto(BASE_URL); | ||
await page.getByText('Connect Wallet').click(); | ||
await page.getByRole('button', { name: 'MetaMask' }).click(); | ||
await page.getByLabel('Close').click(); | ||
await page.getByText('Connect Wallet').click(); | ||
await page.getByRole('button', { name: 'Coinbase Wallet' }).click(); | ||
await page.getByLabel('Close').click(); | ||
await page.getByText('Connect Wallet').click(); | ||
await page.getByRole('button', { name: 'Other Wallets' }).click(); | ||
await page.getByLabel('Close').click(); | ||
}); | ||
|
||
test('two', async ({ page }) => { | ||
// ... | ||
}); | ||
}); |