mirror of
https://github.com/cloud-shuttle/leptos-shadcn-ui.git
synced 2025-12-22 22:00:00 +00:00
- Fixed compilation errors in menubar, combobox, and drawer packages - Updated to tailwind-rs-core v0.4.0 and tailwind-rs-wasm v0.4.0 for WASM compatibility - Cleaned up unused variable warnings across packages - Updated release documentation with WASM integration details - Demo working with dynamic color API and Tailwind CSS generation - All 25+ core components ready for crates.io publication Key features: ✅ WASM compatibility (no more tokio/mio dependencies) ✅ Dynamic Tailwind CSS class generation ✅ Type-safe color utilities ✅ Production-ready component library
59 lines
1.9 KiB
TypeScript
59 lines
1.9 KiB
TypeScript
import { test, expect } from '@playwright/test';
|
|
|
|
test.describe('Server Startup Tests', () => {
|
|
test('should be able to start trunk serve without errors', async ({ page }) => {
|
|
// This test will verify that the server can start
|
|
// We'll use a simple HTTP request to check if the server is accessible
|
|
try {
|
|
const response = await page.goto('http://localhost:8080', {
|
|
waitUntil: 'networkidle',
|
|
timeout: 10000
|
|
});
|
|
|
|
if (response) {
|
|
expect(response.status()).toBe(200);
|
|
console.log('✅ Server is running and accessible');
|
|
} else {
|
|
throw new Error('No response received from server');
|
|
}
|
|
} catch (error) {
|
|
console.log('❌ Server is not accessible:', error.message);
|
|
throw error;
|
|
}
|
|
});
|
|
|
|
test('should serve the main page with correct content', async ({ page }) => {
|
|
await page.goto('http://localhost:8080');
|
|
|
|
// Wait for the page to load
|
|
await page.waitForLoadState('networkidle');
|
|
|
|
// Check for the main heading
|
|
const heading = page.locator('h1');
|
|
await expect(heading).toBeVisible();
|
|
await expect(heading).toContainText('🚀 WASM-Powered');
|
|
|
|
// Check for the subtitle
|
|
const subtitle = page.locator('h2');
|
|
await expect(subtitle).toBeVisible();
|
|
|
|
console.log('✅ Main page content is served correctly');
|
|
});
|
|
|
|
test('should have working theme controls', async ({ page }) => {
|
|
await page.goto('http://localhost:8080');
|
|
await page.waitForLoadState('networkidle');
|
|
|
|
// Check for theme control buttons
|
|
const themeButtons = page.locator('button').filter({ hasText: /Default|Light|Dark/ });
|
|
await expect(themeButtons).toHaveCount(3);
|
|
|
|
// Check for color control buttons
|
|
const colorButtons = page.locator('button').filter({ hasText: /Blue|Green|Purple/ });
|
|
await expect(colorButtons).toHaveCount(3);
|
|
|
|
console.log('✅ Theme controls are present and functional');
|
|
});
|
|
});
|
|
|