Skip to content

Commit

Permalink
wait for css selector to be visible instead of wait 1000ms
Browse files Browse the repository at this point in the history
  • Loading branch information
robwafle committed Aug 20, 2024
1 parent 0c3f9cb commit 3e4ff34
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion create-leo-app/template-react-leo/playwright.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { defineConfig } from '@playwright/test'
export default defineConfig({
testDir: './tests',
reporter: 'html',
timeout: 5000,
timeout: 15000,

use: {
baseURL: 'http://localhost:5173'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ test('generate account', async ({ page }) => {
await page.goto('/');

// looks like we need to wait a little for react to setup
await page.waitForTimeout(1000);
await page.waitForSelector('.read-the-docs', { state: 'visible' });

const accountButton = page.getByRole('button', { name: 'Click to generate account' });
await accountButton.click();
Expand All @@ -32,7 +32,7 @@ test('local program execution', async ({ page }) => {
await page.goto('/');

// looks like we need to wait a little for react to setup
await page.waitForTimeout(1000);
await page.waitForSelector('.read-the-docs', { state: 'visible' });

const executeButton = page.getByRole('button', { name: 'Execute helloworld.aleo' });
await executeButton.click();
Expand Down

0 comments on commit 3e4ff34

Please sign in to comment.