Add multi-account OAuth, Obsidian integration, product assets, and test tooling
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
62
product/site/verify.mjs
Normal file
62
product/site/verify.mjs
Normal file
@@ -0,0 +1,62 @@
|
||||
import { spawn } from "child_process";
|
||||
|
||||
const commands = [
|
||||
{
|
||||
label: "smoke",
|
||||
cmd: "node",
|
||||
args: ["product/site/smoke-test.cjs"],
|
||||
env: {},
|
||||
},
|
||||
{
|
||||
label: "e2e-desktop",
|
||||
cmd: "node",
|
||||
args: ["product/site/e2e-test.mjs"],
|
||||
env: {
|
||||
SQUAREMCP_E2E_PROFILE: "desktop",
|
||||
SQUAREMCP_E2E_SCREENSHOT: "/tmp/squaremcp-e2e-desktop.png",
|
||||
},
|
||||
},
|
||||
{
|
||||
label: "e2e-mobile",
|
||||
cmd: "node",
|
||||
args: ["product/site/e2e-test.mjs"],
|
||||
env: {
|
||||
SQUAREMCP_E2E_PROFILE: "mobile",
|
||||
SQUAREMCP_E2E_SCREENSHOT: "/tmp/squaremcp-e2e-mobile.png",
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
function runCommand({ label, cmd, args, env }) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const child = spawn(cmd, args, {
|
||||
stdio: "inherit",
|
||||
env: { ...process.env, ...env },
|
||||
});
|
||||
|
||||
child.on("exit", (code) => {
|
||||
if (code === 0) {
|
||||
resolve();
|
||||
return;
|
||||
}
|
||||
reject(new Error(`${label} failed with exit code ${code}`));
|
||||
});
|
||||
child.on("error", reject);
|
||||
});
|
||||
}
|
||||
|
||||
async function main() {
|
||||
for (const command of commands) {
|
||||
console.log(`\n==> ${command.label}`);
|
||||
await runCommand(command);
|
||||
}
|
||||
|
||||
console.log("\nsquaremcp product site verification: PASS");
|
||||
console.log("desktop_screenshot: /tmp/squaremcp-e2e-desktop.png");
|
||||
console.log("mobile_screenshot: /tmp/squaremcp-e2e-mobile.png");
|
||||
}
|
||||
|
||||
main().catch((error) => {
|
||||
console.error(`squaremcp product site verification: FAIL: ${error.message}`);
|
||||
process.exit(1);
|
||||
});
|
||||
Reference in New Issue
Block a user