()
| 1050 | } |
| 1051 | |
| 1052 | async function waitForFixtureRegistration() { |
| 1053 | let lastError = null; |
| 1054 | for (let attempt = 1; attempt <= 12; attempt += 1) { |
| 1055 | try { |
| 1056 | const appContainer = runText( |
| 1057 | "xcrun", |
| 1058 | ["simctl", "get_app_container", simulatorUDID, fixtureBundleId], |
| 1059 | { timeoutMs: 60_000 }, |
| 1060 | ).trim(); |
| 1061 | if (appContainer.length > 0) { |
| 1062 | logStep(`fixture registered at ${appContainer}`); |
| 1063 | return appContainer; |
| 1064 | } |
| 1065 | } catch (error) { |
| 1066 | lastError = error; |
| 1067 | } |
| 1068 | await sleep(1_000); |
| 1069 | } |
| 1070 | throw new Error( |
| 1071 | `fixture app was not registered after install: ${summarizeError(lastError)}`, |
| 1072 | ); |
| 1073 | } |
| 1074 | |
| 1075 | function summarizeError(error) { |
| 1076 | return String(error?.message ?? error) |
nothing calls this directly
no test coverage detected