Commit graph

125 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
dependabot[bot]
5231ee6553
Bump axios from 1.7.9 to 1.8.2 in /detox (#8660)
Bumps [axios](https://github.com/axios/axios) from 1.7.9 to 1.8.2.
- [Release notes](https://github.com/axios/axios/releases)
- [Changelog](https://github.com/axios/axios/blob/v1.x/CHANGELOG.md)
- [Commits](https://github.com/axios/axios/compare/v1.7.9...v1.8.2)

---
updated-dependencies:
- dependency-name: axios
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-11 11:26:47 +08: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
0ad2679595
Add android detox apk build workflow (#8405) 2025-01-16 12:26:10 +05:30
yasserfaraazkhan
63889c03c6
Fix: Android build for Detox e2e (#8362) 2024-12-09 23:20:05 +05:30
yasserfaraazkhan
acfccb170f
Fix: Env variabled to pick up right simulator device for tests (#8367) 2024-11-29 11:48:35 +05:30
Jesse Hallam
6f381cfcf5
MM-53775: hide Thread Overview until a reply occurs (#8316) 2024-11-06 13:01:42 -04:00
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
lindalumitchell
35b68654f7
Update autocomplete.e2e.ts (#8231)
Removed references to now-closed issue https://mattermost.atlassian.net/browse/MM-50351
2024-09-23 21:21:15 -07:00
lindalumitchell
8e27dcacec
Update message_reply.e2e.ts (#8225)
Remove outdated note ` -- KNOWN ISSUE: MM-50206`
2024-09-18 17:29:44 +08:00
lindalumitchell
152cdc5130
Update message_draft.e2e.ts (#8224)
Removed reference to fixed issue ` -- KNOWN ISSUE: MM-50298`.
2024-09-18 17:28:31 +08: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
Elias Nahum
0b83938d3c
update dependencies (#8131)
* update project depdendencies

* update detox dependencies

* update fastlane

* remove silencing console
2024-08-12 09:15:49 +03:00
Saturnino Abril
8fb0b32d89
fix: saving e2e test report in Zephyr (#8080) 2024-07-12 21:07:31 +05:30
yasserfaraazkhan
351c877a82
fix reporting variables in the community report (#7997) 2024-06-26 19:43:30 +05:30
Antonis Stamatiou
c1829bd24f
fix: Remove mobile builds out of the template (#8000)
* fix: Remove mobile builds out of the template

* fix: Use proper variables

* fix: Create proper summary from detox output

* fix: Test with free runners for now

* fix: Switch to M1

* fix: Add removed node modules

* fix: statsPercent

* fix: Remove skipped from successful passes
2024-06-12 13:02:36 +03:00
Antonis Stamatiou
54d009d6f1
feat: Introduce Mobile CMT testing (#7994) 2024-06-10 14:06:37 +03:00
yasserfaraazkhan
f46ddb49d0
Add workflow to run detox iOS tests (#7878) 2024-06-04 22:42:58 +05:30
Trivikram Kamat
89ebfbdadf
chore: migrate AWS SDK for JavaScript v2 APIs to v3 (#7653)
* chore: convert s3.promise callback to async-await

* chore: run codemod on detox/utils/artifacts.js

* chore: format

* chore(deps): replace AWS SDK for JavaScript v2 to v3

* chore: eslint --fix
2024-02-19 18:29:29 +08:00
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
Saturnino Abril
0c7500eb84
fix(e2e): use AOSP Android emulator for Detox test (#7440) 2023-07-10 10:30:36 -04:00
Elias Nahum
ef2c12e954
Update Dependencies (#7409)
* dev dependencies

* update deps

* update wdb

* update more deps

* update detox deps

* update logs for database batch

* fix jest setup
2023-06-21 13:40:23 -04:00
Elias Nahum
784b05fe97
Upgrade Dependencies (#7299)
* upgrade reanimated

* update devDependencies

* upgrade react-intl

* update react-native and some dependencies

* update react-native-permissions

* update RN

* use Share sheet for Report a problem

* update Sentry

* remove step to downloadWebRTC

* update detox deps

* feedback review
2023-04-21 12:16:54 -04:00
dependabot[bot]
19b7bae916
Bump xml2js from 0.4.23 to 0.5.0 in /detox (#7277)
Bumps [xml2js](https://github.com/Leonidas-from-XIV/node-xml2js) from 0.4.23 to 0.5.0.
- [Release notes](https://github.com/Leonidas-from-XIV/node-xml2js/releases)
- [Commits](https://github.com/Leonidas-from-XIV/node-xml2js/commits/0.5.0)

---
updated-dependencies:
- dependency-name: xml2js
  dependency-type: direct:development
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-04-14 11:07:28 -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
07aa748cd7
Detox: Android fix MM-T4728_2 - should match elements on channel list… (#7156)
* Detox: Android fix MM-T4728_1 - should match elements on channel list screen

* Address comments

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-03-07 21:26:33 +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
Elisabeth Kulzer
27d7875dd7
Detox: Android - fix smoke server login test (#7157)
* Detox: Android - fix smoke server login test
---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2023-02-28 17:14:07 +01:00
Elisabeth Kulzer
c6dc00e4df Fix connect to server 2023-02-23 12:17:37 +01:00
Elias Nahum
77b0851213
Update Dependencies (#7140)
* upgrade android dependencies

* upgrade iOS dependencies

* Enable network plugin in flipper for Android

* update JS dependencies
2023-02-16 11:20:31 +02:00
Joseph Baylon
2b1e9852f4 Update jira number for known issue 2023-02-09 09:40:32 +01:00
Joseph Baylon
32fbc01d03 Misc fixes for android 2023-02-09 09:40:32 +01:00
Joseph Baylon
53b834d702 Fix edit_profile.e2e 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
f3c578c7ae Fix threads 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
e8ad89861d Fix account e2e for android 2023-02-09 09:40:32 +01:00
Joseph Baylon
bda9b10d7d Revert react reload inside beforeAll 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