Repository Public
1/**2 * =============================================================================3 * SP BOUCHER | SOFTWARE & RESEARCH4 * ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING5 * =============================================================================6 *7 * PROJECT METADATA8 * -----------------------------------------------------------------------------9 * Project : Valo-Plex Android10 * File : app/src/androidTest/kotlin/com/spboucher/valoplex/CarteSurAppareilTest.kt11 * Description : épreuves de la carte KA Maps sur appareil (émulateur),12 * contre l'API de production en lecture seule : vrais13 * bâtiments teintés, toucher, plan et 3D, secteurs sans14 * recouvrement, plex à vendre, rotation, arrière-plan, carte15 * de la fiche, lien entrant sur l'app ouverte, backend16 * OpenGL ES.17 * Module : androidTest18 * Repository : https://git.spboucher.ai/valo-plex-android19 * Project Website : https://www.valo-plex.com20 * Created : 2026-12-0121 * Last Modified : 2026-12-0122 *23 * =============================================================================24 * AUTHOR & PROFESSIONAL AFFILIATION25 * =============================================================================26 *27 * Author : Simon-Pierre Boucher28 * Position : Professor of Finance29 * Institution : Université du Québec en Outaouais (UQO)30 * Department : Département des sciences administratives31 * Organization : SP Boucher32 *33 * Website : https://spboucher.ai34 * Git : https://git.spboucher.ai35 *36 * =============================================================================37 * OFFICIAL CONTACT DIRECTORY38 * =============================================================================39 *40 * General : info@spboucher.ai41 * Professional : contact@spboucher.ai42 * Direct : simon@spboucher.ai43 * Research : research@spboucher.ai44 * Development : dev@spboucher.ai45 * Support : support@spboucher.ai46 * Security/Admin : admin@spboucher.ai47 * Notifications : notifications@spboucher.ai48 *49 * Preferred Contact: contact@spboucher.ai50 *51 * =============================================================================52 * COPYRIGHT & INTELLECTUAL PROPERTY53 * =============================================================================54 *55 * Copyright (c) 202656 * Simon-Pierre Boucher57 *58 * All rights reserved where applicable.59 *60 * This file is governed by the applicable project license,61 * copyright notices, institutional agreements and relevant law.62 *63 * Unless expressly authorized by the applicable license or64 * rights holder, copying, redistribution, sublicensing,65 * publication and commercial exploitation are not permitted.66 *67 * Existing third-party rights and notices remain unaffected.68 *69 * =============================================================================70 * CONFIDENTIALITY & SECURITY71 * =============================================================================72 *73 * Classification : Public74 * Distribution : Public repository; use is governed by the project license75 * Security Contact : admin@spboucher.ai76 *77 * Access to this source does not independently grant permission78 * to redistribute or disclose confidential materials.79 *80 * Do not embed credentials, private keys, access tokens,81 * certificates or confidential personal information.82 *83 * =============================================================================84 * LICENSE & MAINTENANCE85 * =============================================================================86 *87 * License : None specified (no license file in this repository)88 * Maintainer : Simon-Pierre Boucher89 * Technical Contact: dev@spboucher.ai90 *91 * =============================================================================92 * END OF SP BOUCHER SOURCE HEADER93 * =============================================================================94 */9596package com.spboucher.valoplex9798import ai.spboucher.kamaps.KaCamera99import ai.spboucher.kamaps.KaDrawnItem100import ai.spboucher.kamaps.KaMapController101import ai.spboucher.kamaps.KaMode102import ai.spboucher.kamaps.LngLat103import android.content.Intent104import android.net.Uri105import androidx.test.core.app.ActivityScenario106import androidx.test.ext.junit.runners.AndroidJUnit4107import androidx.test.platform.app.InstrumentationRegistry108import androidx.test.uiautomator.By109import androidx.test.uiautomator.UiDevice110import androidx.test.uiautomator.Until111import com.spboucher.valoplex.ui.TemoinCarte112import org.junit.After113import org.junit.Assert.assertEquals114import org.junit.Assert.assertNotNull115import org.junit.Assert.assertNull116import org.junit.Assert.assertTrue117import org.junit.Before118import org.junit.FixMethodOrder119import org.junit.Test120import org.junit.runner.RunWith121import org.junit.runners.MethodSorters122123@RunWith(AndroidJUnit4::class)124@FixMethodOrder(MethodSorters.NAME_ASCENDING)125class CarteSurAppareilTest {126 private val instr = InstrumentationRegistry.getInstrumentation()127 private val appareil: UiDevice = UiDevice.getInstance(instr)128 private val densite get() = instr.targetContext.resources.displayMetrics.density129 private var scene: ActivityScenario<MainActivity>? = null130131 private fun ouvrir(lien: String) {132 scene?.close()133 TemoinCarte.controleur = null; TemoinCarte.moteur = null; TemoinCarte.chargee = false; TemoinCarte.rattachement = null; TemoinCarte.choix = null134 TemoinCarte.controleurFiche = null; TemoinCarte.ficheChargee = false; TemoinCarte.pointFiche = null; TemoinCarte.pannes = 0135 scene = ActivityScenario.launch(Intent(Intent.ACTION_VIEW, Uri.parse(lien)).setClass(instr.targetContext, MainActivity::class.java))136 }137138 @Before fun avant() { TemoinCarte.backend = null }139 @After fun apres() { scene?.close(); scene = null; TemoinCarte.backend = null; appareil.setOrientationNatural(); appareil.unfreezeRotation() }140141 private fun attendre(quoi: String, ms: Long = 30_000, condition: () -> Boolean) {142 val fin = System.currentTimeMillis() + ms143 while (System.currentTimeMillis() < fin) { if (condition()) return; Thread.sleep(150) }144 throw AssertionError("attente dépassée : $quoi (rattachement ${TemoinCarte.rattachement?.toList()}, choix ${TemoinCarte.choix}, toucher ${TemoinCarte.dernierToucher})")145 }146147 private fun <T> surLeFilPrincipal(f: () -> T): T { var r: T? = null; instr.runOnMainSync { r = f() }; @Suppress("UNCHECKED_CAST") return r as T }148 private fun carte(): KaMapController = TemoinCarte.controleur ?: throw AssertionError("aucune carte")149 private fun couches(): List<String> = surLeFilPrincipal { carte().layerIds() }150 private fun camera() = surLeFilPrincipal { carte().getCamera() }151152 private fun attendreLaCarte() {153 attendre("moteur prêt") { TemoinCarte.controleur != null && TemoinCarte.moteur != null }154 attendre("première vue chargée", 45_000) { TemoinCarte.chargee }155 // la marque animée d'ouverture (1,2 s, puis son fondu) couvre l'écran et prend les touchers156 Thread.sleep(2200)157 }158159 private fun attendreLesBatiments() {160 attendre("couche des bâtiments") { Couches.BATIS in couches() }161 // bilan final du moteur (dedans, proches, sans empreinte, au delà de la zone dessinée, bâtiments, partagés, final)162 attendre("plex rattachés aux empreintes", 45_000) { TemoinCarte.rattachement?.let { it[6] == 1 && it[0] + it[1] > 0 } == true }163 }164165 /** Toucher un point de la carte donné en pixels logiques de la carte. */166 private fun toucher(x: Double, y: Double) {167 appareil.click((TemoinCarte.origineX + x * densite).toInt(), (TemoinCarte.origineY + y * densite).toInt())168 }169170 /** Premier point d'une grille posée sur la carte où le moteur rend une entité de cette couche (hors des bords et du bas). */171 private fun trouver(couche: String, basLibre: Double = 0.75): Pair<Double, Double>? {172 val l = TemoinCarte.largeur / densite; val h = TemoinCarte.hauteur / densite173 return surLeFilPrincipal {174 var trouve: Pair<Double, Double>? = null175 var y = h * 0.15176 while (trouve == null && y < h * basLibre) {177 var x = l * 0.12178 while (trouve == null && x < l * 0.88) {179 if (carte().queryRendered(x, y, listOf(couche)).any { it.source == "app" && it.layer == couche }) trouve = x to y180 x += 9181 }182 y += 9183 }184 trouve185 }186 }187188 private fun objet(texte: String) = appareil.wait(Until.findObject(By.text(texte)), 10_000) ?: throw AssertionError("« $texte » introuvable à l'écran")189190 private fun dessines(couche: String): List<KaDrawnItem> = surLeFilPrincipal { carte().queryLayer(couche) }191192 @Test fun t01_vraisBatimentsTeintes() {193 ouvrir("valoplex://carte")194 attendreLaCarte()195 val moteur = TemoinCarte.moteur!!196 assertTrue("backend ${moteur.backend}", moteur.backend == "vulkan" || moteur.backend == "gles")197 attendreLesBatiments()198 val bilan = TemoinCarte.rattachement!!199 // la grande majorité des plex du Plateau trouvent leur vraie empreinte ; aucun volume n'est ajouté200 assertTrue("dedans ${bilan[0]}, proches ${bilan[1]}, sans ${bilan[2]}", bilan[0] + bilan[1] > 100 && bilan[2] < (bilan[0] + bilan[1]) / 4)201 assertEquals(KaMode.THREE_D, surLeFilPrincipal { carte().mode.value })202 assertTrue(camera().pitch > 40)203 assertNotNull("un bâtiment teinté sous la grille", trouver(Couches.BATIS))204 // la mention des sources est un élément de la carte, lu par les lecteurs d'écran205 assertTrue(appareil.wait(Until.hasObject(By.textContains("OpenStreetMap")), 5_000) || appareil.hasObject(By.descContains("OpenStreetMap")))206 // des bâtiments abritent plusieurs plex : le moteur les compte (teinte à la médiane)207 assertTrue("bâtiments ${bilan[4]}, plex partageant leur bâtiment ${bilan[5]}", bilan[4] > 100 && bilan[5] > 0)208 }209210 @Test fun t02_toucherUnBatiment() {211 ouvrir("valoplex://carte")212 attendreLaCarte(); attendreLesBatiments()213 val (x, y) = trouver(Couches.BATIS, basLibre = 0.5)!!214 TemoinCarte.dernierToucher = "visé ${x.toInt()},${y.toInt()}"215 toucher(x, y)216 attendre("panneau de l'immeuble") { TemoinCarte.choix != null }217 assertTrue(appareil.wait(Until.hasObject(By.text("Ouvrir la fiche")), 5_000))218 Thread.sleep(600)219 // le panneau est entier (son bouton n'est pas coupé), quelle que soit la taille de l'écran220 val bouton = appareil.findObject(By.text("Ouvrir la fiche")).visibleBounds221 assertTrue("bouton coupé : ${bouton.height()} px", bouton.height() >= 17 * densite)222 // la provenance de la hauteur du volume est dite (jamais « mesurée » sans l'être)223 assertTrue(appareil.hasObject(By.textContains("Volume du bâtiment sur la carte")))224 objet("FERMER").click()225 attendre("panneau fermé") { TemoinCarte.choix == null }226 }227228 @Test fun t03_planEt3D() {229 ouvrir("valoplex://carte")230 attendreLaCarte(); attendreLesBatiments()231 objet("Plan").click()232 attendre("carte à plat") { camera().pitch < 1.0 && Couches.POINTS in couches() }233 assertEquals(KaMode.TWO_D, surLeFilPrincipal { carte().mode.value })234 assertTrue(kotlin.math.abs(camera().bearing) < 1.0)235 assertNotNull("bâtiment teinté à plat", trouver(Couches.BATIS))236 objet("3D").click()237 attendre("carte en volumes") { camera().pitch > 50.0 && Couches.POINTS !in couches() }238 assertEquals(KaMode.THREE_D, surLeFilPrincipal { carte().mode.value })239 }240241 private fun seCoupent(a: KaDrawnItem, b: KaDrawnItem) =242 a.rect.left < b.rect.right && b.rect.left < a.rect.right && a.rect.top < b.rect.bottom && b.rect.top < a.rect.bottom243244 @Test fun t04_secteursSansRecouvrement() {245 ouvrir("valoplex://carte?lat=45.53&lng=-73.60&z=12.3")246 attendreLaCarte()247 attendre("étiquettes des secteurs") { Couches.CASES in couches() && dessines(Couches.CASES).isNotEmpty() }248 Thread.sleep(1500)249 val l = TemoinCarte.largeur / densite; val h = TemoinCarte.hauteur / densite250 // les étiquettes écrites (le moteur dit lesquelles : `isPill`) ne se recouvrent pas et ne se posent pas sur la mention des sources251 val etiquettes = dessines(Couches.CASES).filter { it.isPill }252 assertTrue("étiquettes : ${etiquettes.size}", etiquettes.size >= 3)253 fun r(e: KaDrawnItem) = "${e.label} [${e.rect.left.toInt()},${e.rect.top.toInt()},${e.rect.right.toInt()},${e.rect.bottom.toInt()}]"254 for (i in etiquettes.indices) for (j in i + 1 until etiquettes.size) assertTrue("recouvrement ${r(etiquettes[i])} / ${r(etiquettes[j])}", !seCoupent(etiquettes[i], etiquettes[j]))255 val mention = appareil.findObject(By.textContains("OpenStreetMap"))?.visibleBounds256 assertNotNull("mention des sources dans l'arbre d'accessibilité", mention)257 val ml = (mention!!.left - TemoinCarte.origineX) / densite; val mt = (mention.top - TemoinCarte.origineY) / densite258 val mr = (mention.right - TemoinCarte.origineX) / densite; val mb = (mention.bottom - TemoinCarte.origineY) / densite259 assertTrue("étiquette sur la mention des sources", etiquettes.none { it.rect.left < mr && it.rect.right > ml && it.rect.top < mb && it.rect.bottom > mt })260 assertTrue(etiquettes.all { it.label!!.endsWith("k$") || it.label!!.endsWith("M$") || it.label == "n. d." })261 assertTrue("étiquette coupée par le cadre", etiquettes.all { it.rect.left >= -0.5 && it.rect.top >= -0.5 && it.rect.right <= l + 0.5 && it.rect.bottom <= h + 0.5 })262 // toucher un secteur rapproche la carte263 val avant = camera().zoom264 val e = etiquettes.first { it.rect.centerY < h * 0.8 && it.rect.centerX > 30 && it.rect.centerX < l - 30 }265 toucher(e.rect.centerX, e.rect.centerY)266 attendre("rapprochement") { camera().zoom > avant + 1.5 }267 }268269 @Test fun t05_plexAVendreDeLoin() {270 ouvrir("valoplex://carte?lat=45.53&lng=-73.60&z=11.5")271 attendreLaCarte()272 objet("À vendre seulement").click()273 attendre("étiquettes des plex à vendre") { Couches.VENDRE in couches() && dessines(Couches.VENDRE).isNotEmpty() }274 Thread.sleep(1500)275 val h = TemoinCarte.hauteur / densite; val l = TemoinCarte.largeur / densite276 val tout = dessines(Couches.VENDRE)277 // grappes et étiquettes : aucune ne recouvre l'autre, aucune n'est coupée par le cadre278 val plaques = tout.filter { it.isCluster || it.isPill }279 val grappes = tout.filter { it.isCluster }280 assertTrue("grappes : ${grappes.size}", grappes.isNotEmpty())281 for (i in plaques.indices) for (j in i + 1 until plaques.size) assertTrue("plaques qui se recouvrent", !seCoupent(plaques[i], plaques[j]))282 assertTrue("plaque coupée par le cadre", plaques.all { it.rect.left >= -0.5 && it.rect.top >= -0.5 && it.rect.right <= l + 0.5 && it.rect.bottom <= h + 0.5 })283 // toucher une grappe rapproche la carte284 val avant = camera().zoom285 val g = grappes.first { it.rect.centerY < h * 0.8 && it.rect.centerY > 20 && it.rect.centerX > 30 && it.rect.centerX < l - 30 }286 toucher(g.rect.centerX, g.rect.centerY)287 attendre("rapprochement") { camera().zoom > avant + 0.5 }288 // jusqu'à un plex seul (étiquette ou point vert) : le toucher ouvre le panneau, avec le prix demandé289 var seule: KaDrawnItem? = null290 for (essai in 0 until 7) {291 Thread.sleep(1800)292 seule = dessines(Couches.VENDRE).firstOrNull { !it.isCluster && it.id != null && it.rect.centerY < h * 0.5 && it.rect.centerY > 20 && it.rect.centerX > 30 && it.rect.centerX < l - 30 }293 if (seule != null) break294 val c = camera()295 if (c.zoom >= 14.4) break296 surLeFilPrincipal { carte().easeTo(KaCamera(zoom = minOf(14.4, c.zoom + 0.8)), 300) }297 }298 assertNotNull("un plex à vendre seul", seule)299 toucher(seule!!.rect.centerX, seule.rect.centerY)300 attendre("panneau du plex à vendre") { TemoinCarte.choix == seule.id }301 // l'étiquette choisie est dite sélectionnée au moteur302 assertEquals(seule.id, surLeFilPrincipal { carte().selected.value }?.id)303 assertTrue(appareil.wait(Until.hasObject(By.textContains("Demandé")), 5_000))304 }305306 @Test fun t06_rotation() {307 ouvrir("valoplex://carte")308 attendreLaCarte(); attendreLesBatiments()309 val generation = TemoinCarte.moteur!!.generation310 val centre = camera().center311 appareil.setOrientationLeft()312 attendre("carte tournée") { TemoinCarte.largeur > 0 && surLeFilPrincipal { carte().getBounds() } != null }313 Thread.sleep(2000)314 // même moteur (pas de recréation), même endroit315 assertEquals(generation, TemoinCarte.moteur!!.generation)316 assertEquals(centre.lat, camera().center.lat, 0.003); assertEquals(centre.lon, camera().center.lon, 0.003)317 appareil.setOrientationNatural()318 Thread.sleep(1500)319 assertNotNull(surLeFilPrincipal { carte().getBounds() })320 }321322 @Test fun t07_arrierePlanPuisRetour() {323 ouvrir("valoplex://carte")324 attendreLaCarte(); attendreLesBatiments()325 val centre = camera().center326 appareil.pressHome()327 Thread.sleep(2500)328 instr.targetContext.startActivity(Intent(instr.targetContext, MainActivity::class.java).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK or Intent.FLAG_ACTIVITY_REORDER_TO_FRONT))329 assertTrue(appareil.wait(Until.hasObject(By.text("Plan")), 10_000))330 attendre("carte de retour") { surLeFilPrincipal { TemoinCarte.controleur?.getBounds() } != null }331 assertEquals(centre.lat, camera().center.lat, 1e-4)332 assertNotNull("bâtiments toujours teintés", trouver(Couches.BATIS))333 }334335 @Test fun t08_lienEntrantSurLAppOuverte() {336 ouvrir("valoplex://carte")337 attendreLaCarte(); attendreLesBatiments()338 // un lien de carte arrive alors que l'onglet Carte est déjà à l'écran : la carte s'y rend, elle reste vivante339 instr.targetContext.startActivity(Intent(Intent.ACTION_VIEW, Uri.parse("valoplex://carte?lat=46.8139&lng=-71.2080&z=16.4")).setClass(instr.targetContext, MainActivity::class.java).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK))340 attendre("carte rendue à Québec", 20_000) { kotlin.math.abs(camera().center.lat - 46.8139) < 0.002 && kotlin.math.abs(camera().zoom - 16.4) < 0.1 }341 attendre("moteur vivant") { surLeFilPrincipal { carte().getBounds() } != null }342 attendre("plex de Québec rattachés", 45_000) { TemoinCarte.rattachement?.let { it[6] == 1 && it[0] + it[1] > 10 } == true }343 // toucher l'onglet déjà actif ne détruit pas la carte non plus344 objet("CARTE").click()345 Thread.sleep(1500)346 assertNotNull(surLeFilPrincipal { carte().getBounds() })347 }348349 @Test fun t09_carteDeLaFiche() {350 // 4073, rue Saint-Hubert (Montréal) : immeuble de la réponse réelle /carte relevée le 2026-12-01351 ouvrir("valoplex://immeuble/66023984295686720000000")352 assertTrue(appareil.wait(Until.hasObject(By.textContains("Saint-Hubert")), 30_000))353 val l = appareil.displayWidth; val h = appareil.displayHeight354 var vue = false355 for (essai in 0 until 60) {356 val o = appareil.findObject(By.descContains("Carte de l'immeuble"))357 if (o != null && o.visibleBounds.height() > 300 * densite && TemoinCarte.controleurFiche != null) { vue = true; break }358 // dans la marge de la page, à gauche de la carte : un glissement sur la carte la déplacerait au lieu de faire défiler359 appareil.swipe((9 * densite).toInt(), (h * 0.70).toInt(), (9 * densite).toInt(), (h * 0.40).toInt(), 12)360 Thread.sleep(350)361 }362 assertTrue("carte de la fiche à l'écran", vue)363 attendre("carte de la fiche chargée", 45_000) { TemoinCarte.ficheChargee }364 val c = TemoinCarte.controleurFiche!!365 assertEquals(setOf(Couches.REPERES, Couches.IMMEUBLES), surLeFilPrincipal { c.layerIds() }.toSet())366 val cam = surLeFilPrincipal { c.getCamera() }367 assertTrue(cam.zoom in Geo.FICHE_ZOOM_MIN - 0.01..Geo.FICHE_ZOOM_MAX + 0.01); assertTrue(cam.pitch > 45)368 // l'immeuble de la fiche est dans le cadre ; le toucher le nomme369 val p = surLeFilPrincipal { c.project(LngLat(-73.57464975159388, 45.52300158937743)) }370 assertNotNull("immeuble dans le cadre", p)371 Thread.sleep(2500)372 assertNull(TemoinCarte.pointFiche)373 appareil.click((TemoinCarte.ficheX + p!!.x * densite).toInt(), (TemoinCarte.ficheY + p.y * densite).toInt())374 attendre("point nommé") { TemoinCarte.pointFiche != null }375 assertTrue(TemoinCarte.pointFiche!!.contains("Saint-Hubert", ignoreCase = true))376 }377378 @Test fun t11_plusieursPlexDansUnBatiment() {379 ouvrir("valoplex://carte")380 attendreLaCarte(); attendreLesBatiments()381 // une rangée d'un seul tenant abrite plusieurs plex : le moteur les rend tous au toucher382 val l = TemoinCarte.largeur / densite; val h = TemoinCarte.hauteur / densite383 val point = surLeFilPrincipal {384 var trouve: Triple<Double, Double, Int>? = null385 var y = h * 0.12386 while (trouve == null && y < h * 0.5) {387 var x = l * 0.1388 while (trouve == null && x < l * 0.9) {389 val n = carte().queryRendered(x, y, listOf(Couches.BATIS)).firstOrNull { it.source == "app" && it.layer == Couches.BATIS }?.members?.distinct()?.size ?: 0390 if (n >= 2) trouve = Triple(x, y, n)391 x += 7392 }393 y += 7394 }395 trouve396 }397 assertNotNull("un bâtiment qui abrite plusieurs plex", point)398 toucher(point!!.first, point.second)399 attendre("panneau de l'immeuble") { TemoinCarte.choix != null }400 assertTrue(appareil.wait(Until.hasObject(By.textContains("DANS LE MÊME BÂTIMENT")), 5_000))401 }402403 @Test fun t12_filtresPendantUnGlisser() {404 ouvrir("valoplex://carte?lat=45.53&lng=-73.60&z=13.2")405 attendreLaCarte()406 attendre("secteurs") { Couches.CASES in couches() }407 // un service d'accessibilité est à l'écoute pendant l'épreuve (celui de l'automate d'essai)408 val am = instr.targetContext.getSystemService(android.content.Context.ACCESSIBILITY_SERVICE) as android.view.accessibility.AccessibilityManager409 assertTrue("service d'accessibilité à l'écoute", am.isEnabled)410 val generation = TemoinCarte.moteur!!.generation411 val x = (TemoinCarte.origineX + TemoinCarte.largeur * 0.5f).toInt(); val y0 = (TemoinCarte.origineY + TemoinCarte.hauteur * 0.75f).toInt(); val y1 = (TemoinCarte.origineY + TemoinCarte.hauteur * 0.25f).toInt()412 repeat(3) { tour ->413 // un doigt glisse lentement sur la carte (environ 3 s) pendant que le filtre « à vendre » bascule six fois414 val glisser = Thread { appareil.swipe(x, if (tour % 2 == 0) y0 else y1, x, if (tour % 2 == 0) y1 else y0, 600) }415 glisser.start()416 Thread.sleep(250)417 repeat(6) { k -> surLeFilPrincipal { TemoinCarte.basculerVendre!!.invoke(k % 2 == 0) }; Thread.sleep(380) }418 glisser.join(15_000)419 }420 surLeFilPrincipal { TemoinCarte.basculerVendre!!.invoke(false) }421 Thread.sleep(1500)422 // aucune panne du moteur, même moteur, carte toujours interrogeable et à jour423 assertEquals(0, TemoinCarte.pannes); assertEquals(generation, TemoinCarte.moteur!!.generation)424 assertNotNull(surLeFilPrincipal { carte().getBounds() })425 attendre("couches du dernier filtre") { Couches.VENDRE !in couches() }426 }427428 @Test fun t10_openGLES() {429 TemoinCarte.backend = "gles"430 ouvrir("valoplex://carte")431 TemoinCarte.backend = "gles"432 attendreLaCarte()433 assertEquals("gles", TemoinCarte.moteur!!.backend)434 attendreLesBatiments()435 val (x, y) = trouver(Couches.BATIS, basLibre = 0.5)!!436 TemoinCarte.dernierToucher = "visé ${x.toInt()},${y.toInt()}"437 toucher(x, y)438 attendre("panneau de l'immeuble") { TemoinCarte.choix != null }439 objet("Plan").click()440 attendre("carte à plat") { camera().pitch < 1.0 }441 }442}443