Skip to content

Commit

Permalink
connect wallet button is visible
Browse files Browse the repository at this point in the history
  • Loading branch information
ferrodri committed Apr 4, 2024
1 parent 5f56159 commit 22212bc
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions tests/disconnected/homepage/desktop.spec.ts
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 }) => {
// ...
});
});

0 comments on commit 22212bc

Please sign in to comment.