Commit 835de98
authored
test: Add UI and logic to evaluate boolean flags (#305)
## Summary
Introduced a text field and button in CustomerApiButtons to input and
evaluate a boolean flag key. Added evaluateBooleanFlag method in
ViewModel to fetch the flag value and display the result using a Toast
message.
## How did you test this change?
No tests needed
## Are there any deployment considerations?
No
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Adds UI and logic to input a flag key and evaluate a boolean flag via
LDClient, showing the result in a Toast.
>
> - **Android UI (Compose)**:
> - In `CustomerApiButtons`, add `OutlinedTextField` for `flagKey` input
and a button to evaluate it via `viewModel.evaluateBooleanFlag`.
> - **ViewModel**:
> - Add `evaluateBooleanFlag(flagKey)` that uses
`LDClient.boolVariation` and displays the result with a `Toast`;
validates non-empty key.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
a3d020f. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 6700858 commit 835de98
File tree
2 files changed
+28
-2
lines changed- e2e/android/app/src/main/java/com/example/androidobservability
2 files changed
+28
-2
lines changedLines changed: 18 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| |||
197 | 196 | | |
198 | 197 | | |
199 | 198 | | |
200 | | - | |
201 | 199 | | |
202 | 200 | | |
203 | 201 | | |
| |||
322 | 320 | | |
323 | 321 | | |
324 | 322 | | |
| 323 | + | |
325 | 324 | | |
326 | 325 | | |
327 | 326 | | |
| |||
386 | 385 | | |
387 | 386 | | |
388 | 387 | | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
| 396 | + | |
| 397 | + | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
389 | 405 | | |
390 | 406 | | |
391 | 407 | | |
| |||
Lines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
124 | 125 | | |
125 | 126 | | |
126 | 127 | | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
127 | 137 | | |
128 | 138 | | |
129 | 139 | | |
| |||
0 commit comments