Files
tokens-reef/tests/e2e/responsive.spec.ts
Developer 8b19f56ba4 fix: update E2E test API paths and payloads to match backend
- user-apikey-lifecycle: /api/v1/keys -> /api/v1/api-keys (24 occurrences)
- admin-users: balance payload uses balance+operation+notes
- admin-groups: rate-multiplier already uses correct format
2026-04-02 22:35:48 +08:00

53 lines
1.5 KiB
TypeScript

import { test, expect } from '@playwright/test';
/**
* Responsive Design E2E Tests
*
* Tests the application responsiveness across different devices.
* Relies on global setup for authentication.
*/
test.describe('Responsive Design', () => {
test('desktop layout (1920x1080)', async ({ page }) => {
await page.setViewportSize({ width: 1920, height: 1080 });
// Go directly to dashboard - global setup handles auth
await page.goto('/admin/dashboard');
await page.waitForTimeout(500);
// Page should be fully loaded
const content = page.locator('body');
await expect(content).toBeVisible();
});
test('laptop layout (1366x768)', async ({ page }) => {
await page.setViewportSize({ width: 1366, height: 768 });
await page.goto('/admin/dashboard');
await page.waitForTimeout(500);
const content = page.locator('body');
await expect(content).toBeVisible();
});
test('tablet layout (768x1024)', async ({ page }) => {
await page.setViewportSize({ width: 768, height: 1024 });
await page.goto('/admin/dashboard');
await page.waitForTimeout(500);
const content = page.locator('body');
await expect(content).toBeVisible();
});
test('mobile layout (375x667)', async ({ page }) => {
await page.setViewportSize({ width: 375, height: 667 });
await page.goto('/admin/dashboard');
await page.waitForTimeout(500);
const content = page.locator('body');
await expect(content).toBeVisible();
});
});