test: add deterministic resilience matrix

This commit is contained in:
2026-09-02 07:24:48 +03:00
parent 5abd1c19ae
commit 8089d061ec
21 changed files with 809 additions and 22 deletions

View File

@@ -1,6 +1,10 @@
<script setup lang="ts">
import { computed, nextTick, onUnmounted, ref, shallowRef, watch } from 'vue';
import { useLazyMedia } from '@/composables/useLazyMedia';
import { isTestFault, recordTestFaultEvent } from '@/testing/fault-hooks';
declare const __PORTFOLIO_TEST_BUILD__: boolean;
const TEST_BUILD = typeof __PORTFOLIO_TEST_BUILD__ !== 'undefined' && __PORTFOLIO_TEST_BUILD__;
export interface AccessibleVideoSource {
src: string;
@@ -64,6 +68,11 @@ const markUnavailable = (): void => {
const play = async (): Promise<void> => {
if (unavailable.value) return;
if (TEST_BUILD && isTestFault('F8-video-failure')) {
recordTestFaultEvent('video-failure');
markUnavailable();
return;
}
lazy.requestExplicit();
status.value = 'Loading video.';
await nextTick();