Add GDPR compliant cookie banner and update footer/privacy policy to include GA and Clarity; added e2e and unit tests for cookie handling; updated snapshots
All checks were successful
ci/woodpecker/push/ci Pipeline was successful
ci/woodpecker/push/deploy Pipeline was successful

This commit is contained in:
2026-03-12 15:04:49 -03:00
parent 4ad45d5625
commit a5989b03b1
28 changed files with 607 additions and 9 deletions

View File

@@ -7,6 +7,14 @@ test.describe('visual regression', () => {
await expect(page.locator('h1')).toBeVisible();
await expect(page.locator('#main')).toBeVisible();
await expect(page.locator('.footer')).toBeVisible();
await expect(page.locator('#cookie-banner')).toBeVisible();
await page.evaluate(() => {
localStorage.setItem('mifi-ventures-cookie-consent', 'reject');
});
await page.goto('/');
await expect(page.locator('#cookie-banner')).not.toBeVisible();
await expect(page).toHaveScreenshot('home.png', { fullPage: true });
});
@@ -15,6 +23,15 @@ test.describe('visual regression', () => {
await expect(page).toHaveTitle(/SaaS Architecture Services | mifi Ventures/);
await expect(page.locator('h1')).toBeVisible();
await expect(page.locator('#main')).toBeVisible();
await expect(page.locator('.footer')).toBeVisible();
await expect(page.locator('#cookie-banner')).toBeVisible();
await page.evaluate(() => {
localStorage.setItem('mifi-ventures-cookie-consent', 'reject');
});
await page.goto('/services');
await expect(page.locator('#cookie-banner')).not.toBeVisible();
await expect(page).toHaveScreenshot('services.png', { fullPage: true });
});
@@ -23,6 +40,16 @@ test.describe('visual regression', () => {
await expect(page).toHaveTitle(/SaaS Product Architecture Consultant | mifi Ventures/);
await expect(page.locator('h1')).toBeVisible();
await expect(page.locator('#main')).toBeVisible();
await expect(page.locator('#faq')).toBeVisible();
await expect(page.locator('.footer')).toBeVisible();
await expect(page.locator('#cookie-banner')).toBeVisible();
await page.evaluate(() => {
localStorage.setItem('mifi-ventures-cookie-consent', 'reject');
});
await page.goto('/services/hands-on-saas-architecture-consultant');
await expect(page.locator('#cookie-banner')).not.toBeVisible();
await expect(page).toHaveScreenshot('services-hands-on-saas-architecture-consultant.png', { fullPage: true });
});
@@ -31,6 +58,16 @@ test.describe('visual regression', () => {
await expect(page).toHaveTitle(/MVP Architecture & Launch Consultant | mifi Ventures/);
await expect(page.locator('h1')).toBeVisible();
await expect(page.locator('#main')).toBeVisible();
await expect(page.locator('#faq')).toBeVisible();
await expect(page.locator('.footer')).toBeVisible();
await expect(page.locator('#cookie-banner')).toBeVisible();
await page.evaluate(() => {
localStorage.setItem('mifi-ventures-cookie-consent', 'reject');
});
await page.goto('/services/mvp-architecture-and-launch');
await expect(page.locator('#cookie-banner')).not.toBeVisible();
await expect(page).toHaveScreenshot('services-mvp-architecture-and-launch.png', { fullPage: true });
});
@@ -39,6 +76,16 @@ test.describe('visual regression', () => {
await expect(page).toHaveTitle(/Fractional CTO for Early-Stage SaaS | mifi Ventures/);
await expect(page.locator('h1')).toBeVisible();
await expect(page.locator('#main')).toBeVisible();
await expect(page.locator('#faq')).toBeVisible();
await expect(page.locator('.footer')).toBeVisible();
await expect(page.locator('#cookie-banner')).toBeVisible();
await page.evaluate(() => {
localStorage.setItem('mifi-ventures-cookie-consent', 'reject');
});
await page.goto('/services/fractional-cto-for-early-stage-saas');
await expect(page.locator('#cookie-banner')).not.toBeVisible();
await expect(page).toHaveScreenshot('services-fractional-cto-for-early-stage-saas.png', { fullPage: true });
});
@@ -47,6 +94,16 @@ test.describe('visual regression', () => {
await expect(page).toHaveTitle(/Startup Infrastructure Strategy | mifi Ventures/);
await expect(page.locator('h1')).toBeVisible();
await expect(page.locator('#main')).toBeVisible();
await expect(page.locator('#faq')).toBeVisible();
await expect(page.locator('.footer')).toBeVisible();
await expect(page.locator('#cookie-banner')).toBeVisible();
await page.evaluate(() => {
localStorage.setItem('mifi-ventures-cookie-consent', 'reject');
});
await page.goto('/services/stage-aligned-infrastructure');
await expect(page.locator('#cookie-banner')).not.toBeVisible();
await expect(page).toHaveScreenshot('services-stage-aligned-infrastructure.png', { fullPage: true });
});
@@ -56,6 +113,14 @@ test.describe('visual regression', () => {
await expect(page.locator('h1')).toBeVisible();
await expect(page.locator('#main')).toBeVisible();
await expect(page.locator('.footer')).toBeVisible();
await expect(page.locator('#cookie-banner')).toBeVisible();
await page.evaluate(() => {
localStorage.setItem('mifi-ventures-cookie-consent', 'reject');
});
await page.goto('/privacy-policy');
await expect(page.locator('#cookie-banner')).not.toBeVisible();
await expect(page).toHaveScreenshot('privacy-policy.png', { fullPage: true });
});
@@ -65,6 +130,14 @@ test.describe('visual regression', () => {
await expect(page.locator('h1')).toBeVisible();
await expect(page.locator('#main')).toBeVisible();
await expect(page.locator('.footer')).toBeVisible();
await expect(page.locator('#cookie-banner')).toBeVisible();
await page.evaluate(() => {
localStorage.setItem('mifi-ventures-cookie-consent', 'reject');
});
await page.goto('/terms-of-service');
await expect(page.locator('#cookie-banner')).not.toBeVisible();
await expect(page).toHaveScreenshot('terms-of-service.png', { fullPage: true });
});
});