feat: rebrand Hemmelig to paste.es for cloudhost.es
- 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>
This commit is contained in:
36
tests/e2e/fixtures.ts
Normal file
36
tests/e2e/fixtures.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import { test as base, expect, Page } from '@playwright/test';
|
||||
import { TEST_USER } from './global-setup';
|
||||
|
||||
async function loginUser(page: Page, email: string, password: string): Promise<boolean> {
|
||||
await page.goto('/login');
|
||||
|
||||
// Fill login form
|
||||
await page.getByPlaceholder(/username/i).fill(email);
|
||||
await page.getByPlaceholder(/password/i).fill(password);
|
||||
await page.getByRole('button', { name: /sign in/i }).click();
|
||||
|
||||
// Wait for navigation - could be home, dashboard, or 2FA
|
||||
try {
|
||||
await page.waitForURL(/^\/$|\/dashboard|\/verify-2fa/, { timeout: 10000 });
|
||||
return true;
|
||||
} catch {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
// Extend the base test with auth fixture
|
||||
export const test = base.extend<{ authenticatedPage: Page }>({
|
||||
authenticatedPage: async ({ page }, use) => {
|
||||
// Check if authentication is required
|
||||
await page.goto('/');
|
||||
|
||||
if (page.url().includes('/login')) {
|
||||
// Login with test user (created in global setup)
|
||||
await loginUser(page, TEST_USER.email, TEST_USER.password);
|
||||
}
|
||||
|
||||
await use(page);
|
||||
},
|
||||
});
|
||||
|
||||
export { expect, TEST_USER };
|
||||
Reference in New Issue
Block a user