mirror of https://github.com/garrytan/gstack.git
test: cover canonical benchmark routing
This commit is contained in:
parent
96ecb98bdf
commit
db3aeb1ac9
|
|
@ -193,7 +193,7 @@ Every gstack skill becomes a browser capability.
|
|||
| `/qa` | Test every page, find bugs, fix them, verify fixes |
|
||||
| `/design-review` | Screenshot → analyze → fix CSS → screenshot again |
|
||||
| `/investigate` | See the error in browser → trace to code → fix → verify |
|
||||
| `/benchmark` | Measure page performance → detect regressions → alert |
|
||||
| `/web-performance-benchmark` | Measure page performance → detect regressions → alert |
|
||||
| `/canary` | Monitor deployed site → screenshot periodically → alert on changes |
|
||||
| `/ship` | Run tests → review diff → create PR → verify deployment in browser |
|
||||
| `/cso` | Audit page for XSS, open redirects, clickjacking in real browser |
|
||||
|
|
|
|||
12
setup
12
setup
|
|
@ -1010,12 +1010,12 @@ if [ "$INSTALL_CLAUDE" -eq 1 ]; then
|
|||
fi
|
||||
# Compatibility aliases for the former generic benchmark command. Keep
|
||||
# both paths available while new docs use /web-performance-benchmark.
|
||||
for _WEB_PERF_ALIAS in benchmark gstack-benchmark; do
|
||||
_WEB_PERF_LINK="$INSTALL_SKILLS_DIR/$_WEB_PERF_ALIAS"
|
||||
if [ -L "$_WEB_PERF_LINK" ] || [ ! -e "$_WEB_PERF_LINK" ]; then
|
||||
_link_or_copy "$SOURCE_GSTACK_DIR/benchmark" "$_WEB_PERF_LINK"
|
||||
fi
|
||||
done
|
||||
for _WEB_PERF_ALIAS in benchmark gstack-benchmark; do
|
||||
_WEB_PERF_LINK="$INSTALL_SKILLS_DIR/$_WEB_PERF_ALIAS"
|
||||
if [ -L "$_WEB_PERF_LINK" ] || [ ! -e "$_WEB_PERF_LINK" ]; then
|
||||
_link_or_copy "$SOURCE_GSTACK_DIR/benchmark" "$_WEB_PERF_LINK"
|
||||
fi
|
||||
done
|
||||
if [ "$LOCAL_INSTALL" -eq 1 ]; then
|
||||
log "gstack ready (project-local)."
|
||||
log " skills: $INSTALL_SKILLS_DIR"
|
||||
|
|
|
|||
|
|
@ -491,6 +491,13 @@ describe('gen-skill-docs', () => {
|
|||
expect(setup).toContain('_link_or_copy "$SOURCE_GSTACK_DIR/benchmark" "$_WEB_PERF_LINK"');
|
||||
});
|
||||
|
||||
test('active browser design docs route to the canonical command', () => {
|
||||
const design = fs.readFileSync(path.join(ROOT, 'docs', 'designs', 'GSTACK_BROWSER_V0.md'), 'utf-8');
|
||||
|
||||
expect(design).toContain('| `/web-performance-benchmark` | Measure page performance');
|
||||
expect(design).not.toContain('| `/benchmark` | Measure page performance');
|
||||
});
|
||||
|
||||
test('qa and qa-only templates use QA_METHODOLOGY placeholder', () => {
|
||||
const qaTmpl = fs.readFileSync(path.join(ROOT, 'qa', 'SKILL.md.tmpl'), 'utf-8');
|
||||
expect(qaTmpl).toContain('{{QA_METHODOLOGY}}');
|
||||
|
|
|
|||
Loading…
Reference in New Issue