mattermost-mobile-upstream/app/screens/settings
Guillermo Vayá 6325368c3a
[MM-70111] fix(report-problem): always open the Report a Problem screen instead of skipping it (#10010)
* fix(report-problem): show Report a Problem screen on Entry/unlicensed servers (MM-70111)

On Entry/unlicensed servers the settings entry point skipped the Report a
Problem screen and opened the forum link directly, which left users with no
way to view the troubleshooting metadata or download the app logs.

The screen is now only skipped when there are no logs to download (that is
the only reason the screen was being bypassed for licensed servers too).
Free edition servers get the screen, and the report action at the bottom
already points to the forums instead of a support ticket.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* fix(report-problem): always open the Report a Problem screen (MM-70111)

The settings entry point had grown a set of conditions under which it bypassed
the Report a Problem screen and ran the report action straight away, one of
them being any Entry/unlicensed server. Bypassing the screen also takes away
the troubleshooting metadata, the app logs download and the attach logs
toggle, which are the parts users need to report a bug on the forums.

The entry point now always navigates to the screen and no longer needs to know
about the license or the report destination: the screen's bottom button
already sends an email or opens the forums depending on the configured type
and the license, and the logs section and attach logs toggle keep respecting
AllowDownloadLogs.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* test(e2e): update Report a Problem coverage for the always-open screen (MM-70111)

The Maestro flows and the Detox page object were written around the old
behaviour where an unlicensed/Entry server, or a server with
AllowDownloadLogs=false, bypassed the Report a Problem screen and opened a
browser or a mail composer instead.

MM-T67856_4 asserted that bypass directly (assertNotVisible
report_problem.screen) and would now fail: with AllowDownloadLogs=false the
screen opens, only without the logs and the toggle. It now asserts that.

MM-T67856_1 and MM-T67856_2 kept their real assertions behind a
"when visible: report_problem.screen" branch with an external-browser branch
alongside it. CI provisions unlicensed servers, so the browser branch is the
one that ran and both flows passed without asserting anything. The assertions
are now unconditional. MM-T67856_2 also gated on the attach logs toggle being
visible, which cannot be true before scrolling, so it now scrolls first.

MM-T67856 documented the browser as the free edition path; it now asserts the
screen opens and that the logs download is reachable.

ReportProblemScreen.open() caught the failure to find the screen and reported
it as "an external browser opened" via a boolean. That hid a real failure to
open the screen, so it now just asserts. It had no callers, so settings.e2e.ts
gains MM-T4991_6 to cover the navigation.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* test(report-problem): render the mock's props explicitly (MM-70111)

With the component down to two props, mapping over Object.keys only obscured
which props the container is expected to pass.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* test(e2e): scroll to the bottom before asserting the logs controls are absent

assertNotVisible also passes for a control that is only below the fold, so the
six metadata rows could have pushed a regression out of view on a small
viewport. Reach the Copy button, the last control on the screen when logs are
unavailable, before asserting.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

* test(e2e): follow the Maestro selector and screenshot rules

GUIDELINES.md allows text: selectors only for iOS FloatingTextInput fields and
system alert buttons, and says to add a testID in app/ when an element lacks
one. The scroll anchor added for MM-T67856_4 used text: "Copy", so the copy
metadata button gets a testID and the flow selects it by id.

The same checklist asks every flow to end with a screenshot; MM-T67856,
MM-T67856_1, MM-T67856_2 and MM-T67856_4 now do.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-06 19:41:59 +02:00
..
about Revert "e2e(detox): Rainforest to Detox migration (#9790)" (#9834) 2026-06-15 17:57:01 +02:00
advanced Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
display Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
display_clock Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
display_crt Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
display_theme Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
display_timezone Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
display_timezone_select Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
notification_auto_responder Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
notification_call replace react-native-incall-manager with @mattermost/calls-native for audio management (#9973) 2026-08-06 07:38:54 +08:00
notification_email Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
notification_mention Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
notification_push Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
notifications Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
report_problem [MM-70111] fix(report-problem): always open the Report a Problem screen instead of skipping it (#10010) 2026-08-06 19:41:59 +02:00
config.ts Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00
index.tsx Update libraries and dependencies (#7678) 2023-11-25 07:46:13 +08:00
settings.tsx Migrate from RNN to Expo router (#9402) 2026-05-13 17:44:55 +08:00