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
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
Astro Islandsの 内部実装を 「日本で一番わかりやすく」 ざっくり解説!
knj
0
210
「コントロールの三分法」で考える「コト」への向き合い方 / phperkaigi2026
blue_goheimochi
0
130
Blue/Green Deployment を用いた PostgreSQL のメジャーバージョンアップ
kkato1
0
100
Phase04_ターミナル基礎
overflowinc
0
1.8k
Visional 28新卒プロダクト職(エンジニア/デザイナー)向け 会社説明資料 / Visional Company Briefing for Newgrads 28
visional_engineering_and_design
1
120
ABEMAのバグバウンティの取り組み
kurochan
1
390
スケールアップ企業でQA組織が機能し続けるための組織設計と仕組み〜ボトムアップとトップダウンを両輪としたアプローチ〜
tarappo
4
330
JEDAI認定プログラム JEDAI Order 2026 受賞者一覧 / JEDAI Order 2026 Winners
databricksjapan
0
240
夢の無限スパゲッティ製造機 #phperkaigi
o0h
PRO
0
340
Phase01_AI座学_基礎
overflowinc
0
3.1k
GitHub Copilot CLI で Azure Portal to Bicep
tsubakimoto_s
0
180
【Data Superhero セッション 】 Snowflake基盤を途中からIaC化する:Terraform × Terragrunt × 環境分離設計
ktatsuya
0
100
Featured
See All Featured
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
2
180
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3.3k
Building Applications with DynamoDB
mza
96
7k
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
150
Claude Code のすすめ
schroneko
67
220k
How to Talk to Developers About Accessibility
jct
2
160
Are puppies a ranking factor?
jonoalderson
1
3.1k
Building Experiences: Design Systems, User Experience, and Full Site Editing
marktimemedia
0
450
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
240
Ten Tips & Tricks for a 🌱 transition
stuffmc
0
91
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
330
Stop Working from a Prison Cell
hatefulcrawdad
274
21k
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