mattermost-mobile/detox/e2e/support/ui/screen
Jesse Hallam 15f59b7eee
[MM-63728] Add license load metric to About screen (#8769)
* Add license load metric to About screen

- Add REST endpoint to fetch license load percentage
- Display load metric in About screen next to server version

Fixes: https://mattermost.atlassian.net/browse/MM-63728

* MM-63728: Address PR feedback from enahum

- Move license load metric fetch to a remote action
- Use isMinimumServerVersion to check for server 10.8.0 or higher

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* MM-63728: Simplify getLicenseLoadMetric to directly return number

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* MM-63728: Move getLicenseLoadMetric to dedicated license.ts file

- Create new remote action file specifically for license-related functions
- Add test file for the license actions
- Update imports in about.tsx

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* MM-63728: Remove redundant license check in about.tsx

- Rely on getLicenseLoadMetric to handle the license check

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* MM-63728: Update E2E tests for license load metric

- Add license load metric test IDs to about screen
- Update E2E test to check for load metric when license is enabled
- Handle cases where server might not support the feature

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* recover app/actions/remote/general.ts

* MM-63728: Return error from getLicenseLoadMetric instead of silent failure

- Remove silent failure and debug logging
- Return the error object when API call fails
- Update the About component to handle possible error responses
- Update tests to verify error handling

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* MM-63728: Remove groupLabel parameter from getLicenseLoadMetric

- Remove groupLabel parameter from client getLicenseLoadMetric method in interface and implementation
- Update client tests to reflect the parameter removal
- Update license action test to verify no parameter is passed

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* simplify about screen checks

* MM-63728: Use jest.mocked and real version checks in license tests

- Removed isMinimumServerVersion mock, letting tests use real version checking
- Used proper type casting for mock Client
- Added comprehensive version compatibility test cases
- Simplified test setup

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* MM-63728: Remove redundant server version test

- Removed redundant test for different server versions
- Existing tests already cover the necessary version compatibility cases

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* MM-63728: Refactor license test to use better mocking pattern

- Refactored the test file to use a better mocking pattern similar to custom_emoji.test.ts
- Simplified mock declarations using jest.mock()
- Added type import for Client for better readability
- Improved type casting for mock objects

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* npm run fix

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-04-17 17:29:47 -03:00
..
about.ts [MM-63728] Add license load metric to About screen (#8769) 2025-04-17 17:29:47 -03:00
account.ts Detox android fix smoke tests (#7193) 2023-03-11 13:08:17 +01:00
advanced_settings.ts Detox/E2E: Edit Profile, Custom Status, and Settings e2e tests in Gekidou 2022-08-25 17:42:41 -07:00
auto_responder_notification_settings.ts Add ability to run detox tests on Android (#8553) 2025-02-14 01:26:53 +05:30
browse_channels.ts Detox/E2E Maintenance: Fix broken iOS e2e tests 2022-12-15 14:47:33 -08:00
channel.ts Add ability to run detox tests on Android (#8553) 2025-02-14 01:26:53 +05:30
channel_dropdown_menu.ts Detox/E2E: Find channels, Edit channel, etc e2e tests in Gekidou 2022-07-06 11:15:45 -07:00
channel_info.ts Add workflow to run detox iOS tests (#7878) 2024-06-04 22:42:58 +05:30
channel_list.ts E2E: Mobile Drafts tests cases (#8469) 2025-01-22 04:02:14 +05:30
clock_display_settings.ts Detox/E2E: Edit Profile, Custom Status, and Settings e2e tests in Gekidou 2022-08-25 17:42:41 -07:00
create_direct_message.ts Add workflow to run detox iOS tests (#7878) 2024-06-04 22:42:58 +05:30
create_or_edit_channel.ts Add ability to run detox tests on Android (#8553) 2025-02-14 01:26:53 +05:30
custom_status.ts Detox Maintenance: Update deps, fix import, fix failing tests -- iOS only (#7070) 2023-02-01 08:32:57 -08:00
display_settings.ts Detox/E2E: Edit Profile, Custom Status, and Settings e2e tests in Gekidou 2022-08-25 17:42:41 -07:00
draft_screen.ts E2E: Mobile Drafts tests cases (#8469) 2025-01-22 04:02:14 +05:30
edit_post.ts Detox/E2E: Recent Mentions and Saved Messages e2e tests in Gekidou 2022-07-07 16:56:32 -07:00
edit_profile.ts Detox/E2E: Edit Profile, Custom Status, and Settings e2e tests in Gekidou 2022-08-25 17:42:41 -07:00
edit_server.ts Detox/E2E: Messaging post options e2e tests in Gekidou (#6405) 2022-06-17 21:01:05 -04:00
email_notification_settings.ts Add ability to run detox tests on Android (#8553) 2025-02-14 01:26:53 +05:30
emoji_picker.ts Fix messaging e2e for android 2023-02-09 09:40:32 +01:00
find_channels.ts Detox/E2E: Edit Profile, Custom Status, and Settings e2e tests in Gekidou 2022-08-25 17:42:41 -07:00
global_threads.ts Detox/E2E: Edit Profile, Custom Status, and Settings e2e tests in Gekidou 2022-08-25 17:42:41 -07:00
home.ts Detox/E2E: Recent Mentions and Saved Messages e2e tests in Gekidou 2022-07-07 16:56:32 -07:00
index.ts E2E: Mobile Drafts tests cases (#8469) 2025-01-22 04:02:14 +05:30
invite.ts Add ability to run detox tests on Android (#8553) 2025-02-14 01:26:53 +05:30
login.ts Add ability to run detox tests on Android (#8553) 2025-02-14 01:26:53 +05:30
mention_notification_settings.ts Add ability to run detox tests on Android (#8553) 2025-02-14 01:26:53 +05:30
notification_settings.ts Detox/E2E: Edit Profile, Custom Status, and Settings e2e tests in Gekidou 2022-08-25 17:42:41 -07:00
permalink.ts Misc fixes for android 2023-02-09 09:40:32 +01:00
pinned_messages.ts Detox/E2E: Pinned Messages e2e tests in Gekidou (#6471) 2022-07-14 13:49:53 -07:00
post_options.ts Fix messaging e2e for android 2023-02-09 09:40:32 +01:00
push_notification_settings.ts Add ability to run detox tests on Android (#8553) 2025-02-14 01:26:53 +05:30
reactions.ts Fix messaging e2e for android 2023-02-09 09:40:32 +01:00
recent_mentions.ts Detox/E2E: Pinned Messages e2e tests in Gekidou (#6471) 2022-07-14 13:49:53 -07:00
saved_messages.ts Detox/E2E: Pinned Messages e2e tests in Gekidou (#6471) 2022-07-14 13:49:53 -07:00
search_messages.ts Fix search messages e2e for android 2023-02-09 09:40:32 +01:00
select_timezone.ts Detox/E2E: Edit Profile, Custom Status, and Settings e2e tests in Gekidou 2022-08-25 17:42:41 -07:00
server.ts Add ability to run detox tests on Android (#8553) 2025-02-14 01:26:53 +05:30
server_list.ts Misc fixes for android 2023-02-09 09:40:32 +01:00
settings.ts Detox/E2E Maintenance: Fix broken iOS e2e tests (#6917) 2022-12-30 14:01:24 -08:00
table.ts Detox/E2E: Messaging (at-mentions, channel mentions, autocomplete etc) e2e tests in Gekidou (#6428) 2022-07-05 10:01:46 -07:00
team_dropdown_menu.ts Add ability to run detox tests on Android (#8553) 2025-02-14 01:26:53 +05:30
theme_display_settings.ts Detox/E2E: Edit Profile, Custom Status, and Settings e2e tests in Gekidou 2022-08-25 17:42:41 -07:00
thread.ts Detox/E2E: Recent Mentions and Saved Messages e2e tests in Gekidou 2022-07-07 16:56:32 -07:00
thread_options.ts Fix messaging e2e for android 2023-02-09 09:40:32 +01:00
timezone_display_settings.ts Add ability to run detox tests on Android (#8553) 2025-02-14 01:26:53 +05:30
user_profile.ts Fix messaging e2e for android 2023-02-09 09:40:32 +01:00