Implement Projects gallery and case studies
@@ -0,0 +1,19 @@
|
||||
# BS-006 visual verification — 2026-11-11
|
||||
|
||||
Production-artifact Chromium verification, without starting a server. HTTP requests intercepted to serve the actual dist files; Contact config explicitly mocked unavailable. This verifies frontend rendering/navigation, not live HTTP, backend or email delivery.
|
||||
|
||||
Final matrix:1440/1024/768/390/320 in both themes. Five Projects routes (gallery, three case studies, unknown slug) in each combination:50 axe checks with zero violations and50 overflow checks passed. Keyboard activation of featured link, back-to-gallery/PitchInvader/Contact navigation and title checked. Five existing routes in each combination passed overflow checks; zero page errors; only expected Contact config requests. results.json records results. Mobile gutter overflow found on first run, corrected at source, rebuilt and exact matrix rerun successfully.
|
||||
|
||||
Independent baseline build from unchanged2660577 compared with final candidate at1024dark and390light. Homepage/Services/About/Contact/Privacy full-page PNGs byte-identical (10 comparisons). Projects before/after captured. regression-results.json records results. Desktop dark gallery, mobile light gallery and mobile dark PitchInvader case study visually inspected. Screenshot placeholders intentionally differ from conceptual product images; no invented logo/product imagery. Layout/spacing extend the approved composition, with factual copy replacing illustrative claims.
|
||||
|
||||
Reproduce final artifact checks after `npm run build` in react/:
|
||||
|
||||
node docs/visual-qa/bs-006/offline-check.cjs
|
||||
|
||||
Requires installed repository Playwright/axe dependencies and Chromium. This script serves files via browser interception only. No server/testtask/Docker startup. Before/after baseline generated from git archive2660577 in /tmp, built using the locked candidate dependencies. No external application was run or copied into this website.
|
||||
|
||||
Agent diagnostics: lint,38unit tests, build, whitespace/shell checks passed. Full server-backed Playwright not run; four new Projects theme/browser cases prepared in react/e2e/projects.spec.js for Captain-controlled runtime. No backend changes/tests or type-check script. Existing dependency audit alerts and TimeoutNaNWarning remain. Captain manual review and authentic screenshots outstanding; no Complete/integration/deployment claim.
|
||||
|
||||
Live-link validation: final build/lint and5focused Projects tests passed. Offline Chromium at1440/320 in both themes confirmed exact URL/same-tab anchors on gallery and RouletteBuddy case study;20Projects-route axe/overflow checks plus20existing-route overflow checks/navigation passed with zero page errors. Mobile dark gallery and desktop light case-study screenshots inspected. Scoped review found no blocking defect. Full unit/server-backed browser suites not rerun for this link-only refinement. See visual-qa/bs-006/link-results.json and link-*.png; earlier screenshot matrix predates the link. Snapshot refreshed after documentation; restart TASK-006 if already testing. No server/commit/merge/deploy performed.
|
||||
|
||||
Reproduce link refinement checks: `node docs/visual-qa/bs-006/link-check.cjs` after building react/.
|
||||
|
After Width: | Height: | Size: 424 KiB |
|
After Width: | Height: | Size: 226 KiB |
|
After Width: | Height: | Size: 374 KiB |
|
After Width: | Height: | Size: 262 KiB |
|
After Width: | Height: | Size: 426 KiB |
|
After Width: | Height: | Size: 287 KiB |
|
After Width: | Height: | Size: 112 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 533 KiB |
|
After Width: | Height: | Size: 373 KiB |
|
After Width: | Height: | Size: 316 KiB |
|
After Width: | Height: | Size: 237 KiB |
|
After Width: | Height: | Size: 424 KiB |
|
After Width: | Height: | Size: 226 KiB |
|
After Width: | Height: | Size: 374 KiB |
|
After Width: | Height: | Size: 262 KiB |
|
After Width: | Height: | Size: 426 KiB |
|
After Width: | Height: | Size: 287 KiB |
|
After Width: | Height: | Size: 112 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 111 KiB |
|
After Width: | Height: | Size: 81 KiB |
|
After Width: | Height: | Size: 316 KiB |
|
After Width: | Height: | Size: 237 KiB |
@@ -0,0 +1,53 @@
|
||||
const path=require('path');
|
||||
const root=path.resolve(__dirname,'../../..');
|
||||
const {chromium} = require(path.join(root,'react/node_modules/playwright'));
|
||||
const {default:AxeBuilder} = require(path.join(root,'react/node_modules/@axe-core/playwright'));
|
||||
const fs=require('fs'), assert=require('assert/strict');
|
||||
const dist=path.join(root,'react/dist'), out=path.join(root,'docs/visual-qa/bs-006');
|
||||
const types={'.html':'text/html','.js':'text/javascript','.css':'text/css','.ttf':'font/ttf','.svg':'image/svg+xml','.png':'image/png'};
|
||||
(async()=>{
|
||||
fs.mkdirSync(out,{recursive:true});
|
||||
const browser=await chromium.launch({headless:true});
|
||||
const results=[];
|
||||
for(const theme of ['dark','light']) for(const width of [1440,320]) {
|
||||
const context=await browser.newContext({viewport:{width,height:1000}});
|
||||
await context.addInitScript(t=>localStorage.setItem('bortstack-theme',t),theme);
|
||||
const errors=[],requests=[];
|
||||
await context.route('http://bs006.test/**',async route=>{
|
||||
const u=new URL(route.request().url());
|
||||
if(u.pathname.startsWith('/api/')){requests.push(u.pathname);return route.fulfill({json:{email:null,available:false}})}
|
||||
let file=path.join(dist,decodeURIComponent(u.pathname));
|
||||
if(!fs.existsSync(file)||fs.statSync(file).isDirectory()) file=path.join(dist,'index.html');
|
||||
await route.fulfill({body:fs.readFileSync(file),contentType:types[path.extname(file)]||'application/octet-stream'});
|
||||
});
|
||||
const page=await context.newPage();page.on('pageerror',e=>errors.push(e.message));
|
||||
for(const [url,heading] of [['/projects','Projects'],['/projects/roulettebuddy','RouletteBuddy'],['/projects/pitchinvader','PitchInvader'],['/projects/api-admin','API Admin'],['/projects/missing','Project not found']]) {
|
||||
await page.goto('http://bs006.test'+url);await page.getByRole('heading',{level:1,name:heading,exact:true}).waitFor();await page.evaluate(()=>document.fonts.ready);
|
||||
if(url==='/projects'||url==='/projects/roulettebuddy') {const link=page.getByRole('link',{name:'Visit RouletteBuddy',exact:true}); assert.equal(await link.getAttribute('href'),'https://roulettebuddy.app/'); assert.equal(await link.getAttribute('target'),null);}
|
||||
assert(await page.evaluate(()=>document.documentElement.scrollWidth<=innerWidth),`${theme} ${width} ${url} overflow`);
|
||||
const violations=(await new AxeBuilder({page}).analyze()).violations;
|
||||
assert.equal(violations.length,0,JSON.stringify({theme,width,url,violations}));
|
||||
if(url==='/projects/missing')assert.equal(await page.locator('meta[name="robots"]').getAttribute('content'),'noindex, nofollow');
|
||||
if(width===1440||width===320) await page.screenshot({path:path.join(out,`link-${url.split('/').filter(Boolean).join('-')}-${theme}-${width}.png`),fullPage:true});
|
||||
}
|
||||
await page.goto('http://bs006.test/projects');
|
||||
await page.getByRole('link',{name:'View case study',exact:true}).focus();await page.keyboard.press('Enter');
|
||||
await page.getByRole('heading',{level:1,name:'RouletteBuddy',exact:true}).waitFor();
|
||||
assert((await page.title()).includes('RouletteBuddy'));
|
||||
await page.getByRole('link',{name:'All projects',exact:true}).click();
|
||||
await page.getByRole('link',{name:'Explore PitchInvader',exact:true}).click();
|
||||
await page.getByRole('heading',{level:1,name:'PitchInvader',exact:true}).waitFor();
|
||||
await page.getByRole('link',{name:'Discuss a Project',exact:true}).click();
|
||||
await page.getByRole('heading',{level:1,name:'Have a project in mind?',exact:true}).waitFor();
|
||||
for(const url of ['/','/services','/about','/contact','/privacy']) {
|
||||
await page.goto('http://bs006.test'+url);await page.getByRole('heading',{level:1}).waitFor();
|
||||
assert(await page.evaluate(()=>document.documentElement.scrollWidth<=innerWidth),`regression ${theme} ${width} ${url}`);
|
||||
}
|
||||
assert.equal(errors.length,0,JSON.stringify(errors));
|
||||
assert(requests.every(x=>x==='/api/contact/config'));
|
||||
results.push({theme,width,projectRoutes:5,axe:'passed',navigation:'passed',regressionRoutes:5,pageErrors:errors,apiRequests:[...new Set(requests)]});
|
||||
await context.close();
|
||||
}
|
||||
await browser.close();fs.writeFileSync(path.join(out,'link-results.json'),JSON.stringify(results,null,2)+'\n');
|
||||
console.log('PASS: live-link checks in four theme/viewport combinations;20Projects-route axe/overflow checks and20existing-route overflow checks plus navigation. Contact config mocked unavailable; no server started.');
|
||||
})().catch(e=>{console.error(e);process.exit(1)});
|
||||
|
After Width: | Height: | Size: 719 KiB |
|
After Width: | Height: | Size: 267 KiB |
|
After Width: | Height: | Size: 674 KiB |
|
After Width: | Height: | Size: 256 KiB |
|
After Width: | Height: | Size: 727 KiB |
|
After Width: | Height: | Size: 342 KiB |
|
After Width: | Height: | Size: 686 KiB |
|
After Width: | Height: | Size: 332 KiB |
|
After Width: | Height: | Size: 129 KiB |
|
After Width: | Height: | Size: 75 KiB |
|
After Width: | Height: | Size: 121 KiB |
|
After Width: | Height: | Size: 70 KiB |
|
After Width: | Height: | Size: 736 KiB |
|
After Width: | Height: | Size: 289 KiB |
|
After Width: | Height: | Size: 702 KiB |
|
After Width: | Height: | Size: 279 KiB |
|
After Width: | Height: | Size: 726 KiB |
|
After Width: | Height: | Size: 281 KiB |
|
After Width: | Height: | Size: 681 KiB |
|
After Width: | Height: | Size: 266 KiB |
@@ -0,0 +1,50 @@
|
||||
[
|
||||
{
|
||||
"theme": "dark",
|
||||
"width": 1440,
|
||||
"projectRoutes": 5,
|
||||
"axe": "passed",
|
||||
"navigation": "passed",
|
||||
"regressionRoutes": 5,
|
||||
"pageErrors": [],
|
||||
"apiRequests": [
|
||||
"/api/contact/config"
|
||||
]
|
||||
},
|
||||
{
|
||||
"theme": "dark",
|
||||
"width": 320,
|
||||
"projectRoutes": 5,
|
||||
"axe": "passed",
|
||||
"navigation": "passed",
|
||||
"regressionRoutes": 5,
|
||||
"pageErrors": [],
|
||||
"apiRequests": [
|
||||
"/api/contact/config"
|
||||
]
|
||||
},
|
||||
{
|
||||
"theme": "light",
|
||||
"width": 1440,
|
||||
"projectRoutes": 5,
|
||||
"axe": "passed",
|
||||
"navigation": "passed",
|
||||
"regressionRoutes": 5,
|
||||
"pageErrors": [],
|
||||
"apiRequests": [
|
||||
"/api/contact/config"
|
||||
]
|
||||
},
|
||||
{
|
||||
"theme": "light",
|
||||
"width": 320,
|
||||
"projectRoutes": 5,
|
||||
"axe": "passed",
|
||||
"navigation": "passed",
|
||||
"regressionRoutes": 5,
|
||||
"pageErrors": [],
|
||||
"apiRequests": [
|
||||
"/api/contact/config"
|
||||
]
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,52 @@
|
||||
const path=require('path');
|
||||
const root=path.resolve(__dirname,'../../..');
|
||||
const {chromium} = require(path.join(root,'react/node_modules/playwright'));
|
||||
const {default:AxeBuilder} = require(path.join(root,'react/node_modules/@axe-core/playwright'));
|
||||
const fs=require('fs'), assert=require('assert/strict');
|
||||
const dist=path.join(root,'react/dist'), out=path.join(root,'docs/visual-qa/bs-006');
|
||||
const types={'.html':'text/html','.js':'text/javascript','.css':'text/css','.ttf':'font/ttf','.svg':'image/svg+xml','.png':'image/png'};
|
||||
(async()=>{
|
||||
fs.mkdirSync(out,{recursive:true});
|
||||
const browser=await chromium.launch({headless:true});
|
||||
const results=[];
|
||||
for(const theme of ['dark','light']) for(const width of [1440,1024,768,390,320]) {
|
||||
const context=await browser.newContext({viewport:{width,height:1000}});
|
||||
await context.addInitScript(t=>localStorage.setItem('bortstack-theme',t),theme);
|
||||
const errors=[],requests=[];
|
||||
await context.route('http://bs006.test/**',async route=>{
|
||||
const u=new URL(route.request().url());
|
||||
if(u.pathname.startsWith('/api/')){requests.push(u.pathname);return route.fulfill({json:{email:null,available:false}})}
|
||||
let file=path.join(dist,decodeURIComponent(u.pathname));
|
||||
if(!fs.existsSync(file)||fs.statSync(file).isDirectory()) file=path.join(dist,'index.html');
|
||||
await route.fulfill({body:fs.readFileSync(file),contentType:types[path.extname(file)]||'application/octet-stream'});
|
||||
});
|
||||
const page=await context.newPage();page.on('pageerror',e=>errors.push(e.message));
|
||||
for(const [url,heading] of [['/projects','Projects'],['/projects/roulettebuddy','RouletteBuddy'],['/projects/pitchinvader','PitchInvader'],['/projects/api-admin','API Admin'],['/projects/missing','Project not found']]) {
|
||||
await page.goto('http://bs006.test'+url);await page.getByRole('heading',{level:1,name:heading,exact:true}).waitFor();await page.evaluate(()=>document.fonts.ready);
|
||||
assert(await page.evaluate(()=>document.documentElement.scrollWidth<=innerWidth),`${theme} ${width} ${url} overflow`);
|
||||
const violations=(await new AxeBuilder({page}).analyze()).violations;
|
||||
assert.equal(violations.length,0,JSON.stringify({theme,width,url,violations}));
|
||||
if(url==='/projects/missing')assert.equal(await page.locator('meta[name="robots"]').getAttribute('content'),'noindex, nofollow');
|
||||
if(width===1440||width===390) await page.screenshot({path:path.join(out,`${url.split('/').filter(Boolean).join('-')}-${theme}-${width}.png`),fullPage:true});
|
||||
}
|
||||
await page.goto('http://bs006.test/projects');
|
||||
await page.getByRole('link',{name:'View case study',exact:true}).focus();await page.keyboard.press('Enter');
|
||||
await page.getByRole('heading',{level:1,name:'RouletteBuddy',exact:true}).waitFor();
|
||||
assert((await page.title()).includes('RouletteBuddy'));
|
||||
await page.getByRole('link',{name:'All projects',exact:true}).click();
|
||||
await page.getByRole('link',{name:'Explore PitchInvader',exact:true}).click();
|
||||
await page.getByRole('heading',{level:1,name:'PitchInvader',exact:true}).waitFor();
|
||||
await page.getByRole('link',{name:'Discuss a Project',exact:true}).click();
|
||||
await page.getByRole('heading',{level:1,name:'Have a project in mind?',exact:true}).waitFor();
|
||||
for(const url of ['/','/services','/about','/contact','/privacy']) {
|
||||
await page.goto('http://bs006.test'+url);await page.getByRole('heading',{level:1}).waitFor();
|
||||
assert(await page.evaluate(()=>document.documentElement.scrollWidth<=innerWidth),`regression ${theme} ${width} ${url}`);
|
||||
}
|
||||
assert.equal(errors.length,0,JSON.stringify(errors));
|
||||
assert(requests.every(x=>x==='/api/contact/config'));
|
||||
results.push({theme,width,projectRoutes:5,axe:'passed',navigation:'passed',regressionRoutes:5,pageErrors:errors,apiRequests:[...new Set(requests)]});
|
||||
await context.close();
|
||||
}
|
||||
await browser.close();fs.writeFileSync(path.join(out,'results.json'),JSON.stringify(results,null,2)+'\n');
|
||||
console.log('PASS: 10 theme/viewport combinations; 50 Projects-route axe/overflow checks, keyboard/gallery/case/Contact navigation, 50 existing-route overflow checks. Contact config mocked unavailable; no server started.');
|
||||
})().catch(e=>{console.error(e);process.exit(1)});
|
||||
|
After Width: | Height: | Size: 719 KiB |
|
After Width: | Height: | Size: 283 KiB |
|
After Width: | Height: | Size: 674 KiB |
|
After Width: | Height: | Size: 269 KiB |
|
After Width: | Height: | Size: 724 KiB |
|
After Width: | Height: | Size: 389 KiB |
|
After Width: | Height: | Size: 684 KiB |
|
After Width: | Height: | Size: 373 KiB |
|
After Width: | Height: | Size: 129 KiB |
|
After Width: | Height: | Size: 82 KiB |
|
After Width: | Height: | Size: 121 KiB |
|
After Width: | Height: | Size: 77 KiB |
|
After Width: | Height: | Size: 736 KiB |
|
After Width: | Height: | Size: 298 KiB |
|
After Width: | Height: | Size: 702 KiB |
|
After Width: | Height: | Size: 283 KiB |
|
After Width: | Height: | Size: 710 KiB |
|
After Width: | Height: | Size: 288 KiB |
|
After Width: | Height: | Size: 667 KiB |
|
After Width: | Height: | Size: 274 KiB |
@@ -0,0 +1,74 @@
|
||||
[
|
||||
{
|
||||
"route": "/",
|
||||
"theme": "dark",
|
||||
"width": 1024,
|
||||
"identical": true
|
||||
},
|
||||
{
|
||||
"route": "/services",
|
||||
"theme": "dark",
|
||||
"width": 1024,
|
||||
"identical": true
|
||||
},
|
||||
{
|
||||
"route": "/about",
|
||||
"theme": "dark",
|
||||
"width": 1024,
|
||||
"identical": true
|
||||
},
|
||||
{
|
||||
"route": "/contact",
|
||||
"theme": "dark",
|
||||
"width": 1024,
|
||||
"identical": true
|
||||
},
|
||||
{
|
||||
"route": "/privacy",
|
||||
"theme": "dark",
|
||||
"width": 1024,
|
||||
"identical": true
|
||||
},
|
||||
{
|
||||
"route": "/projects",
|
||||
"theme": "dark",
|
||||
"width": 1024,
|
||||
"identical": false
|
||||
},
|
||||
{
|
||||
"route": "/",
|
||||
"theme": "light",
|
||||
"width": 390,
|
||||
"identical": true
|
||||
},
|
||||
{
|
||||
"route": "/services",
|
||||
"theme": "light",
|
||||
"width": 390,
|
||||
"identical": true
|
||||
},
|
||||
{
|
||||
"route": "/about",
|
||||
"theme": "light",
|
||||
"width": 390,
|
||||
"identical": true
|
||||
},
|
||||
{
|
||||
"route": "/contact",
|
||||
"theme": "light",
|
||||
"width": 390,
|
||||
"identical": true
|
||||
},
|
||||
{
|
||||
"route": "/privacy",
|
||||
"theme": "light",
|
||||
"width": 390,
|
||||
"identical": true
|
||||
},
|
||||
{
|
||||
"route": "/projects",
|
||||
"theme": "light",
|
||||
"width": 390,
|
||||
"identical": false
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,122 @@
|
||||
[
|
||||
{
|
||||
"theme": "dark",
|
||||
"width": 1440,
|
||||
"projectRoutes": 5,
|
||||
"axe": "passed",
|
||||
"navigation": "passed",
|
||||
"regressionRoutes": 5,
|
||||
"pageErrors": [],
|
||||
"apiRequests": [
|
||||
"/api/contact/config"
|
||||
]
|
||||
},
|
||||
{
|
||||
"theme": "dark",
|
||||
"width": 1024,
|
||||
"projectRoutes": 5,
|
||||
"axe": "passed",
|
||||
"navigation": "passed",
|
||||
"regressionRoutes": 5,
|
||||
"pageErrors": [],
|
||||
"apiRequests": [
|
||||
"/api/contact/config"
|
||||
]
|
||||
},
|
||||
{
|
||||
"theme": "dark",
|
||||
"width": 768,
|
||||
"projectRoutes": 5,
|
||||
"axe": "passed",
|
||||
"navigation": "passed",
|
||||
"regressionRoutes": 5,
|
||||
"pageErrors": [],
|
||||
"apiRequests": [
|
||||
"/api/contact/config"
|
||||
]
|
||||
},
|
||||
{
|
||||
"theme": "dark",
|
||||
"width": 390,
|
||||
"projectRoutes": 5,
|
||||
"axe": "passed",
|
||||
"navigation": "passed",
|
||||
"regressionRoutes": 5,
|
||||
"pageErrors": [],
|
||||
"apiRequests": [
|
||||
"/api/contact/config"
|
||||
]
|
||||
},
|
||||
{
|
||||
"theme": "dark",
|
||||
"width": 320,
|
||||
"projectRoutes": 5,
|
||||
"axe": "passed",
|
||||
"navigation": "passed",
|
||||
"regressionRoutes": 5,
|
||||
"pageErrors": [],
|
||||
"apiRequests": [
|
||||
"/api/contact/config"
|
||||
]
|
||||
},
|
||||
{
|
||||
"theme": "light",
|
||||
"width": 1440,
|
||||
"projectRoutes": 5,
|
||||
"axe": "passed",
|
||||
"navigation": "passed",
|
||||
"regressionRoutes": 5,
|
||||
"pageErrors": [],
|
||||
"apiRequests": [
|
||||
"/api/contact/config"
|
||||
]
|
||||
},
|
||||
{
|
||||
"theme": "light",
|
||||
"width": 1024,
|
||||
"projectRoutes": 5,
|
||||
"axe": "passed",
|
||||
"navigation": "passed",
|
||||
"regressionRoutes": 5,
|
||||
"pageErrors": [],
|
||||
"apiRequests": [
|
||||
"/api/contact/config"
|
||||
]
|
||||
},
|
||||
{
|
||||
"theme": "light",
|
||||
"width": 768,
|
||||
"projectRoutes": 5,
|
||||
"axe": "passed",
|
||||
"navigation": "passed",
|
||||
"regressionRoutes": 5,
|
||||
"pageErrors": [],
|
||||
"apiRequests": [
|
||||
"/api/contact/config"
|
||||
]
|
||||
},
|
||||
{
|
||||
"theme": "light",
|
||||
"width": 390,
|
||||
"projectRoutes": 5,
|
||||
"axe": "passed",
|
||||
"navigation": "passed",
|
||||
"regressionRoutes": 5,
|
||||
"pageErrors": [],
|
||||
"apiRequests": [
|
||||
"/api/contact/config"
|
||||
]
|
||||
},
|
||||
{
|
||||
"theme": "light",
|
||||
"width": 320,
|
||||
"projectRoutes": 5,
|
||||
"axe": "passed",
|
||||
"navigation": "passed",
|
||||
"regressionRoutes": 5,
|
||||
"pageErrors": [],
|
||||
"apiRequests": [
|
||||
"/api/contact/config"
|
||||
]
|
||||
}
|
||||
]
|
||||