- Set Spanish as default language with ephemeral/encrypted privacy focus - Translate all user-facing strings and legal pages to Spanish - Replace Norwegian flag with Spanish flag in footer - Remove Hemmelig/terces.cloud links, add cloudhost.es sponsorship - Rewrite PrivacyPage: zero data collection, ephemeral design emphasis - Rewrite TermsPage: Spanish law, RGPD, paste.es/CloudHost.es references - Update PWA manifest, HTML meta tags, package.json branding - Rename webhook headers to X-Paste-Event / X-Paste-Signature - Update API docs title and contact to paste.es / cloudhost.es Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
38 lines
1.3 KiB
TypeScript
38 lines
1.3 KiB
TypeScript
import { expect, test } from './fixtures';
|
|
|
|
test.describe('Home Page', () => {
|
|
test('should display the secret creation form', async ({ authenticatedPage }) => {
|
|
await authenticatedPage.goto('/');
|
|
|
|
// Check that the editor is present
|
|
await expect(authenticatedPage.locator('.ProseMirror')).toBeVisible();
|
|
|
|
// Check that the create button exists (there are two, use first())
|
|
await expect(
|
|
authenticatedPage.getByRole('button', { name: /create/i }).first()
|
|
).toBeVisible();
|
|
});
|
|
|
|
test('should have working dark/light mode toggle', async ({ authenticatedPage }) => {
|
|
await authenticatedPage.goto('/');
|
|
|
|
// Check initial theme (could be light or dark based on system preference)
|
|
const html = authenticatedPage.locator('html');
|
|
|
|
// Find and click theme toggle button
|
|
const themeToggle = authenticatedPage
|
|
.locator(
|
|
'button[aria-label*="theme"], button:has([class*="Moon"]), button:has([class*="Sun"])'
|
|
)
|
|
.first();
|
|
|
|
if (await themeToggle.isVisible()) {
|
|
const initialClass = await html.getAttribute('class');
|
|
await themeToggle.click();
|
|
|
|
// Theme should have changed
|
|
await expect(html).not.toHaveClass(initialClass || '');
|
|
}
|
|
});
|
|
});
|