Compare commits
5 Commits
fix/mobile
...
fix/qa-chr
| Author | SHA1 | Date | |
|---|---|---|---|
| 6214678433 | |||
| 6e2a959972 | |||
| a20ba52f7f | |||
| 292557eca5 | |||
| 6c14ceec3e |
@@ -1 +0,0 @@
|
|||||||
{"timestamp":"2026-06-09T17:18:52.824Z","name":"John Doe","email":"john@example.com","productName":null,"message":"Hello, this is a test message."}\n{"timestamp":"2026-06-09T17:18:52.855Z","name":"Tester","email":"testing@mintel.me","productName":null,"message":"Test"}\n{"timestamp":"2026-06-09T17:20:50.586Z","name":"John Doe","email":"john@example.com","productName":null,"message":"Hello, this is a test message."}\n{"timestamp":"2026-06-09T17:20:50.613Z","name":"Tester","email":"testing@mintel.me","productName":null,"message":"Test"}\n
|
|
||||||
3
.gitignore
vendored
3
.gitignore
vendored
@@ -25,3 +25,6 @@ html-errors*.json
|
|||||||
reference/
|
reference/
|
||||||
# Database backups
|
# Database backups
|
||||||
backups/
|
backups/
|
||||||
|
|
||||||
|
# Local data / backups
|
||||||
|
.data/
|
||||||
|
|||||||
@@ -316,7 +316,7 @@ const parseSvgPaths = (filePath: string) => {
|
|||||||
|
|
||||||
const VectorLogo = ({ paths, style }: { paths: { d: string; fill: string }[]; style: any }) => (
|
const VectorLogo = ({ paths, style }: { paths: { d: string; fill: string }[]; style: any }) => (
|
||||||
<Svg viewBox="0 0 295 99" style={style}>
|
<Svg viewBox="0 0 295 99" style={style}>
|
||||||
<G>
|
<G {...({ fillRule: 'evenodd', clipRule: 'evenodd' } as any)}>
|
||||||
{paths.map((p, i) => (
|
{paths.map((p, i) => (
|
||||||
<Path key={i} d={p.d} fill={p.fill} />
|
<Path key={i} d={p.d} fill={p.fill} />
|
||||||
))}
|
))}
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
"pages": {
|
"pages": {
|
||||||
"impressum": "impressum",
|
"impressum": "impressum",
|
||||||
"datenschutz": "datenschutz",
|
"datenschutz": "datenschutz",
|
||||||
"agbs": "terms",
|
"agbs": "agbs",
|
||||||
"kontakt": "contact",
|
"kontakt": "kontakt",
|
||||||
"team": "team",
|
"team": "team",
|
||||||
"blog": "blog",
|
"blog": "blog",
|
||||||
"produkte": "products",
|
"produkte": "produkte",
|
||||||
"start": "start",
|
"start": "start",
|
||||||
"danke": "thanks",
|
"danke": "thanks",
|
||||||
"niederspannungskabel": "low-voltage-cables",
|
"niederspannungskabel": "low-voltage-cables",
|
||||||
|
|||||||
@@ -3,11 +3,11 @@
|
|||||||
"pages": {
|
"pages": {
|
||||||
"legal-notice": "impressum",
|
"legal-notice": "impressum",
|
||||||
"privacy-policy": "datenschutz",
|
"privacy-policy": "datenschutz",
|
||||||
"terms": "terms",
|
"terms": "agbs",
|
||||||
"contact": "contact",
|
"contact": "kontakt",
|
||||||
"team": "team",
|
"team": "team",
|
||||||
"blog": "blog",
|
"blog": "blog",
|
||||||
"products": "products",
|
"products": "produkte",
|
||||||
"start": "start",
|
"start": "start",
|
||||||
"thanks": "thanks",
|
"thanks": "thanks",
|
||||||
"low-voltage-cables": "low-voltage-cables",
|
"low-voltage-cables": "low-voltage-cables",
|
||||||
|
|||||||
@@ -33,8 +33,14 @@ describe('Contact Form E2E', () => {
|
|||||||
it('should submit the contact form and show success message', async ({ skip }) => {
|
it('should submit the contact form and show success message', async ({ skip }) => {
|
||||||
if (!isServerUp) skip();
|
if (!isServerUp) skip();
|
||||||
|
|
||||||
|
page.on('console', (msg) => console.log('PAGE LOG:', msg.text()));
|
||||||
|
page.on('pageerror', (err) => console.error('PAGE ERROR:', err.message));
|
||||||
|
|
||||||
await page.goto(`${BASE_URL}/de/kontakt`);
|
await page.goto(`${BASE_URL}/de/kontakt`);
|
||||||
|
|
||||||
|
// Wait for Next.js hydration to complete
|
||||||
|
await new Promise((resolve) => setTimeout(resolve, 3000));
|
||||||
|
|
||||||
// Fill the form
|
// Fill the form
|
||||||
await page.waitForSelector('input[name="name"]');
|
await page.waitForSelector('input[name="name"]');
|
||||||
await page.type('input[name="name"]', 'E2E Tester');
|
await page.type('input[name="name"]', 'E2E Tester');
|
||||||
@@ -45,7 +51,7 @@ describe('Contact Form E2E', () => {
|
|||||||
await page.click('button[type="submit"]');
|
await page.click('button[type="submit"]');
|
||||||
|
|
||||||
// Wait for success message (localized or generic)
|
// Wait for success message (localized or generic)
|
||||||
await page.waitForSelector('[role="alert"]', { timeout: 10000 });
|
await page.waitForSelector('[role="alert"]', { timeout: 15000 });
|
||||||
|
|
||||||
const text = await page.evaluate(() => document.body.innerText);
|
const text = await page.evaluate(() => document.body.innerText);
|
||||||
expect(text).toMatch(/Gesendet|Sent|Erfolgreich|Success/i);
|
expect(text).toMatch(/Gesendet|Sent|Erfolgreich|Success/i);
|
||||||
|
|||||||
@@ -93,11 +93,12 @@ describe('OG Image Generation', () => {
|
|||||||
|
|
||||||
const url = `${BASE_URL}/de/blog/${slug}/opengraph-image`;
|
const url = `${BASE_URL}/de/blog/${slug}/opengraph-image`;
|
||||||
const response = await fetch(url);
|
const response = await fetch(url);
|
||||||
|
const responseClone = response.clone();
|
||||||
await verifyImageResponse(response);
|
await verifyImageResponse(response);
|
||||||
|
|
||||||
// Verify the image is substantially large (>50KB) to confirm it actually
|
// Verify the image is substantially large (>50KB) to confirm it actually
|
||||||
// contains the featured photo and isn't just a tiny fallback/text-only image
|
// contains the featured photo and isn't just a tiny fallback/text-only image
|
||||||
const buffer = await response.clone().arrayBuffer();
|
const buffer = await responseClone.arrayBuffer();
|
||||||
expect(
|
expect(
|
||||||
buffer.byteLength,
|
buffer.byteLength,
|
||||||
`OG image for "${slug}" is suspiciously small (${buffer.byteLength} bytes) — likely missing featured photo`,
|
`OG image for "${slug}" is suspiciously small (${buffer.byteLength} bytes) — likely missing featured photo`,
|
||||||
|
|||||||
@@ -21,6 +21,30 @@ describe('getPageBySlug translation routing', () => {
|
|||||||
expect(page?.frontmatter.title).toBe('Datenschutzerklärung');
|
expect(page?.frontmatter.title).toBe('Datenschutzerklärung');
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('should resolve translated slug "kontakt" for German', async () => {
|
||||||
|
const page = await getPageBySlug('kontakt', 'de');
|
||||||
|
expect(page).not.toBeNull();
|
||||||
|
expect(page?.frontmatter.title).toBe('Kontakt');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should resolve translated slug "contact" for English', async () => {
|
||||||
|
const page = await getPageBySlug('contact', 'en');
|
||||||
|
expect(page).not.toBeNull();
|
||||||
|
expect(page?.frontmatter.title).toBe('Kontakt');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should resolve translated slug "produkte" for German', async () => {
|
||||||
|
const page = await getPageBySlug('produkte', 'de');
|
||||||
|
expect(page).not.toBeNull();
|
||||||
|
expect(page?.frontmatter.title).toBe('Produkte');
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should resolve translated slug "products" for English', async () => {
|
||||||
|
const page = await getPageBySlug('products', 'en');
|
||||||
|
expect(page).not.toBeNull();
|
||||||
|
expect(page?.frontmatter.title).toBe('Produkte');
|
||||||
|
});
|
||||||
|
|
||||||
it('should return null for non-existent slugs', async () => {
|
it('should return null for non-existent slugs', async () => {
|
||||||
const page = await getPageBySlug('does-not-exist', 'de');
|
const page = await getPageBySlug('does-not-exist', 'de');
|
||||||
expect(page).toBeNull();
|
expect(page).toBeNull();
|
||||||
|
|||||||
Reference in New Issue
Block a user