generated from Jagoda11/react-template
-
Notifications
You must be signed in to change notification settings - Fork 0
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
6 changed files
with
40 additions
and
20 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,18 @@ | ||
import { test, expect } from '@playwright/test' | ||
|
||
test.describe('GitHub Insights Dashboard', () => { | ||
test('should display the dashboard title', async ({ page }) => { | ||
await page.goto('/') | ||
const title = await page.title() | ||
expect(title).toBe('GitHub Insights Dashboard') | ||
}) | ||
|
||
test('should navigate to the Commit List page', async ({ page }) => { | ||
await page.goto('/') | ||
const commitListLink = page.getByRole('link', { name: 'Commit List' }) | ||
await commitListLink.click() | ||
await expect(page).toHaveURL('/commits') // Adjust based on your routing | ||
const heading = await page.getByRole('heading', { name: 'Commit List' }) // Replace with actual heading | ||
await expect(heading).toBeVisible() | ||
}) | ||
}) |
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
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
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,18 @@ | ||
import { defineConfig } from '@playwright/test' | ||
import { fileURLToPath } from 'url' | ||
import { resolve, dirname } from 'path' | ||
|
||
const __filename = fileURLToPath(import.meta.url) | ||
const __dirname = dirname(__filename) | ||
|
||
export default defineConfig({ | ||
testDir: './e2e-tests', // Adjusted to point to the root's e2e-tests folder | ||
timeout: 30000, // Timeout for each test | ||
retries: 2, // Retry failed tests | ||
use: { | ||
headless: true, // Run tests in headless mode | ||
baseURL: `file://${resolve(__dirname, './dist/github-insights-dashboard/index.html')}`, // Path to your built app | ||
viewport: { width: 1280, height: 720 }, | ||
ignoreHTTPSErrors: true, | ||
}, | ||
}) |
This file was deleted.
Oops, something went wrong.
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