Commit graph

62 commits

Author SHA1 Message Date
yasser khan
3cbde1663d
E2E feature schedule posts (#8709)
- Fix iOS and Android CI.
- Fixes E2E tests on both platform
- Added tests for scheduled draft feature.
2025-04-23 12:10:37 +05:30
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
yasser khan
9976cacec4
Add ability to run detox tests on Android (#8553) 2025-02-14 01:26:53 +05:30
yasserfaraazkhan
2830d06fc2
E2E: Mobile Drafts tests cases (#8469) 2025-01-22 04:02:14 +05:30
Elias Nahum
2f3dfbbbfa
Update dependencies and upgrade to RN 0.76.5 (#8421)
* update dev deps

* partial update dependencies

* update watermelondb

* update rn to 0.76.5, expo to 52.0.18 and others

* upgrade android firebase

* upgrade detox deps

* fix package-lock.json

* update emm and paste-input

* update turbo-log

* update network library

* fix tests

* review feedback

* fix Keyboard blocking signIn button

* Fall back to iphone 14 iOS 17.2 simulator as app crashes on iOS 17.4

* changes in deleteCredentialsForServer is causing a crash

* withOptions x2 clearly is wrong

* re-add cli-platform-apple fix

* fix: RN 0.76.5 issue with bottom sheet disappearing (#8478)

* experiment, using view vs BottomSheetView

* revert previous & try disabling enableDynamicSizing

* revert an unintended removal

---------

Co-authored-by: yasserfaraazkhan <attitude3cena.yf@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Rahim Rahman <rahim.rahman@mattermost.com>
2025-01-16 07:11:32 -07:00
yasserfaraazkhan
63889c03c6
Fix: Android build for Detox e2e (#8362) 2024-12-09 23:20:05 +05:30
Rahim Rahman
e7d597f70e
test: mitmproxy + low bandwidth + automated QA using detox (#8202)
* experimental github action

* start mtmproxy then kill it

* suspend test for now

* dont need to be in a PR to trigger

* trying again with mitmdump

* where is .mitmproxy folder?

* run with +e

* not sure why exit code 1

* if this is a better path

* let's try killing using trap?

* trying a different path

* maybe using ~  would work?

* looking at output to networksetup command

* minor mistake

* throttling bandwidth

* lets try with sudo

* missing sudo

* using mitmdump

* remove spaces

* tried diff path

* change to the proper file

* upload artifacts

* install cert

* added cert to simulator

* getting simulator UDID

* proper scoped var

* using github outputs

* getenv doesn't have IOS_SIMULATOR_UDID

* using echo command

* maybe forgot to scope outputs

* lets run the command directly

* changed to iPhone 14

* let me see all the devices

* try something new

* rearrange my steps to get cert

* getenv booted

* remove too many outputs

* using mm mobile test server

* tie it all together with detox test

* removed dependency for another job

* put dependency on a job

* simplify process even more

* add github-token on download artifact

* add run-id, hopefully that's what needed to download

* incorrect speed for download

* update to the correct dummynet syntax

* proper mitmdump flow report

* update allow-hosts

* commenting out mitmdump for now

* back to rahim-experiments

* overly commented out

* cacert not --ca-cert

* maybe i allow the wrong host?

* maybe i just forgotr to kill mitmdump after I'm done?

* using pm2

* reinstate jobs. and longer timeout for detox

* need sudo

* recording videos and limiting to 1 test

* just want to run 1 test.

* back to experimenting

* using wget

* test using chrome

* using chrome and add delay

* ok test again with detox

* go back to testing all server_login

* compare booted simulators

* few more experiments

* no \

* using github_outputs

* using fromJSON

* too many $

* can i do this another way?

* two runs to get the it assigned

* try again

* .

* trying to access devices array

* try again

* using jq

* keep it simple

* might not need outputs

* forgot pipe

* will this work?

* will first element of an array works

* see if we got the udid

* did we get it wrong?

* will this work?

* let's assign?

* we have to put into string

* ok 1 more

* will it have quotes?

* echo in an echo

* is this working?

* let's hope this works.

* it's actually using 17.4 iPhone 14 not 17.0

* broke because i add &

* removed failed step

* lowering ping and going back to 10 parallel test

* double-up ONE_SEC to see if tests will pass

* why curl failed after?

* getting more data from failures

* let's get more logs with pm and mitmdump

* more logging and improvement

* silly error!

* problem with throttling, let's figure out where we can improve

* increase timeout for low-bandwidth

* increased delay + run all tests

* lets see if this will be better for throttling

* try set +e to see if it will return failure

* check disk space.

* deleting zip and trash to free up space.

* try to do pfctl twice to see if that would help

* making bandwidth-throttling a composite action

* would 5 seconds make a diff?

* add shell

* throttle bandwidth experiment

* fix quick problem

* 5s sleep, and throttling at the right time

* the throttling was working better earlier.

* add a flush in between

* no exit, see if it works well

* trying continue-on-error

* resetting with continue-on-error vs checking for if steps before worked

* adding flush before throttling to see if it makes a diff

* put it back where we think is the best spot

* change timeout to 60 and some cleanup

* forgot a simple $

* move network throttling again to see if this is better?

* rearranging

* move throttling back to where it used to work well
making bandwidth-throttling action taking inputs

* forgot shell

* inputs not input, and continue-on-error

* getting host from site_1_url

* update the sed script

* move more steps into composite action file

* add shell

* add more shell

* action cleanup

* see if our reset network setting works

* delete unused files

* more clean up

* wrong indentation

* wrong context

* see if not having low bandwidth enabled would cause stuff to break

* will it fail on non-existent step name?

* things are failing after proxy started

* start using low_bandwidth_mode input

* incorrect use of curly bracket

* low_bandwidth_mode vs low_bandwidth

* correcting the use of curly bracket in if check

* low_bandwidth_mode correction

* why would https:// makes a diff?

* just going to start pm2 after stopping

* move things around again

* some more re-arranging

* exit 1

* rearranged too much

* clean up

* start-proxy action

* incorrect variable name

* use test_server_url instead

* reverting back to original

* use pull_request

* using env var prepend

* using existing artifact

* not in ""

* not going to prepend anymore

* incorrectly removed input instead of env

* close to final

* using original e2e-detox-template

* timeout-minutes need to be higher for low_bandwidth.

* using label instead of push to branch

* add check-label

* remove unneeded test

* renamed ci.yml back to original

* different way to remove label
remove experiment files
reinstate ci.yml

* remove experiment file

* see label again

* output labels

* another experiment

* test again

* fix issue when checking for low bandwidth

* revert changes to package.json in detox/

* changed download to upload in the description

* changes based on review

* add github.event.label.name to the group "id" per @mvitale1989 suggestion

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-10-14 07:56:52 -06:00
Elias Nahum
c0f3cff531
Remove axios and detox from package.json in the root folder (#8219)
* Remove axios and detox from package.json in the root folder

* fix ts
2024-09-16 10:51:43 +08:00
yasserfaraazkhan
351c877a82
fix reporting variables in the community report (#7997) 2024-06-26 19:43:30 +05:30
yasserfaraazkhan
f46ddb49d0
Add workflow to run detox iOS tests (#7878) 2024-06-04 22:42:58 +05:30
Saturnino Abril
1121cca649
CLD-5949 Upgrade Detox and E2E dependencies (#7553)
* upgrade detox and e2e dependencies

* update detox in main package.json

* remove inadvertent addition of "react-devtools"

* remove inadvertent addition of "react-devtools"
2023-09-27 15:56:34 +08:00
Sudhanva-Nadiger
37b245d461
Feat: add copy to clipboard button in "about" mattermost page (#7134)
* feat: add copy to clip board button in about page

* add intl format text

* make suggested changes.

- fix: wrap copyToClipBoard function in useCallBack
- remove annonymous function onPress, provide function pointer
- make code readable in copyToClipBoard function

* formatting

* small fix

* change copy to clipboard position

- created a custom button eith icon and text
- usd button theme color

* button styling

* divider color

* use predefined btn element

* Add e2e test for copy info button

* feat: refactor the styles for thin lines

- fix: change touchable opacity to view
- add margin top to footer text

* change icon size to 15

* remove unnecessary view

* add config to dependency of callback

* suggeste changes on onClick func

* modified en.json file after running i18-extract

* Improve translations

* Address feedback

* Fix non updated default messages

---------

Co-authored-by: Daniel Espino García <larkox@gmail.com>
2023-07-26 09:00:06 -04:00
Daniel Espino García
77095b1034
Add members (#7220)
* Add "Add members" modal

* Refactor into server user list

* Renaming and fixes

* Address feedback

* Add missing change

* Styling fixes for iOS
2023-03-30 11:58:50 -03:00
Elisabeth Kulzer
fcb1db660c
Detox android fix smoke tests (#7193)
* Detox: Android - fix smoke tests.

* Detox: Android - Fix latency related tests.

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-03-11 13:08:17 +01:00
Elisabeth Kulzer
72c5271598
Detox: Fix ios connect issue. (#7187)
Co-authored-by: Mattermost Build <build@mattermost.com>
2023-03-07 09:00:39 +01:00
Elisabeth Kulzer
6454a19a37
Detox: Android - fix invite ppl. (#7162)
* Detox: Android - fix invite ppl.

* Remove config modifications.

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-03-03 19:04:19 +01:00
Joseph Baylon
32fbc01d03 Misc fixes for android 2023-02-09 09:40:32 +01:00
Joseph Baylon
a59d966ce4 Fix search messages e2e for android 2023-02-09 09:40:32 +01:00
Joseph Baylon
3566a4e8ce Fix smoke test e2e for android 2023-02-09 09:40:32 +01:00
Joseph Baylon
ee477c16fa Fix server login e2e for android 2023-02-09 09:40:32 +01:00
Joseph Baylon
3538205f81 Fix search e2e for android 2023-02-09 09:40:32 +01:00
Joseph Baylon
2ebfa0230e Fix messaging e2e for android 2023-02-09 09:40:32 +01:00
Joseph Baylon
658b35b6ad Fix channels e2e for android 2023-02-09 09:40:32 +01:00
Joseph Baylon
94b5bc65e7 Detox Maintenance: Fix failing android e2e 2023-02-09 09:40:32 +01:00
Joseph Baylon
70bdfcf8fd
Detox Maintenance: Update deps, fix import, fix failing tests -- iOS only (#7070)
* Detox Maintenance: Update deps, fix import, fix failing tests

* Revert message reply step 3

* Try fresh install per test file
2023-02-01 08:32:57 -08:00
Julian Mondragon
5816406040 Merge branch 'main' of https://github.com/mattermost/mattermost-mobile into MM-42835 2023-01-15 16:40:21 -05:00
Julian Mondragon
a9a9c00860 MM-42835_Invite People - add email+user invites 2023-01-09 12:33:51 -05:00
Joseph Baylon
d465edefc3
Detox Maintenance: Skip tests that are unstable and cleanup known issues (#6931)
* Detox Reporting: Prepare for release and main

* Fix lint in switch

* Detox Maintenance: Skip unstable tests

* Skipped unstable and known issue tests

* Fix inline latex test

* Remove skipped from failures

* Remove unnecessary report failure

* Remove assert import

* Remove FAILURE_MESSAGE

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2023-01-05 14:43:09 -08:00
Julian Mondragon
5bf0bbbea0 Merge branch 'main' of https://github.com/mattermost/mattermost-mobile into MM-42835 2023-01-03 09:24:09 -05:00
Joseph Baylon
dd60257364
Detox/E2E Maintenance: Fix broken iOS e2e tests (#6917) 2022-12-30 14:01:24 -08:00
Julian Mondragon
09c24f0059 MM-42835_Invite People - add email+user invites 2022-12-16 10:49:09 -05:00
Julian Mondragon
a476b53d5f MM-42835_Invite People - add email+user invites 2022-12-16 10:45:48 -05:00
Joseph Baylon
56d2d57291 Detox/E2E Maintenance: Fix broken iOS e2e tests 2022-12-15 14:47:33 -08:00
Joseph Baylon
bcca6be0af
Detox/E2E: Search Messages e2e tests in Gekidou (#6756)
* Detox/E2E: Search Messages e2e tests in Gekidou

* Migrate to Detox 20

* Fix detoxrc

* Fix assertion for search messages
2022-11-21 12:58:51 -08:00
Julian Mondragon
647cd4c9c2 MM-39720_Invite People - phase 1 2022-10-31 18:12:03 -05:00
Joseph Baylon
5b14d31245 Fixed/stabilized tests; added new known issue tickets 2022-08-26 09:28:14 -07:00
Joseph Baylon
8d7b15da51 Detox/E2E: Edit Profile, Custom Status, and Settings e2e tests in Gekidou 2022-08-25 17:42:41 -07:00
Joseph Baylon
25ae8fdb88
Detox/E2E: Account e2e tests in Gekidou (#6584)
* Detox/E2E: Account e2e tests in Gekidou

* Fix suite title

* Changed ldap port to number

* Fix testIDs for settings

* Added zephyr test case keys
2022-08-18 03:18:46 -07:00
Joseph Baylon
1781477bc6
Detox/E2E: Convert to private channel e2e tests in Gekidou (#6563)
* Detox/E2E: Convert to private channel e2e tests in Gekidou

* Fix tests

* Fix typo

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-08-15 13:07:19 -07:00
Joseph Baylon
927f207bff
Detox/E2E: Scripts to run tests and save report (#6560)
* Detox/E2E: Scripts to run tests and save report

* Change TM4J to ZEPHYR

* Change AWS to DETOX_AWS

* Removed send report on type release; moved incrementalDuration to getAllTests

* Apply change requests

* Fix import order

* Fixed save_report comments; Fixed IOS checks

* Added TEST_CYCLE_LINK_PREFIX to save_report comments

* Re-order variables
2022-08-13 08:37:24 -04:00
Joseph Baylon
dc1bc147e7 Detox/E2E: Fix global threads and unarchive channel tests 2022-08-01 14:13:57 -07:00
Joseph Baylon
c460c485a7
Detox/E2E: Channel Info and Quick Actions e2e tests in Gekidou (#6487)
* Detox/E2E: Channel Info and Quick Actions e2e tests in Gekidou

* Detox/E2E: Fix broken iOS e2e tests in Gekidou (#6488)
2022-07-21 14:18:56 -07:00
Joseph Baylon
b25f5b10b2
Detox/E2E: Pinned Messages e2e tests in Gekidou (#6471) 2022-07-14 13:49:53 -07:00
Malik
4817b977d1
Merge pull request #6459 from mattermost/detox-find-edit-channel
Detox/E2E: Find channels, Edit channel, etc e2e tests in Gekidou
2022-07-12 19:26:18 -04:00
Joseph Baylon
b099797a28 Detox/E2E: Recent Mentions and Saved Messages e2e tests in Gekidou 2022-07-07 16:56:32 -07:00
Joseph Baylon
c0ce5e3490 Detox/E2E: Find channels, Edit channel, etc e2e tests in Gekidou 2022-07-06 11:15:45 -07:00
Joseph Baylon
6a3c600c8a
Detox/E2E: Messaging (at-mentions, channel mentions, autocomplete etc) e2e tests in Gekidou (#6428)
* Detox/E2E: Messaging (at-mentions, channel mentions, autocomplete etc) e2e tests in Gekidou

* Enable other failing tests so they're visible

* Detox/E2E: Messaging markdown e2e tests in Gekidou (#6450)

* Detox/E2E: Messaging markdown e2e tests in Gekidou

* Added zephyr test ids

* Added markdown smoke test

* Enable disabled tests

Co-authored-by: Mattermod <mattermod@users.noreply.github.com>
2022-07-05 10:01:46 -07:00
Joseph Baylon
7a71d864e2
Detox/E2E: Messaging post options e2e tests in Gekidou (#6405)
* Detox/E2E: Messaging post options e2e tests in Gekidou

* Simplify find channels search bar
2022-06-17 21:01:05 -04:00
Joseph Baylon
6ff41ea199
Detox/E2E: Upgrade deps to fix detox crash; Fix/Stabilize e2e (#6387) 2022-06-15 11:49:53 -07:00
Joseph Baylon
558d83719c
Detox/E2E: Global threads e2e tests in Gekidou (#6300)
* Detox/E2E: Global threads e2e tests in Gekidou

* Revert update deps
2022-05-20 15:51:15 -07:00