Files
OmniRoute/tests/e2e/responsiveSpecs.mjs
T
diegosouzapw 71d14209a4 feat: OmniRoute v1.0.0 — Intelligent AI Gateway & Universal LLM Proxy
OmniRoute is an intelligent API gateway that unifies 20+ AI providers behind a single
OpenAI-compatible endpoint. Features include intelligent routing with 6 strategies,
multi-format translation (OpenAI/Claude/Gemini/Responses API), circuit breakers,
semantic caching, combo fallback chains, real-time health monitoring, and a full
dashboard with provider management, analytics, and CLI tool integration.

Key highlights:
- 20+ providers (Claude Code, Codex, Gemini CLI, GitHub Copilot, iFlow, Qwen, Kiro, etc.)
- 6 routing strategies (Fill First, Round Robin, P2C, Random, Least Used, Cost Optimized)
- Export/Import database backup with full archive support
- Translator Playground with 4 modes (Playground, Chat Tester, Test Bench, Live Monitor)
- 100% TypeScript across src/ and open-sse/
- Docker support with multi-stage builds
- Comprehensive documentation and 9 dashboard screenshots
2026-02-18 00:02:15 -03:00

70 lines
2.0 KiB
JavaScript
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/**
* Responsive Test Specs — T-39
*
* Test specifications for Playwright responsive testing.
* These define the viewports and pages to test.
*
* Usage with Playwright:
* import { VIEWPORTS, PAGES, generateTestMatrix } from "./responsiveSpecs";
*
* @module tests/e2e/responsiveSpecs
*/
/**
* Viewport definitions for responsive testing.
*/
export const VIEWPORTS = {
mobile: { width: 375, height: 812, label: "Mobile (375px)" },
tablet: { width: 768, height: 1024, label: "Tablet (768px)" },
desktop: { width: 1280, height: 800, label: "Desktop (1280px)" },
};
/**
* Pages to test with responsive viewports.
*/
export const PAGES = [
{ path: "/login", name: "Login", requiresAuth: false },
{ path: "/dashboard", name: "Dashboard", requiresAuth: true },
{ path: "/dashboard/providers", name: "Providers", requiresAuth: true },
{ path: "/dashboard/settings", name: "Settings", requiresAuth: true },
];
/**
* Accessibility checks to perform on each page.
*/
export const A11Y_CHECKS = [
{ id: "overflow-x", check: "document.body.scrollWidth <= document.body.clientWidth", description: "No horizontal overflow" },
{ id: "touch-targets", check: "min 44px touch targets on mobile", description: "Touch targets ≥ 44px" },
{ id: "font-size", check: "min 16px base font on mobile", description: "Base font ≥ 16px" },
{ id: "viewport-meta", check: "has viewport meta tag", description: "Viewport meta present" },
];
/**
* Generate test matrix (viewport × page combinations).
*
* @returns {Array<{ viewport: typeof VIEWPORTS.mobile, page: typeof PAGES[0], testName: string }>}
*/
export function generateTestMatrix() {
const matrix = [];
for (const [vpKey, viewport] of Object.entries(VIEWPORTS)) {
for (const page of PAGES) {
matrix.push({
viewport,
page,
testName: `${page.name} @ ${viewport.label}`,
});
}
}
return matrix;
}
/**
* Get viewport names.
* @returns {string[]}
*/
export function getViewportNames() {
return Object.keys(VIEWPORTS);
}