Compare commits

...

2 Commits

Author SHA1 Message Date
9c7324ee92 fix(blog): restore image optimization but force quality 100 for fidelity
All checks were successful
Build & Deploy / 🔍 Prepare (push) Successful in 7s
Build & Deploy / 🧪 QA (push) Successful in 3m0s
Build & Deploy / 🏗️ Build (push) Successful in 5m53s
Build & Deploy / 🚀 Deploy (push) Successful in 19s
Build & Deploy / 🧪 Post-Deploy Verification (push) Successful in 6m47s
Build & Deploy / 🔔 Notify (push) Successful in 2s
chore(release): bump version to 2.2.8
2026-03-01 16:13:05 +01:00
0c8d9ea669 fix(e2e): await hydration before form submits, skip cleanup on 403
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 6s
Build & Deploy / 🧪 QA (push) Successful in 2m27s
Build & Deploy / 🏗️ Build (push) Successful in 4m49s
Build & Deploy / 🚀 Deploy (push) Successful in 14s
Build & Deploy / 🔔 Notify (push) Has been cancelled
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been cancelled
fix(blog): bypass image optimization for post feature image

chore(release): bump version to 2.2.7
2026-03-01 16:03:23 +01:00
3 changed files with 37 additions and 19 deletions

View File

@@ -98,6 +98,7 @@ export default async function BlogPost({ params }: BlogPostProps) {
alt={post.frontmatter.title} alt={post.frontmatter.title}
fill fill
priority priority
quality={100}
className="object-cover" className="object-cover"
sizes="100vw" sizes="100vw"
style={{ style={{
@@ -133,13 +134,13 @@ export default async function BlogPost({ params }: BlogPostProps) {
<span>{getReadingTime(rawTextContent)} min read</span> <span>{getReadingTime(rawTextContent)} min read</span>
{(new Date(post.frontmatter.date) > new Date() || {(new Date(post.frontmatter.date) > new Date() ||
post.frontmatter.public === false) && ( post.frontmatter.public === false) && (
<> <>
<span className="w-1 h-1 bg-white/30 rounded-full" /> <span className="w-1 h-1 bg-white/30 rounded-full" />
<span className="px-2 py-0.5 border border-white/40 text-white/80 rounded uppercase tracking-widest text-[10px] md:text-xs font-bold"> <span className="px-2 py-0.5 border border-white/40 text-white/80 rounded uppercase tracking-widest text-[10px] md:text-xs font-bold">
Draft Preview Draft Preview
</span> </span>
</> </>
)} )}
</div> </div>
</div> </div>
</div> </div>
@@ -170,13 +171,13 @@ export default async function BlogPost({ params }: BlogPostProps) {
<span>{getReadingTime(rawTextContent)} min read</span> <span>{getReadingTime(rawTextContent)} min read</span>
{(new Date(post.frontmatter.date) > new Date() || {(new Date(post.frontmatter.date) > new Date() ||
post.frontmatter.public === false) && ( post.frontmatter.public === false) && (
<> <>
<span className="w-1 h-1 bg-neutral-300 rounded-full" /> <span className="w-1 h-1 bg-neutral-300 rounded-full" />
<span className="px-2 py-0.5 border border-orange-500/50 text-orange-600 rounded uppercase tracking-widest text-[10px] md:text-xs font-bold"> <span className="px-2 py-0.5 border border-orange-500/50 text-orange-600 rounded uppercase tracking-widest text-[10px] md:text-xs font-bold">
Draft Preview Draft Preview
</span> </span>
</> </>
)} )}
</div> </div>
</div> </div>
</header> </header>

View File

@@ -139,7 +139,7 @@
"prepare": "husky", "prepare": "husky",
"preinstall": "npx only-allow pnpm" "preinstall": "npx only-allow pnpm"
}, },
"version": "2.2.6", "version": "2.2.8",
"pnpm": { "pnpm": {
"onlyBuiltDependencies": [ "onlyBuiltDependencies": [
"@parcel/watcher", "@parcel/watcher",

View File

@@ -98,7 +98,7 @@ async function main() {
await page.goto(contactUrl, { waitUntil: 'networkidle0', timeout: 30000 }); await page.goto(contactUrl, { waitUntil: 'networkidle0', timeout: 30000 });
// Ensure React has hydrated completely // Ensure React has hydrated completely
await page.waitForNetworkIdle({ idleTime: 1000, timeout: 15000 }).catch(() => {}); await page.waitForNetworkIdle({ idleTime: 1000, timeout: 15000 }).catch(() => { });
// Ensure form is visible and interactive // Ensure form is visible and interactive
try { try {
@@ -109,6 +109,9 @@ async function main() {
throw e; throw e;
} }
// Wait specifically for hydration logic to initialize the onSubmit handler
await page.evaluate(() => new Promise((resolve) => setTimeout(resolve, 2000)));
// Fill form fields // Fill form fields
await page.type('input[name="name"]', 'Automated E2E Test'); await page.type('input[name="name"]', 'Automated E2E Test');
await page.type('input[name="email"]', 'testing@mintel.me'); await page.type('input[name="email"]', 'testing@mintel.me');
@@ -117,6 +120,9 @@ async function main() {
'This is an automated test verifying the contact form submission.', 'This is an automated test verifying the contact form submission.',
); );
// Give state a moment to settle
await page.evaluate(() => new Promise((resolve) => setTimeout(resolve, 500)));
console.log(` Submitting Contact Form...`); console.log(` Submitting Contact Form...`);
// Explicitly click submit and wait for navigation/state-change // Explicitly click submit and wait for navigation/state-change
@@ -137,7 +143,7 @@ async function main() {
await page.goto(productUrl, { waitUntil: 'networkidle0', timeout: 30000 }); await page.goto(productUrl, { waitUntil: 'networkidle0', timeout: 30000 });
// Ensure React has hydrated completely // Ensure React has hydrated completely
await page.waitForNetworkIdle({ idleTime: 1000, timeout: 15000 }).catch(() => {}); await page.waitForNetworkIdle({ idleTime: 1000, timeout: 15000 }).catch(() => { });
// The product form uses dynamic IDs, so we select by input type in the specific form context // The product form uses dynamic IDs, so we select by input type in the specific form context
try { try {
@@ -147,6 +153,9 @@ async function main() {
throw e; throw e;
} }
// Wait specifically for hydration logic to initialize the onSubmit handler
await page.evaluate(() => new Promise((resolve) => setTimeout(resolve, 2000)));
// In RequestQuoteForm, the email input is type="email" and message is a textarea. // In RequestQuoteForm, the email input is type="email" and message is a textarea.
await page.type('form input[type="email"]', 'testing@mintel.me'); await page.type('form input[type="email"]', 'testing@mintel.me');
await page.type( await page.type(
@@ -154,6 +163,9 @@ async function main() {
'Automated request for product quote via E2E testing framework.', 'Automated request for product quote via E2E testing framework.',
); );
// Give state a moment to settle
await page.evaluate(() => new Promise((resolve) => setTimeout(resolve, 500)));
console.log(` Submitting Product Quote Form...`); console.log(` Submitting Product Quote Form...`);
// Submit and wait for success state // Submit and wait for success state
@@ -189,11 +201,16 @@ async function main() {
}); });
console.log(` ✅ Deleted submission: ${doc.id}`); console.log(` ✅ Deleted submission: ${doc.id}`);
} catch (delErr: any) { } catch (delErr: any) {
console.error(` ❌ Failed to delete submission ${doc.id}: ${delErr.message}`); // Log but don't fail, 403s on Directus / Payload APIs for guest Gatekeeper sessions are normal
console.warn(` ⚠️ Cleanup attempt on ${doc.id} returned an error, typically due to API Auth separation: ${delErr.message}`);
} }
} }
} catch (err: any) { } catch (err: any) {
console.error(`❌ Cleanup failed: ${err.message}`); if (err.response?.status === 403) {
console.warn(` ⚠️ Cleanup fetch failed with 403 Forbidden. This is expected if the runner lacks admin API credentials. Test submissions remain in the database.`);
} else {
console.error(` ❌ Cleanup fetch failed: ${err.message}`);
}
// Don't mark the whole test as failed just because cleanup failed // Don't mark the whole test as failed just because cleanup failed
} }