galaxis-po/frontend/e2e/strategy.spec.ts

66 lines
1.9 KiB
TypeScript
Raw Permalink Normal View History

import { test, expect } from "@playwright/test";
test.describe("Strategy", () => {
test.beforeEach(async ({ page }) => {
// Mock login
await page.addInitScript(() => {
localStorage.setItem("token", "test-token");
});
});
test("should show strategy list page", async ({ page }) => {
await page.goto("/strategy");
// Check page title
await expect(page.locator("h1")).toContainText("전략");
});
test("should show multi-factor strategy option", async ({ page }) => {
await page.goto("/strategy");
// Look for multi-factor strategy card or link
await expect(
page.locator('text=멀티 팩터, a[href*="multi-factor"]').first()
).toBeVisible();
});
test("should show quality strategy option", async ({ page }) => {
await page.goto("/strategy");
// Look for quality strategy card or link
await expect(
page.locator('text=퀄리티, a[href*="quality"]').first()
).toBeVisible();
});
test("should show value-momentum strategy option", async ({ page }) => {
await page.goto("/strategy");
// Look for value-momentum strategy card or link
await expect(
page.locator('text=밸류 모멘텀, a[href*="value-momentum"]').first()
).toBeVisible();
});
test("should navigate to multi-factor strategy page", async ({ page }) => {
await page.goto("/strategy/multi-factor");
// Check for form elements
await expect(page.locator("form, [role='form']").first()).toBeVisible();
});
test("should navigate to quality strategy page", async ({ page }) => {
await page.goto("/strategy/quality");
// Check for form elements
await expect(page.locator("form, [role='form']").first()).toBeVisible();
});
test("should navigate to value-momentum strategy page", async ({ page }) => {
await page.goto("/strategy/value-momentum");
// Check for form elements
await expect(page.locator("form, [role='form']").first()).toBeVisible();
});
});