Skip to content

Commit

Permalink
fix failing test with rebased changes
Browse files Browse the repository at this point in the history
  • Loading branch information
zaidarain1 committed Jul 22, 2024
1 parent be04c88 commit df3ddbf
Showing 1 changed file with 30 additions and 18 deletions.
48 changes: 30 additions & 18 deletions examples/passport/wallets-with-nextjs/tests/base.spec.ts
Original file line number Diff line number Diff line change
@@ -1,24 +1,36 @@
import { test, expect } from '@playwright/test';
import { test, expect } from "@playwright/test";

test.beforeEach(async ({ page }) => {
await page.goto('/');
})
await page.goto("/");
});

test.describe('home page', () => {
test('has title, heading and link', async ({ page }) => {
await expect(page).toHaveTitle('Immutable Passport Example');
test.describe("home page", () => {
test("has title, heading and link", async ({ page }) => {
await expect(page).toHaveTitle("Immutable Passport Example");

await expect(page.getByRole('heading', { name: 'Passport Wallet Examples' })).toBeVisible();
await expect(page.getByRole('link', { name: 'Connect Wallet with EtherJS' })).toBeVisible();
})
})
await expect(
page.getByRole("heading", { name: "Passport Wallet Examples" })
).toBeVisible();
await expect(
page.getByRole("link", { name: "Connect Wallet with EtherJS" })
).toBeVisible();
});
});

test.describe('connect wallet with etherjs', () => {
test('has heading, login button and initial account status set correctly', async ({ page }) => {
await page.click('text=Connect Wallet with EtherJS');
test.describe("connect wallet with etherjs", () => {
test("has heading, login button and initial account status set correctly", async ({
page,
}) => {
await page.click("text=Connect Wallet with EtherJS");

await expect(page.getByRole('heading', { name: 'Passport Wallet - Connect Wallet with EtherJS' })).toBeVisible();
await expect(page.getByRole('button', { name: 'Login' })).toBeVisible();
await expect(page.getByText('Connected Account: (not connected)')).toBeVisible();
})
})
await expect(
page.getByRole("heading", {
name: "Passport Wallet - Connect with EtherJS",
})
).toBeVisible();
await expect(page.getByRole("button", { name: "Login" })).toBeVisible();
await expect(
page.getByText("Connected Account: (not connected)")
).toBeVisible();
});
});

0 comments on commit df3ddbf

Please sign in to comment.