chore: align deployment pipeline with klz-2026 standards
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 6s
Build & Deploy / 🧪 QA (push) Failing after 54s
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 6s
Build & Deploy / 🧪 QA (push) Failing after 54s
Build & Deploy / 🏗️ Build (push) Has been skipped
Build & Deploy / 🚀 Deploy (push) Has been skipped
Build & Deploy / 🧪 Post-Deploy Verification (push) Has been skipped
Build & Deploy / 🔔 Notify (push) Successful in 1s
- Add branch deployment support - Switch build platform to linux/amd64 - Extract checks to turbo pipeline - Add pre/post-deploy scripts & cms-sync
This commit is contained in:
49
apps/web/scripts/check-forms.ts
Normal file
49
apps/web/scripts/check-forms.ts
Normal file
@@ -0,0 +1,49 @@
|
||||
import puppeteer from "puppeteer";
|
||||
|
||||
const targetUrl = process.env.NEXT_PUBLIC_BASE_URL || "http://localhost:3000";
|
||||
const gatekeeperPassword = process.env.GATEKEEPER_PASSWORD || "secret"; // Use ENV or default
|
||||
|
||||
async function main() {
|
||||
console.log(`\n🚀 Starting E2E Form Submission Check for: ${targetUrl}`);
|
||||
|
||||
const browser = await puppeteer.launch({
|
||||
headless: true,
|
||||
args: ["--no-sandbox", "--disable-setuid-sandbox"],
|
||||
});
|
||||
|
||||
const page = await browser.newPage();
|
||||
|
||||
try {
|
||||
console.log(`\n🛡️ Authenticating through Gatekeeper...`);
|
||||
await page.goto(targetUrl, { waitUntil: "networkidle0" });
|
||||
|
||||
const isGatekeeperPage = await page.$('input[name="password"]');
|
||||
if (isGatekeeperPage) {
|
||||
await page.type('input[name="password"]', gatekeeperPassword);
|
||||
await Promise.all([
|
||||
page.waitForNavigation({ waitUntil: "networkidle2" }),
|
||||
page.click('button[type="submit"]'),
|
||||
]);
|
||||
console.log(`✅ Gatekeeper authentication successful!`);
|
||||
}
|
||||
|
||||
console.log(`\n🧪 Testing Contact Form submission...`);
|
||||
// Note: This needs to be adapted to the actual selectors on mintel.me
|
||||
// For now, we perform a simple smoke test of the home page
|
||||
const title = await page.title();
|
||||
console.log(`✅ Page Title: ${title}`);
|
||||
|
||||
if (title.toLowerCase().includes("mintel")) {
|
||||
console.log(`✅ Basic smoke test passed!`);
|
||||
} else {
|
||||
throw new Error("Page title mismatch");
|
||||
}
|
||||
} catch (err: any) {
|
||||
console.error(`❌ Test Failed: ${err.message}`);
|
||||
process.exit(1);
|
||||
} finally {
|
||||
await browser.close();
|
||||
}
|
||||
}
|
||||
|
||||
main();
|
||||
Reference in New Issue
Block a user