Repository navigation
Test that a ground image survives a map design change - #15
Merged
Merged
Conversation
Instrumented: a real MapView loads two local style documents through setMapDesignType, and the ground image is checked in the new style (unchanged image, same design set again, removal after the change). The styles have no sources, so a placeholder access token is enough. Android is not affected by the iOS bug (ios-for-maplibre#12): the style-loaded subscription calls groundImageController.reapplyStyle(). Removing that call makes all three fail.
CI builds the repository on its own, against gradle/libs.versions.toml here, which had no androidx-runner or ui-test entries; they resolved only in the android-sdk monorepo's catalog the tests were first built with. Compose test artifacts follow this repo's composeLibs (1.12.1).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
何のための PR か
iOS で「地表画像を表示したまま地図デザインを変えると画像が消える」不具合があった(MapConductor/ios-for-maplibre#12、Mapbox は MapConductor/ios-for-mapbox#10)。Android でも同じことが起きないかを、実物の地図で確かめる回帰テストを足す。コードの変更はなく、テストだけ。
Android は影響なし
setMapDesignType→loadStyleの後、スタイル読み込みの購読(subscribeStyleLoaded)がgroundImageController.reapplyStyle()で全部の地表画像を作り直している。テスト
MapboxGroundImageStyleChangeTest(androidTest、新規): 実物のMapViewに、ソースを持たないローカルのスタイル文書を 2 つ読み込ませ、state.mapDesignTypeで切り替える。ソースが無いので何も取りに行かず、本物のアクセストークンは要らない(sdkInitializeでダミーを渡している)。anUnchangedGroundImageIsInTheNewStyle— 状態を変えずにデザインだけ替えても、新しいスタイルにソースとレイヤがあるtheSameDesignSetAgainKeepsTheImage— 同じデザインをもう一度設定しても画像が残るaGroundImageRemovedAfterTheChangeLeavesTheNewStyle— 替えた後に消すと新しいスタイルから消えるbuild.gradle.ktsに androidTest 用の依存(runner、compose ui-test-junit4、debug の ui-test-manifest)を追加。確認
connectedDebugAndroidTest: 3 件すべて成功groundImageController.reapplyStyle()を一時的に外すと 3 件すべて失敗する(元に戻してある)