getaero-io/gtm-eng-skills / engineering/warm-intro-scoring
warm-intro-scoring
Verifiedtests/browser_e2e.cjs
View on GitHub/* eslint-disable @typescript-eslint/no-require-imports -- Standalone CommonJS browser harness supports caller-selected Playwright. */
// Verify the stored cloud_e2e.py artifact. Usage: node tests/browser_e2e.cjs review.html [receipt.json]
const {chromium}=require(process.env.PLAYWRIGHT_MODULE || 'playwright');const assert=require('node:assert/strict');const fs=require('node:fs');
(async()=>{const browser=await chromium.launch({headless:true});try{const page=await browser.newPage({viewport:{width:1440,height:1000}});const errors=[],network=[];page.on('pageerror',e=>errors.push(e.message));page.on('request',r=>{if(/^https?:/.test(r.url()))network.push(r.url())});await page.goto(require('node:url').pathToFileURL(require('node:path').resolve(process.argv[2])).href);await page.waitForSelector('.card');assert.equal(await page.locator('.target').count(),1);assert.equal(await page.locator('.card').count(),3);assert.equal(await page.locator('.card').first().getAttribute('data-path-id'),'coworker->target');assert.match(await page.locator('[data-path-id="investor->target"]').innerText(),/declined|blocked/i);await page.locator('#toggle-weights').click();const weights=await page.getByRole('spinbutton').evaluateAll(els=>els.map(e=>({label:e.getAttribute('aria-label'),value:e.value})));assert.equal(weights.find(w=>w.label==='Work overlap weight').value,'160');await page.setViewportSize({width:390,height:844});assert(await page.evaluate(()=>document.documentElement.scrollWidth<=window.innerWidth));assert.deepEqual(errors,[]);assert.deepEqual(network,[]);const result={status:'pass',targets:1,visiblePaths:3,firstPath:'coworker->target',blockedInvestorVisible:true,mobileOverflow:false,browserErrors:errors,networkRequests:network};if(process.argv[3])fs.writeFileSync(process.argv[3],JSON.stringify(result,null,2),{flag:'wx',mode:0o600});console.log(result)}finally{await browser.close()}})().catch(e=>{console.error(e);process.exit(1)});
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| slack-gif-creatoranthropics/skillsKnowledge and utilities for creating animated GIFs optimized for Slack. Provides constraints, validation tools, and animation concepts. Use when users request animated GIFs for Slack like "make me a GIF of X doing Y for Slack." | Stars: 198k | Updated | Claude CodeCodex | Verified | Install |
| ponytailDietrichGebert/ponytailLazy senior dev mode for any coding task: the smallest change that fully solves it, and a reply a busy human understands in one read. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailHarvest every shortcut: comment into one debt ledger, so deferrals get tracked instead of forgotten. One-shot report. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |
| ponytail-debtDietrichGebert/ponytailList every `shortcut:` comment (and older `ponytail:` ones) as a debt ledger. One-shot report, changes nothing. Use for "ponytail debt", "what did ponytail defer", "list the shortcuts", /ponytail-debt. | Stars: 194k | Updated | Claude CodeCodex | Verified | Install |