ci: add isolated ARM proposal test lane

This commit is contained in:
archipelago
2026-10-09 08:43:56 -04:00
parent 76141ffd2f
commit c6f8308e9a
12 changed files with 1056 additions and 1060 deletions
@@ -48,14 +48,14 @@ describe('MeshMap', () => {
return 7
})
const clearWatch = vi.fn()
const resizeObserver = vi.fn(() => ({
observe: vi.fn(),
disconnect: vi.fn(),
}))
class ResizeObserverMock {
observe = vi.fn()
disconnect = vi.fn()
}
vi.stubGlobal('navigator', {
geolocation: { watchPosition, clearWatch },
})
vi.stubGlobal('ResizeObserver', resizeObserver)
vi.stubGlobal('ResizeObserver', ResizeObserverMock)
const wrapper = mount(MeshMap)
@@ -79,11 +79,15 @@ describe('Mesh graphics lifecycle (Task 2): Leaflet map (MeshMap.vue)', () => {
vi.useFakeTimers()
mapInstances.length = 0
resizeObserverInstances = []
vi.stubGlobal('ResizeObserver', vi.fn(() => {
const inst = { observe: vi.fn(), disconnect: vi.fn(), unobserve: vi.fn() }
resizeObserverInstances.push(inst)
return inst
}))
vi.stubGlobal('ResizeObserver', class {
observe = vi.fn()
disconnect = vi.fn()
unobserve = vi.fn()
constructor() {
resizeObserverInstances.push(this)
}
})
vi.spyOn(Element.prototype, 'getBoundingClientRect').mockReturnValue({
height: 200, width: 200, top: 0, left: 0, right: 0, bottom: 0, x: 0, y: 0, toJSON: () => undefined,
} as DOMRect)
@@ -32,10 +32,10 @@ function createTestComponent(onCloseFn: () => void) {
}
describe('useModalKeyboard', () => {
let closeFn: ReturnType<typeof vi.fn>
let closeFn: ReturnType<typeof vi.fn<() => void>>
beforeEach(() => {
closeFn = vi.fn()
closeFn = vi.fn<() => void>()
})
it('calls onClose when Escape is pressed and modal is open', async () => {
@@ -69,7 +69,10 @@ vi.mock('../discover/curatedApps', () => ({
describe('Marketplace tracer tab: background refresh failure (D-07)', () => {
beforeEach(() => {
vi.stubGlobal('ResizeObserver', vi.fn(() => ({ observe: vi.fn(), disconnect: vi.fn() })))
vi.stubGlobal('ResizeObserver', class {
observe = vi.fn()
disconnect = vi.fn()
})
routerPushMock.mockClear()
toastErrorMock.mockClear()
toastInfoMock.mockClear()
@@ -37,7 +37,10 @@ function setGeometry(
describe('OnboardingSeedGenerate scroll cue (UIFIX-03)', () => {
beforeEach(() => {
vi.stubGlobal('ResizeObserver', vi.fn(() => ({ observe: vi.fn(), disconnect: vi.fn() })))
vi.stubGlobal('ResizeObserver', class {
observe = vi.fn()
disconnect = vi.fn()
})
vi.mocked(rpcClient.call).mockReset()
Element.prototype.scrollIntoView = vi.fn()
})
@@ -41,10 +41,10 @@ vi.mock('@/composables/useDemoIntro', () => ({ IS_DEMO: false }))
// mocked at the module boundary, mirroring MarketplaceRefresh.test.ts's
// convention for isolating a view from its heavier dependencies.
vi.mock('@/services/contextBroker', () => ({
ContextBroker: vi.fn().mockImplementation(() => ({
start: vi.fn(),
stop: vi.fn(),
})),
ContextBroker: class {
start = vi.fn()
stop = vi.fn()
},
}))
/** Mount Chat.vue behind a real <KeepAlive> so onActivated/onDeactivated fire. */