Add Playwright configuration and initial tests for landing page
Copilot Setup Steps / copilot-setup-steps (push) Failing after 17s
Copilot Setup Steps / copilot-setup-steps (push) Failing after 17s
- Created playwright.config.ts for test configuration - Added .last-run.json to store test run status - Implemented landing.test.ts with tests for navbar visibility and navigation - Removed unused server proxy configuration from vite.config.ts
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { test, expect } from "@playwright/test";
|
||||
|
||||
test("landing page shows navbar and account info", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
|
||||
// Check navbar is visible
|
||||
await expect(page.locator("nav >> text=AITrader")).toBeVisible();
|
||||
await expect(page.locator("text=Stocks")).toBeVisible();
|
||||
|
||||
// Check account info is displayed
|
||||
await expect(page.locator("text=Trading Account")).toBeVisible();
|
||||
await expect(page.locator("text=Cash")).toBeVisible();
|
||||
await expect(page.locator("text=Buying Power")).toBeVisible();
|
||||
await expect(page.locator("text=Portfolio Value")).toBeVisible();
|
||||
});
|
||||
|
||||
test("navigation to stocks works", async ({ page }) => {
|
||||
await page.goto("/");
|
||||
await page.click("text=Stocks");
|
||||
await expect(page).toHaveURL("/stocks");
|
||||
});
|
||||
Reference in New Issue
Block a user