|
| 1 | +import { test, expect } from "@playwright/test"; |
| 2 | + |
| 3 | +test.describe("Simple Application Tests", () => { |
| 4 | + test("should load without errors", async ({ page }) => { |
| 5 | + await page.goto("/"); |
| 6 | + |
| 7 | + // Just check that the page loads without throwing errors |
| 8 | + await page.waitForLoadState("networkidle"); |
| 9 | + |
| 10 | + // Verify we're on the right page by checking URL |
| 11 | + expect(page.url()).toContain("/"); |
| 12 | + }); |
| 13 | + |
| 14 | + test("should have correct title", async ({ page }) => { |
| 15 | + await page.goto("/"); |
| 16 | + |
| 17 | + // Check page title contains expected text |
| 18 | + await expect(page).toHaveTitle(/Sentry MCP/); |
| 19 | + }); |
| 20 | + |
| 21 | + test("should have basic HTML structure", async ({ page }) => { |
| 22 | + await page.goto("/"); |
| 23 | + |
| 24 | + // Check basic HTML elements exist (using first() to avoid duplicates) |
| 25 | + await expect(page.locator("html")).toBeVisible(); |
| 26 | + await expect(page.locator("body")).toBeVisible(); |
| 27 | + await expect(page.locator("#root")).toBeVisible(); |
| 28 | + }); |
| 29 | + |
| 30 | + test("should be responsive", async ({ page }) => { |
| 31 | + // Test mobile size |
| 32 | + await page.setViewportSize({ width: 375, height: 667 }); |
| 33 | + await page.goto("/"); |
| 34 | + await page.waitForLoadState("networkidle"); |
| 35 | + |
| 36 | + // Just verify page loads on mobile |
| 37 | + await expect(page.locator("body")).toBeVisible(); |
| 38 | + |
| 39 | + // Test desktop size |
| 40 | + await page.setViewportSize({ width: 1280, height: 720 }); |
| 41 | + await page.reload(); |
| 42 | + await page.waitForLoadState("networkidle"); |
| 43 | + |
| 44 | + // Just verify page loads on desktop |
| 45 | + await expect(page.locator("body")).toBeVisible(); |
| 46 | + }); |
| 47 | + |
| 48 | + test("should have proper meta tags", async ({ page }) => { |
| 49 | + await page.goto("/"); |
| 50 | + |
| 51 | + // Check viewport meta tag exists |
| 52 | + const viewport = page.locator('meta[name="viewport"]'); |
| 53 | + await expect(viewport).toHaveCount(1); |
| 54 | + |
| 55 | + // Check charset meta tag exists |
| 56 | + const charset = page.locator("meta[charset]"); |
| 57 | + await expect(charset).toHaveCount(1); |
| 58 | + }); |
| 59 | +}); |
0 commit comments