Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Splash screen shows when running composable tests #1396

Open
3 tasks done
paetztm opened this issue Apr 24, 2024 · 1 comment
Open
3 tasks done

[Bug]: Splash screen shows when running composable tests #1396

paetztm opened this issue Apr 24, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@paetztm
Copy link

paetztm commented Apr 24, 2024

Is there an existing issue for this?

  • I have searched the existing issues

Is there a StackOverflow question about this issue?

  • I have searched StackOverflow

What happened?

A bug happened!

When running UI Composable tests, the Splash Screen is displayed. To see this happen, run any test in NavigationUiTest.kt.

Screen shot for when running NavigationUiTest.compactWidth_compactHeight_showsNavigationBar() test:
image

Expected results:
Splash screen theme should not be shown when running compose UI tests. Instead, only the composable within composeTestRule.setContent should be displayed.

Relevant logcat output

No response

Code of Conduct

  • I agree to follow this project's Code of Conduct
@paetztm paetztm added the bug Something isn't working label Apr 24, 2024
@paetztm
Copy link
Author

paetztm commented Apr 24, 2024

Looks like a solution/work around is to set the splash theme at the activity level instead of the application level in AndroidManifest.xml.

Application theme changed from:
android:theme="@style/Theme.Nia.Splash"
to:
android:theme="@style/Theme.Nia"

And adding:
android:theme="@style/Theme.Nia.Splash"
to .MainActivity

Seems to fix the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant