Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Snackbar in Compose with Friendly UI Testing
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Somkiat Khitwongwattana
September 23, 2025
Technology
0
200
Snackbar in Compose with Friendly UI Testing
A guide to creating and testing Snackbar in Jetpack Compose, with a focus on friendly UI testing.
Somkiat Khitwongwattana
September 23, 2025
Tweet
Share
More Decks by Somkiat Khitwongwattana
See All by Somkiat Khitwongwattana
Gemini in Android Studio - Google I/O Bangkok '25
akexorcist
0
420
Adopting Jetpack Compose in Your Existing Project - GDG DevFest Bangkok 2024
akexorcist
0
220
Why App Signing Matters for Your Android Apps - Android Bangkok Conference 2024
akexorcist
1
700
Building the automated Android UI testing in Continuous integration at LINE MAN Wongnai
akexorcist
1
880
Building the automated Android UI testing in Continuous integration at LINE MAN Wongnai
akexorcist
1
87
What's new in Android 14 - IO Extended George Town 2023
akexorcist
1
380
All you need to know about new Logcat in Android Studio - DevFest Bangkok 2022
akexorcist
0
100
Backend for mobile app - Droidcon SG 2022
akexorcist
0
110
Backend for mobile app - Android Bangkok Conference 2022
akexorcist
1
200
Other Decks in Technology
See All in Technology
visionOS 開発向けの MCP / Skills をつくり続けることで XR の探究と学習を最大化
karad
1
1.2k
FastMCP OAuth Proxy with Cognito
hironobuiga
3
120
スピンアウト講座02_ファイル管理
overflowinc
0
980
生成AI活用でQAエンジニアにどのような仕事が生まれるか/Support Required of QA Engineers for Generative AI
goyoki
1
360
Tebiki Engineering Team Deck
tebiki
0
27k
20260321_エンベディングってなに?RAGってなに?エンベディングの説明とGemini Embedding 2 の紹介
tsho
0
150
JEDAI認定プログラム JEDAI Order 2026 受賞者一覧 / JEDAI Order 2026 Winners
databricksjapan
0
240
事例から紐解くSHIFT流QA支援 ~大規模プロジェクトの品質管理支援、QA組織立ち上げ~ / 20260320 Nozomu Koketsu
shift_evolve
PRO
0
130
Phase08_クイックウィン実装
overflowinc
0
1.3k
Escape from Excel方眼紙 ~マークダウンで繋ぐ、人とAIの架け橋~ /nikkei-tech-talk44
nikkei_engineer_recruiting
0
170
1GB RAMのラズピッピで何ができるのか試してみよう / 20260319-rpijam-1gb-rpi-whats-possible
akkiesoft
0
790
TypeScript 7.0の現在地と備え方
uhyo
7
2k
Featured
See All Featured
Lightning talk: Run Django tests with GitHub Actions
sabderemane
0
150
Optimising Largest Contentful Paint
csswizardry
37
3.6k
The browser strikes back
jonoalderson
0
820
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
38
2.8k
SEO Brein meetup: CTRL+C is not how to scale international SEO
lindahogenes
1
2.5k
Visualization
eitanlees
150
17k
So, you think you're a good person
axbom
PRO
2
2k
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Scaling GitHub
holman
464
140k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
200
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.6k
The Curious Case for Waylosing
cassininazir
0
270
Transcript
Snackbar in Compose with Friendly UI Testing Somkiat Khitwongwattana Staff
Software Engineer (Android) @ LINE MAN Wongnai
Hello Compose Multiplatform! OK
None
None
None
None
None
1 2 3 4
None
None
1 2 3 Expect Actual
None
Any Solution?
Any Solution? • Remove Snackbar message verification
Any Solution? • Remove Snackbar message verification • Create a
Snackbar controller & container for UI testing
What Controller & Container Do? • Enforce indefinite duration during
UI testing • Manually dismiss using code in UI testing
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
None
Dismiss Snackbar by code Dismiss Snackbar by code
SnackbarContainer Recap SnackbarUiTest Controller SnackbarHostState Provider androidTest Store the SnackbarHostState
that's created while the app is running, so it can be dismissed in a UI test. Inject the SnackbarHostState into the SnackbarUiTestController using Java Reflection Override the duration to be indefinite when running under UI test. main main
Recap App SnackbarHostState Provider SnackbarContainer UI Test SnackbarUiTest Controller Inject
SnackbarHostState Dismiss Snackbar
Caution • Do not expose your test code to production
environments, especially in a multi-module project • Avoid unexpected Snackbar behavior in complex UI
Thank you Presentation Link