Commit abdfff7
ChatView / ChatInput screenshot tests: install the modern theme
Both tests previously extended `BaseTest`, which renders against
whatever theme is currently installed -- and that's the legacy
iOS 7 / Android Holo Light default. So the new ChatBubble*/
ChatInput* UIIDs I styled in `native-themes/{ios-modern,
android-material}/theme.css` never reached the rendered screenshot,
and the bubbles came out unstyled.
Switch both tests to `DualAppearanceBaseTest`, which is the existing
mechanism used by the other theme-fidelity tests
(SpanLabelThemeScreenshotTest, ButtonThemeScreenshotTest, etc.). It:
1. Installs the modern native theme via UIManager.setThemeProps
from the .res shipped alongside the test resources.
2. Drives two captures per test: `_light` (CN.isDarkMode()=false) and
`_dark` (true), refreshing the theme between them so the
prefers-color-scheme @media block lights up the $DarkChatBubble*
entries we already emit.
Same content (system + user + assistant + streaming + typing indicator
for ChatView, attach+voice+send for ChatInput), just routed through
the dual-appearance harness so the ChatBubble UIIDs actually render.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>1 parent 43e3044 commit abdfff7
2 files changed
Lines changed: 39 additions & 27 deletions
File tree
- scripts/hellocodenameone/common/src/main/java/com/codenameone/examples/hellocodenameone/tests
Lines changed: 18 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
8 | 7 | | |
| 8 | + | |
9 | 9 | | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
14 | 15 | | |
15 | 16 | | |
16 | | - | |
17 | | - | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
18 | 28 | | |
19 | 29 | | |
20 | 30 | | |
| |||
26 | 36 | | |
27 | 37 | | |
28 | 38 | | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
| 39 | + | |
34 | 40 | | |
35 | 41 | | |
Lines changed: 21 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
5 | | - | |
6 | 5 | | |
7 | 6 | | |
| 7 | + | |
8 | 8 | | |
9 | | - | |
10 | | - | |
11 | | - | |
12 | | - | |
13 | | - | |
14 | | - | |
15 | | - | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
16 | 16 | | |
17 | 17 | | |
18 | | - | |
19 | | - | |
20 | | - | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
21 | 30 | | |
22 | 31 | | |
23 | 32 | | |
| |||
39 | 48 | | |
40 | 49 | | |
41 | 50 | | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
| 51 | + | |
46 | 52 | | |
47 | 53 | | |
0 commit comments