diff --git a/.github/workflows/lightsaber-ci.yml b/.github/workflows/lightsaber-ci.yml index 1460461..96fe9d8 100644 --- a/.github/workflows/lightsaber-ci.yml +++ b/.github/workflows/lightsaber-ci.yml @@ -123,12 +123,9 @@ jobs: - uses: actions/checkout@v3 - uses: ./.github/actions/setup-lightsaber-ci - - # TODO Run e2e tests when Compose Multiplatform supports either Compose test tags or - # accessibility labels - name: Check for app file run: test -e ./iosApp/build/ios/Release-iphonesimulator/Lightsaber.app -# - uses: mobile-dev-inc/action-maestro-cloud@v1.1.0 -# with: -# api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }} -# app-file: ./iosApp/build/ios/Release-iphonesimulator/Lightsaber.app \ No newline at end of file + - uses: mobile-dev-inc/action-maestro-cloud@v1.1.0 + with: + api-key: ${{ secrets.MAESTRO_CLOUD_API_KEY }} + app-file: ./iosApp/build/ios/Release-iphonesimulator/Lightsaber.app \ No newline at end of file diff --git a/shared/src/iosMain/kotlin/xyz/alaniz/aaron/lightsaber/main.ios.kt b/shared/src/iosMain/kotlin/xyz/alaniz/aaron/lightsaber/main.ios.kt index 4679abf..3ad3c5f 100644 --- a/shared/src/iosMain/kotlin/xyz/alaniz/aaron/lightsaber/main.ios.kt +++ b/shared/src/iosMain/kotlin/xyz/alaniz/aaron/lightsaber/main.ios.kt @@ -1,5 +1,7 @@ package xyz.alaniz.aaron.lightsaber +import androidx.compose.runtime.ExperimentalComposeApi +import androidx.compose.ui.platform.AccessibilitySyncOptions import androidx.compose.ui.window.ComposeUIViewController import kotlinx.cinterop.ExperimentalForeignApi import platform.Foundation.NSDocumentDirectory @@ -11,8 +13,21 @@ import xyz.alaniz.aaron.lightsaber.di.create import xyz.alaniz.aaron.lightsaber.di.dataStoreFileName import xyz.alaniz.aaron.lightsaber.ui.lightsaber.IosLightsaberScreen -@OptIn(ExperimentalForeignApi::class) -fun MainViewController() = ComposeUIViewController { +@OptIn(ExperimentalForeignApi::class, ExperimentalComposeApi::class) +fun MainViewController() = ComposeUIViewController(configure = { + /** + * TODO Update this to only sync the accessibility tree for debug builds + */ + accessibilitySyncOptions = AccessibilitySyncOptions.Always(debugLogger = null) + + /** + * TODO Understand why this needs to be false for Maestro tests to pass + * + * The default value for this is true, but then the accessibility tree mappings include an + * offset for the status bar + */ + platformLayers = false +}) { val documentDirectory: NSURL? = NSFileManager.defaultManager.URLForDirectory( directory = NSDocumentDirectory, inDomain = NSUserDomainMask,