Aiga Docs

Test Scenarios

Comprehensive test plan covering 91 scenarios across all subsystems.

Aiga's test plan covers 91 scenarios across 12 categories. Below is the complete test matrix with current coverage status.

Test Categories

JS Isolation (JS-01 ~ JS-10)

IDScenarioTiersStatus
JS-01Sub-app window.x = 1 does not pollute hostlight, strictCovered
JS-02Host global changes are invisible to sub-appstrict, remoteCovered
JS-03Two sub-apps writing same global don't conflictlight+light, strict+strictCovered
JS-04eval() runs in sub-app scope, not hostlightCovered
JS-05new Function() runs in sub-app scopelightCovered
JS-06localStorage.setItem is per-app namespacedstrictCovered
JS-07sessionStorage is per-app namespacedstrictCovered
JS-08window.addEventListener on sub-app doesn't leaklight, strictCovered
JS-09Prototype pollution (Object.prototype.x) blockedstrictCovered
JS-10All timers cleaned up on destroylightCovered

CSS Isolation (CSS-01 ~ CSS-07)

IDScenarioTiersStatus
CSS-01Sub-app global body { color: red } doesn't leaklight, strictCovered
CSS-02Host !important rule doesn't bleed inlight, strictCovered
CSS-03CSS custom properties from host pass throughlight, strictCovered
CSS-04Dynamic style injection stays scopedlightCovered
CSS-05Two sub-apps with conflicting classes don't clashlight+lightCovered
CSS-06Host theme change reactively syncs to sub-appslight, strictCovered
CSS-07@font-face loaded in sub-app usablelight, strictCovered

DOM Isolation (DOM-01 ~ DOM-06)

IDScenarioTiersStatus
DOM-01document.querySelector scoped to sub-applightCovered
DOM-02document.getElementById scopedlightCovered
DOM-03document.title write scoped per sub-applightCovered
DOM-04history.pushState from sub-app handledstrictCovered
DOM-05Sub-app DOM operations don't affect hostlightCovered
DOM-06MutationObserver on sub-app content workslightCovered

Security (SEC-01 ~ SEC-05)

IDScenarioTiersStatus
SEC-01window.parent / window.top returns selfstrictCovered
SEC-02document.cookie isolated per sub-applight, strictCovered
SEC-03XSS via malicious sub-app HTML blockedallCovered
SEC-04postMessage origin validatedstrict, remoteCovered
SEC-05allow-same-origin mitigated by overridesstrictCovered

Overlay (OV-01 ~ OV-13)

IDScenarioTiersStatus
OV-01antd Modal renders correctly in viewportlight, strictCovered
OV-02Element Plus Dialog renders correctlylight, strictCovered
OV-03Radix Popover positions correctlylightCovered
OV-04Nested overlay (dialog opens confirm)strictCovered
OV-05Overlay dismiss removes from layerlight, strictCovered
OV-06Multiple overlays stack correctlylightCovered
OV-07Overlay scroll doesn't scroll hoststrictCovered
OV-08Overlay animation plays correctlystrictCovered
OV-09Overlay click events workstrictCovered
OV-10Tooltip positioning after scrolllightKnown limitation
OV-11Drawer slide animationstrictCovered
OV-12Overlay cleanup on sub-app destroylight, strictCovered
OV-13False positive: header not detectedlight, strictCovered

RPC (RPC-01 ~ RPC-13)

IDScenarioTiersStatus
RPC-01call() returns Promise with resultstrict, remoteCovered
RPC-02call() rejects on timeoutstrict, remoteCovered
RPC-03expose() registers handlerstrict, remoteCovered
RPC-04emit() fires event on remotestrict, remoteCovered
RPC-05on() receives eventsstrict, remoteCovered
RPC-06Multiple concurrent calls resolve correctlystrictCovered
RPC-07Error in handler rejects callerstrictCovered
RPC-08dispose() rejects pending callsstrictCovered
RPC-09Origin mismatch silently drops messagestrict, remoteCovered
RPC-10Large payload serializes correctlystrictCovered
RPC-11setTarget() updates after navigationstrictCovered
RPC-12Message from wrong source ignoredstrictCovered
RPC-13Props update sent via RPC on changestrictCovered
IDScenarioTiersStatus
NAV-01router.push() switches sub-appallCovered
NAV-02Sub-app internal routing preservedstrictCovered
NAV-03Browser back navigates correctlyallCovered
NAV-04Browser forward navigates correctlyallCovered
NAV-05Direct URL entry resolves routeallCovered
NAV-06Nested routes match correctlyallCovered
NAV-07Hash mode worksallCovered
NAV-08Route guard blocks navigationallCovered
NAV-09404 fallback rendersallCovered

Error Handling (ERR-01 ~ ERR-05)

IDScenarioTiersStatus
ERR-01Uncaught error in sub-app caughtlight, noneCovered
ERR-02Sub-app fetch 404 shows error UIallCovered
ERR-03Load timeout triggers error stateallCovered
ERR-04CORS error detected with helpful messagelight, noneCovered
ERR-05RPC timeout rejects callstrict, remoteCovered

iframe Pool (POOL-01 ~ POOL-07)

IDScenarioTiersStatus
POOL-01Pool pre-warms on initstrictCovered
POOL-02Acquire returns iframe in ~0msstrictCovered
POOL-03Release returns iframe to poolstrictCovered
POOL-04LRU eviction at capacitystrictCovered
POOL-05Pool replenishes on idlestrictCovered
POOL-06Over-capacity force-create + shrinkstrictCovered
POOL-07dispose() cleans all iframesstrictCovered

Keep-Alive (KA-01 ~ KA-06)

IDScenarioTiersStatus
KA-01Unmounted keep-alive app preserves iframestrictCovered
KA-02Re-mount restores without reloadstrictCovered
KA-03LRU eviction on max alive exceededstrictCovered
KA-04Props re-sent on restorestrictCovered
KA-05CSS variables re-synced on restorestrictCovered
KA-06RPC channel re-established on restorestrictCovered

Service Worker (SW-01 ~ SW-05)

IDScenarioTiersStatus
SW-01Registration succeedsallCovered
SW-02Cache-first strategy worksallCovered
SW-03Network-first fallback on failureallCovered
SW-04SWR returns stale then revalidatesallCovered
SW-05Cross-iframe resources cachedstrictCovered

Performance (PERF-01 ~ PERF-05)

IDScenarioTiersStatus
PERF-01iframe acquire < 5ms from poolstrictCovered
PERF-02Light sandbox mount < 100mslightCovered
PERF-03Strict sandbox mount < 200msstrictCovered
PERF-04Keep-alive restore < 50msstrictCovered
PERF-055 concurrent sub-apps stablemixedCovered

Running Tests

# Unit tests (fast, no browser)
npm test

# Integration tests (real browser via Playwright)
npm run test:e2e

# Specific category
npm test -- --grep "JS-0"
npm test -- --grep "SEC-"

Coverage Summary

CategoryTotalCoveredKnown Limitations
JS Isolation1010
CSS Isolation77
DOM Isolation66
Security55
Overlay1312OV-10 (tooltip repositioning)
RPC1313
Navigation99
Error Handling55
iframe Pool77
Keep-Alive66
Service Worker55
Performance55
Total91901

On this page