test: cover the gaps left by the audit
I maintainer di solito rispondono entro 17 giorni
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 55/100
Direzione di ricerca
Start with MockConfigRepositoryTest.kt, RequestMatcherTest.kt, NetworkMockPluginTest.kt, and EndpointCardTest.kt to follow the repository's commonTest, androidDeviceTest, and androidHostTest conventions. Check epic #72 before duplicating coverage, then add focused tests for the listed repository, UI, sample-config, and plugin gaps. Done means each gap is covered or explicitly recorded as already covered.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
A grab-bag of test coverage gaps identified while auditing the networkmock family, independent of the OpenAPI migration (tracked in the epic, #72). Each bullet below is independently addressable — feel free to split into separate PRs (or separate issues) rather than doing all of them at once; this issue exists to record them so they aren't lost, not to mandate one big PR.
Gaps
- Delay precedence —
Operation.delayMs ?: group.defaultDelayMsresolution (devview-networkmock-core/src/commonMain/kotlin/com/worldline/devview/networkmock/core/repository/MockConfigRepository.kt:366) has no dedicated test asserting the precedence order (operation-level delay wins, falls back to group default, falls back to no delay). - Ambiguous-match precedence — if two groups' configured hosts both match an incoming request's hostname,
findMatchingMock(repository/MockConfigRepository.kt:304-374) returns whichever is declared first, with no test pinning this down. (If #2 has landed by the time this is picked up, this is likely already covered there — check before duplicating.) NetworkMockEndpointScreenhas zero tests — no coverage exists for the sticky-header status-family grouping (devview-networkmock/src/commonMain/kotlin/com/worldline/devview/networkmock/NetworkMockEndpointScreen.kt:119-121,:234-278), the "No mock" row (:208-225), or response-row selection (:244-262).- Preview/diff bottom sheet has zero tests —
NetworkMockEndpointPreviewBottomSheet.ktand the diff rendering pipeline it drives (utils/DiffLineUtils.kt) have no test coverage, despitePreviewSheetStateitself (the state machine) being tested inPreviewSheetStateTest.kt. - No test loads the real sample
mocks.json(or, post-migration, the real sample spec) — every existing config-loading test uses hand-built fixture data (MockTestData.kt), so the shipped sample can silently drift out of sync with what the parser actually accepts. Add a test that loadssample/network/src/commonMain/composeResources/files/networkmocks/mocks.json(or its post-migration equivalent) through the real repository and asserts it parses successfully. queryParams/queryParametersmatching through the Ktor plugin —RequestMatcherTest.ktcoversmatchesQueryParamsin isolation thoroughly, butNetworkMockPluginTest.kt(devview-networkmock-ktor/src/androidHostTest/...) has no end-to-end test exercising query-param matching through the actual plugin interception path.- No assertion on response headers/content-type in
NetworkMockPluginTest.kt— existing tests check status and body but not thatContent-Type: application/jsonis actually present on the synthetic response.
Acceptance criteria
- Each gap above has at least one new test closing it, or is explicitly noted as already covered by a different in-flight PR (to avoid duplicate work — check the epic #72 for what's landed).
- New tests follow this repo's existing conventions:
commonTest+ JVM for repository/matcher logic (seeRequestMatcherTest.kt,MockConfigRepositoryTest.ktfor style),androidDeviceTest+ fakes for Compose UI (seeEndpointCardTest.ktfor style),androidHostTest+ MockK for the Ktor plugin (seeNetworkMockPluginTest.ktfor style).
Files likely touched
devview-networkmock-core/src/commonTest/kotlin/com/worldline/devview/networkmock/core/repository/MockConfigRepositoryTest.ktdevview-networkmock/src/androidDeviceTest/kotlin/com/worldline/devview/networkmock/...(new test files for the endpoint screen and preview sheet)devview-networkmock-ktor/src/androidHostTest/kotlin/com/worldline/devview/networkmock/ktor/plugin/NetworkMockPluginTest.kt
- Lingua principale
- Kotlin
- Stelle
- 11
- Fork
- 3
- Merge medio
- 10g 9h
- PR unite (30g)
- 18
Preparare l'ambiente
Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di worldline/devview
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
worldline/devview#99 · 4 commenti ·
I maintainer di solito rispondono entro 17 giorni
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 45/100
worldline/devview#97 · 4 commenti ·
I maintainer di solito rispondono entro 17 giorni
-
enhancement
Difficoltà 4/5 3-5 giorni Idoneità per principianti 48/100
worldline/devview#95 · 4 commenti ·
I maintainer di solito rispondono entro 17 giorni
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 25/100
worldline/devview#85 · 3 commenti ·
I maintainer di solito rispondono entro 17 giorni
-
enhancement
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
worldline/devview#84 · 3 commenti ·
I maintainer di solito rispondono entro 17 giorni
Tutte le issue di worldline/devview
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 64/100
utopia-rise/godot-jvm#1004 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
ankidroid/Anki-Android#22408 ·
I maintainer di solito rispondono entro 1 giorno
-
enhancement
Difficoltà 2/5 Meno di un'ora Idoneità per principianti 72/100
afarber/OpenMapView#22 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 65/100
nightscout/AndroidAPS#5245 ·
I maintainer di solito rispondono entro 1 giorno