Skip to content

Commit

Permalink
update test logic
Browse files Browse the repository at this point in the history
  • Loading branch information
Dhaiwat10 committed May 14, 2024
1 parent 72f0f47 commit 284d1d3
Showing 1 changed file with 14 additions and 11 deletions.
25 changes: 14 additions & 11 deletions e2e-tests/example.spec.ts
Original file line number Diff line number Diff line change
@@ -1,18 +1,21 @@
import { test, expect } from '@playwright/test';

test('has title', async ({ page }) => {
await page.goto('http://localhost:3000/');
await page.goto('http://localhost:3000/', { waitUntil: 'networkidle' });

const title = page.getByRole('heading', { name: 'Welcome to Fuel' });
expect(title).toBeVisible();
});
await page.waitForTimeout(2000);

const topUpWalletButton = page.getByText('Top-up Wallet');
await topUpWalletButton.click();

// test('get started link', async ({ page }) => {
// await page.goto('https://playwright.dev/');
await page.reload();

// // Click the get started link.
// await page.getByRole('link', { name: 'Get started' }).click();
await page.waitForTimeout(2000);

// // Expects page to have a heading with the name of Installation.
// await expect(page.getByRole('heading', { name: 'Installation' })).toBeVisible();
// });
const incrementButton = page.getByText('Increment Counter');
await incrementButton.click();

// the counter should be incremented
const counter = page.getByText('1');
await expect(counter).toBeVisible();
});

0 comments on commit 284d1d3

Please sign in to comment.