Commit 3f3ff0f
authored
dismiss widget dialog when running privacy instrumentation tests (#8685)
Task/Issue URL:
https://app.asana.com/1/137249556945/project/414730916066338/task/1215115320142558?focus=true
### Description
Dismiss widget pop-up when running privacy instrumentation tests.
### Steps to test this PR
QA optional, running the test on CI in
https://github.com/duckduckgo/Android/actions/runs/26440610428.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Changes only Android instrumentation test utilities; no production app
behavior.
>
> **Overview**
> Centralizes Espresso handling for the **home screen widget promo**
bottom sheet so instrumentation tests are less flaky on fresh installs.
>
> The dismissal logic moves from a private helper in `BasicJourneyTest`
into shared **`dismissWidgetPromoIfPresent()`** in `EspressoUtils.kt`
(with a short comment tying it to `CtaViewModel.canShowWidgetCta`).
**`preparationsForPrivacyTest()`** now calls that helper after the
browser menu is ready, so privacy tests get the same dialog cleanup as
the basic journey test.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
3272d28. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 9a05611 commit 3f3ff0f
3 files changed
Lines changed: 20 additions & 12 deletions
File tree
- app/src/androidTest/java/com/duckduckgo/espresso
- privacy
Lines changed: 1 addition & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | 21 | | |
23 | 22 | | |
24 | 23 | | |
| |||
41 | 40 | | |
42 | 41 | | |
43 | 42 | | |
44 | | - | |
45 | | - | |
| 43 | + | |
46 | 44 | | |
47 | 45 | | |
48 | 46 | | |
| |||
53 | 51 | | |
54 | 52 | | |
55 | 53 | | |
56 | | - | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | 54 | | |
Lines changed: 16 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
| 21 | + | |
| 22 | + | |
21 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
22 | 28 | | |
23 | 29 | | |
24 | 30 | | |
| |||
31 | 37 | | |
32 | 38 | | |
33 | 39 | | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
Lines changed: 3 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
34 | 35 | | |
35 | 36 | | |
36 | 37 | | |
| 38 | + | |
| 39 | + | |
37 | 40 | | |
38 | 41 | | |
39 | 42 | | |
| |||
0 commit comments