Commit graph

69 commits

Author SHA1 Message Date
sabril
0b0658bdd0
chore: upgrade playwright to 1.57 and its dependencies (#34769)
Some checks are pending
API / build (push) Waiting to run
Server CI / Compute Go Version (push) Waiting to run
Server CI / Check mocks (push) Blocked by required conditions
Server CI / Check go mod tidy (push) Blocked by required conditions
Server CI / check-style (push) Blocked by required conditions
Server CI / Check serialization methods for hot structs (push) Blocked by required conditions
Server CI / Vet API (push) Blocked by required conditions
Server CI / Check migration files (push) Blocked by required conditions
Server CI / Generate email templates (push) Blocked by required conditions
Server CI / Check store layers (push) Blocked by required conditions
Server CI / Check mmctl docs (push) Blocked by required conditions
Server CI / Postgres with binary parameters (push) Blocked by required conditions
Server CI / Postgres (push) Blocked by required conditions
Server CI / Postgres (FIPS) (push) Blocked by required conditions
Server CI / Generate Test Coverage (push) Blocked by required conditions
Server CI / Run mmctl tests (push) Blocked by required conditions
Server CI / Run mmctl tests (FIPS) (push) Blocked by required conditions
Server CI / Build mattermost server app (push) Blocked by required conditions
Web App CI / check-lint (push) Waiting to run
Web App CI / check-i18n (push) Blocked by required conditions
Web App CI / check-types (push) Blocked by required conditions
Web App CI / test (platform) (push) Blocked by required conditions
Web App CI / test (mattermost-redux) (push) Blocked by required conditions
Web App CI / test (channels shard 1/4) (push) Blocked by required conditions
Web App CI / test (channels shard 2/4) (push) Blocked by required conditions
Web App CI / test (channels shard 3/4) (push) Blocked by required conditions
Web App CI / test (channels shard 4/4) (push) Blocked by required conditions
Web App CI / upload-coverage (push) Blocked by required conditions
Web App CI / build (push) Blocked by required conditions
* chore: upgrade playwright to 1.57 and its dependencies

* bump webapp's npm to accept ^11.0.0

* updated per comment

* fix failed tests
2026-01-09 10:48:19 +08:00
Pablo Vélez
1a21d34aab
MM-66925 - improve user email and password modals (#34739)
* MM-66925 - improve user email and password  modals

* adjust error modal styling

* adjust e2e tests
2025-12-19 15:52:59 +01:00
sabril
d7aebb555d
fix flaky notifications tests and migrated to playwright (#34449)
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-12-17 06:51:20 +00:00
Elias Nahum
4589005a54
feat: Add Microsoft Intune MAM authentication support (#34577)
Some checks are pending
API / build (push) Waiting to run
Server CI / Compute Go Version (push) Waiting to run
Server CI / Check mocks (push) Blocked by required conditions
Server CI / Check go mod tidy (push) Blocked by required conditions
Server CI / check-style (push) Blocked by required conditions
Server CI / Check serialization methods for hot structs (push) Blocked by required conditions
Server CI / Vet API (push) Blocked by required conditions
Server CI / Check migration files (push) Blocked by required conditions
Server CI / Generate email templates (push) Blocked by required conditions
Server CI / Check store layers (push) Blocked by required conditions
Server CI / Check mmctl docs (push) Blocked by required conditions
Server CI / Postgres with binary parameters (push) Blocked by required conditions
Server CI / Postgres (push) Blocked by required conditions
Server CI / Postgres (FIPS) (push) Blocked by required conditions
Server CI / Generate Test Coverage (push) Blocked by required conditions
Server CI / Run mmctl tests (push) Blocked by required conditions
Server CI / Run mmctl tests (FIPS) (push) Blocked by required conditions
Server CI / Build mattermost server app (push) Blocked by required conditions
Web App CI / check-lint (push) Waiting to run
Web App CI / check-i18n (push) Waiting to run
Web App CI / check-types (push) Waiting to run
Web App CI / test (push) Waiting to run
Web App CI / build (push) Waiting to run
* Add Entra ID token authentication and Intune MAM config exposure

* Add Intune MAM toggle to Mobile Security admin console

* Add IntuneSettings with the AuthService to use and its own TenantID andClientID for the Entra App registration
Include Admin console changes
switch from /oauth/entra to /oauth/intune endpoint
* openAPI documentation
---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: yasser khan <attitude3cena.yf@gmail.com>
2025-12-10 08:31:53 +02:00
Harrison Healey
5341b91566
MM-66659/MM-66832 Remove caretPosition state from AdvancedTextEditor (#34643)
Some checks are pending
API / build (push) Waiting to run
Server CI / Compute Go Version (push) Waiting to run
Server CI / Check mocks (push) Blocked by required conditions
Server CI / Check go mod tidy (push) Blocked by required conditions
Server CI / check-style (push) Blocked by required conditions
Server CI / Check serialization methods for hot structs (push) Blocked by required conditions
Server CI / Vet API (push) Blocked by required conditions
Server CI / Check migration files (push) Blocked by required conditions
Server CI / Generate email templates (push) Blocked by required conditions
Server CI / Check store layers (push) Blocked by required conditions
Server CI / Check mmctl docs (push) Blocked by required conditions
Server CI / Postgres with binary parameters (push) Blocked by required conditions
Server CI / Postgres (push) Blocked by required conditions
Server CI / Postgres (FIPS) (push) Blocked by required conditions
Server CI / Generate Test Coverage (push) Blocked by required conditions
Server CI / Run mmctl tests (push) Blocked by required conditions
Server CI / Run mmctl tests (FIPS) (push) Blocked by required conditions
Server CI / Build mattermost server app (push) Blocked by required conditions
Web App CI / check-lint (push) Waiting to run
Web App CI / check-i18n (push) Waiting to run
Web App CI / check-types (push) Waiting to run
Web App CI / test (push) Waiting to run
Web App CI / build (push) Waiting to run
* Mock react-virtualized-auto-sizer in all unit tests to ensure contents are mounted

Without mocking that, anything inside of an `AutoSizer` wouldn't be rendered
at all, leading to weird behaviour like the emoji picker being empty in tests.

* Fix EmojiPickerCategoryRow not having a defaultMessage

This caused any unit tests involving the emoji picker to error unless you
also provided an intlMessages object which is hard to do due to how Jest's
`moduleNameMapper` option is configured currently.

* Fixed incorrect usage of useCallback in EmojiPickerItem

The way this was previously written, we weren't specifying dependencies
properly for those callbacks which lead to some actual performance issues
because of how heavy the emoji picker is, and it also lead to issues where
click handlers would have to be triggered multiple times in unit tests
for some reason.

* MM-66659 Stop using caretPosition in useEditorEmojiPicker

This bug seems to be caused by a race condition between React and Chrome which
only occurs on Windows and only now that we've upgraded to React 18. That race
condition occurs with how we map the selection range in the post textbox to
its `caretPosition` state. That state has always been pretty janky, so I've
decided to remove it.

This also has some other benefits like improving UX by using `execCommand`
which preserves the undo/redo stack when using the emoji picker and simplifying
the code because we no longer have to manually mess with the cursor position.
Also, while I was in there, I fixed some minor weirdness around how whitespace
is handled when adding those emojis.

* MM-66659 Stop using caretPosition in useKeyHandler

* MM-66659 Stop using caretPosition for prefill message

* MM-66659 Remove remaining traces of caretPosition in AdvancedTextEditor

* Fix exclusive test

* Fix "Fixed incorrect usage of useCallback in EmojiPickerItem"

* Fixed incorrect usage of FixedSizeList in emoji picker

This is the actual fix to the issue I thought I fixed previously by changing
how `useCallback` was called in EmojiPickerItem.

It turns out the actual issue is that we were passing a new function as the
child of FixedSizeList on every render cycle which caused it to re-render all
of the rows which somehow also assigned them new DOM Nodes as well. The
EmojiPicker re-renders whenever we mouse over an emoji, so it would re-render
the FixedSizeList and all of its children frequently when mousing over things.

Apart from causing performance issues, that also seems to cause RTL to fail to
click on an emoji the first time you call `userAgent.click` because the first
call would move the mouse which would trigger a re-render, and that would
seemingly cause RTL to forget what to click on.

To fix that, I used a new React context to pass the extra props to the
EmojiPickerCategoryOrEmojiRow. I could've also done that by adding them to the
FixedSizeList's `itemData` prop, but that already contains a lot of heavy data,
and I didn't want to add to that.

* Revert changes to postMessageOnKeyPress

* Run Prettier in playwright folder

* Added docs to new Playwright test

* Address feedback
2025-12-09 14:10:06 +00:00
Rohan Sharma
e905a36110
migrate display_test branch (#34516)
Some checks are pending
API / build (push) Waiting to run
Server CI / Compute Go Version (push) Waiting to run
Server CI / Check mocks (push) Blocked by required conditions
Server CI / Check go mod tidy (push) Blocked by required conditions
Server CI / check-style (push) Blocked by required conditions
Server CI / Check serialization methods for hot structs (push) Blocked by required conditions
Server CI / Vet API (push) Blocked by required conditions
Server CI / Check migration files (push) Blocked by required conditions
Server CI / Generate email templates (push) Blocked by required conditions
Server CI / Check store layers (push) Blocked by required conditions
Server CI / Check mmctl docs (push) Blocked by required conditions
Server CI / Postgres with binary parameters (push) Blocked by required conditions
Server CI / Postgres (push) Blocked by required conditions
Server CI / Postgres (FIPS) (push) Blocked by required conditions
Server CI / Generate Test Coverage (push) Blocked by required conditions
Server CI / Run mmctl tests (push) Blocked by required conditions
Server CI / Run mmctl tests (FIPS) (push) Blocked by required conditions
Server CI / Build mattermost server app (push) Blocked by required conditions
Web App CI / check-lint (push) Waiting to run
Web App CI / check-i18n (push) Waiting to run
Web App CI / check-types (push) Waiting to run
Web App CI / test (push) Waiting to run
Web App CI / build (push) Waiting to run
2025-11-25 23:02:19 +08:00
Dylan Haussermann
c8c28c1b9a
Add E2E test for unreads filter functionality (#34198)
Some checks are pending
API / build (push) Waiting to run
Server CI / Compute Go Version (push) Waiting to run
Server CI / Check mocks (push) Blocked by required conditions
Server CI / Check go mod tidy (push) Blocked by required conditions
Server CI / check-style (push) Blocked by required conditions
Server CI / Check serialization methods for hot structs (push) Blocked by required conditions
Server CI / Vet API (push) Blocked by required conditions
Server CI / Check migration files (push) Blocked by required conditions
Server CI / Generate email templates (push) Blocked by required conditions
Server CI / Check store layers (push) Blocked by required conditions
Server CI / Check mmctl docs (push) Blocked by required conditions
Server CI / Postgres with binary parameters (push) Blocked by required conditions
Server CI / Postgres (push) Blocked by required conditions
Server CI / Postgres (FIPS) (push) Blocked by required conditions
Server CI / Generate Test Coverage (push) Blocked by required conditions
Server CI / Run mmctl tests (push) Blocked by required conditions
Server CI / Run mmctl tests (FIPS) (push) Blocked by required conditions
Server CI / Build mattermost server app (push) Blocked by required conditions
Web App CI / check-lint (push) Waiting to run
Web App CI / check-i18n (push) Waiting to run
Web App CI / check-types (push) Waiting to run
Web App CI / test (push) Waiting to run
Web App CI / build (push) Waiting to run
* Add E2E test for unreads filter functionality

* implemented code review suggestions as folows:

* Removed redundant `waitFor`

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-11-20 14:40:14 -05:00
Rahim Rahman
edb05c7ea5
Magic link (passwordless) authentication for guests (#34264)
Some checks are pending
API / build (push) Waiting to run
Server CI / Compute Go Version (push) Waiting to run
Server CI / Check mocks (push) Blocked by required conditions
Server CI / Check go mod tidy (push) Blocked by required conditions
Server CI / check-style (push) Blocked by required conditions
Server CI / Check serialization methods for hot structs (push) Blocked by required conditions
Server CI / Vet API (push) Blocked by required conditions
Server CI / Check migration files (push) Blocked by required conditions
Server CI / Generate email templates (push) Blocked by required conditions
Server CI / Check store layers (push) Blocked by required conditions
Server CI / Check mmctl docs (push) Blocked by required conditions
Server CI / Postgres with binary parameters (push) Blocked by required conditions
Server CI / Postgres (push) Blocked by required conditions
Server CI / Postgres (FIPS) (push) Blocked by required conditions
Server CI / Generate Test Coverage (push) Blocked by required conditions
Server CI / Run mmctl tests (push) Blocked by required conditions
Server CI / Run mmctl tests (FIPS) (push) Blocked by required conditions
Server CI / Build mattermost server app (push) Blocked by required conditions
Web App CI / check-lint (push) Waiting to run
Web App CI / check-i18n (push) Waiting to run
Web App CI / check-types (push) Waiting to run
Web App CI / test (push) Waiting to run
Web App CI / build (push) Waiting to run
* Add EasyLogin configuration (#34217)

* add easy login config

* add easy login to the invite modal

* add to the query parameters

* Add an API to get login method for the login id (#34223)

* add an api to get login method for the login id

* do not return errors if user is not found

* Add support for Easy Login invitation link sending (#34224)

This generates Easy Login token types when requested. The server
doesn't do anything with these tokens, yet - that will come in a
future change.

* Add support for logging in with easy login (#34236)

* Fix E2E tests (#34240)

* Prevent easy login accounts to reset their password (#34262)

* Add easy login support to login api and limit token to 5 min (#34259)

* webapp easy login ui mods (#34237)

* webapp easy login ui mods
* easy login i18n
* lint issues
* getUserLoginType
* using the real API
* easylogin proper redirect
* remove unneeded functions and files
* duplicated localization
* remove easylogin
* using EnableEasyLogin setting
* localization fix
* fix lint issue
* remove excessive setIsWaiting
* changed logic to make it more readable
* renaming component to make easier editable
* password will disappear when username change
* login test
* text for easy login password

* Add app links to emails

* Update templates and always land in the landing screen

* Update svg image, improve checks on server, fix linking page and show deactivated on login type

* Update naming

* Fix mocks and imports

* Remove all sessions on disable and forbid user promotion

* Fix layer and tests

* Address feedback

* Fix tests

* Fix missing string

* Fix texts

* Fix tests

* Fix constant name

* Fix tests

* Fix test

* Address feedback

* Fix lint

* Fix test

* Address feedback

* Fix test

---------

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Co-authored-by: David Krauser <david@krauser.org>
Co-authored-by: Daniel Espino <larkox@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-11-20 14:06:23 +01:00
Carlos Garcia
4ba7f7e16e
MM-66202: Migrate to aws-sdk-go-v2 (#34496)
* updated aws-sdk dependency to aws-sdk-go-v2

* simplify error handling in case of timeout errors

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-11-20 11:26:09 +01:00
yasser khan
b8944f372d
Feat(e2e): Add tests cases for Content Flagging (#34288)
Some checks are pending
API / build (push) Waiting to run
Server CI / Compute Go Version (push) Waiting to run
Server CI / Check mocks (push) Blocked by required conditions
Server CI / Check go mod tidy (push) Blocked by required conditions
Server CI / check-style (push) Blocked by required conditions
Server CI / Check serialization methods for hot structs (push) Blocked by required conditions
Server CI / Vet API (push) Blocked by required conditions
Server CI / Check migration files (push) Blocked by required conditions
Server CI / Generate email templates (push) Blocked by required conditions
Server CI / Check store layers (push) Blocked by required conditions
Server CI / Check mmctl docs (push) Blocked by required conditions
Server CI / Postgres with binary parameters (push) Blocked by required conditions
Server CI / Postgres (push) Blocked by required conditions
Server CI / Postgres (FIPS) (push) Blocked by required conditions
Server CI / Generate Test Coverage (push) Blocked by required conditions
Server CI / Run mmctl tests (push) Blocked by required conditions
Server CI / Run mmctl tests (FIPS) (push) Blocked by required conditions
Server CI / Build mattermost server app (push) Blocked by required conditions
Web App CI / check-lint (push) Waiting to run
Web App CI / check-i18n (push) Waiting to run
Web App CI / check-types (push) Waiting to run
Web App CI / test (push) Waiting to run
Web App CI / build (push) Waiting to run
- E2E tests for Content Flagging 
- Fixes tests failing on master
2025-11-19 10:16:57 +00:00
sabril
c40f6ee749
MM-65043 Add option to run E2E tests with FIPS build (#34318)
* add option to run fips build

* modify gh comments

* organize gh and commit status

* sanitize inputs, handle group concurrency

* indicate fix in status context and fix comparison

* handle fips comparison

* updated per comments

* reverted missed lines

* fix failed cypress test by migrating to playwright

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-11-13 12:20:21 +08:00
Eva Sarafianou
0d181ca215
Push Proxy Authentication (#34211)
* Initial Implementation of Push Proxy Authentication

* Include Config Listener for Leader plus delete startup function as job scheduler runs on initialization

* Remove push proxy auth from local imports

* Add push proxy auth to external imports

* Add push proxy auth error messages

* Update error codes

* Fix enterprise dep definition

* make i18n-extract

* Mock System store Get

* m

* m

* m

* m

* Update serverID header

* Add install type env var to docker

* Update Push Proxy config with new options

Global, US, Germany and Japan. Previous configurations will keep working

* use model.SafeDereference

* Delete token when new push proxy URL is empty

* ServerID header only if auth token is available

---------

Co-authored-by: Daniel Schalla <daniel@mattermost.com>
Co-authored-by: Nick Misasi <nick.misasi@mattermost.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-11-12 20:16:44 +02:00
Rohan Sharma
e544214f65
feat: add accessibility tests for advanced settings panel (#34272)
* feat: add accessibility tests for advanced settings panel

* fix: formatting issues

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-11-04 14:30:27 +05:30
sabril
5c43b2ceb3
fix for vscode testing (#34285) 2025-10-27 14:08:50 +00:00
Elias Nahum
595e600eea
MM-65755 Admin Console UI for Auto-Translation (#33982)
Some checks are pending
API / build (push) Waiting to run
Server CI / Compute Go Version (push) Waiting to run
Server CI / Check mocks (push) Blocked by required conditions
Server CI / Check go mod tidy (push) Blocked by required conditions
Server CI / check-style (push) Blocked by required conditions
Server CI / Check serialization methods for hot structs (push) Blocked by required conditions
Server CI / Vet API (push) Blocked by required conditions
Server CI / Check migration files (push) Blocked by required conditions
Server CI / Generate email templates (push) Blocked by required conditions
Server CI / Check store layers (push) Blocked by required conditions
Server CI / Check mmctl docs (push) Blocked by required conditions
Server CI / Postgres with binary parameters (push) Blocked by required conditions
Server CI / Postgres (push) Blocked by required conditions
Server CI / Postgres (FIPS) (push) Blocked by required conditions
Server CI / Generate Test Coverage (push) Blocked by required conditions
Server CI / Run mmctl tests (push) Blocked by required conditions
Server CI / Run mmctl tests (FIPS) (push) Blocked by required conditions
Server CI / Build mattermost server app (push) Blocked by required conditions
Web App CI / check-lint (push) Waiting to run
Web App CI / check-i18n (push) Waiting to run
Web App CI / check-types (push) Waiting to run
Web App CI / test (push) Waiting to run
Web App CI / build (push) Waiting to run
* AutoTranslate config settings

* comment out Agents provider

* Add auto translate timeout config validation

* i18n messages for autotranslation config validation

* fix test

* validate url for libreTranslate

* Feedback review

* Admin Console UI for Auto-Translation

* fix admin console conditional section display

* i18n

* removed unintentional change

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* update admin.general.localization.autoTranslateProviderDescription newline

* fix lint

* Fix types

* UX feedback review

* fix typo in i18n

* Fix AutoTranslation feature flag

* feedback review

* Fix test default values

* feedback review

* re-add isHidden property to feature discovery

* fix lint and external url

* Add settings to playwright

* Add empty as a valid value for the Provider

* Add searchable strings

* set apikey input type as password

---------

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-10-27 11:36:25 +08:00
sabril
b3b5f9d3e3
E2E/Playwright: Upgrade to playwright@1.56 and its dependencies (#34135)
Some checks are pending
API / build (push) Waiting to run
Server CI / Compute Go Version (push) Waiting to run
Server CI / Check mocks (push) Blocked by required conditions
Server CI / Check go mod tidy (push) Blocked by required conditions
Server CI / check-style (push) Blocked by required conditions
Server CI / Check serialization methods for hot structs (push) Blocked by required conditions
Server CI / Vet API (push) Blocked by required conditions
Server CI / Check migration files (push) Blocked by required conditions
Server CI / Generate email templates (push) Blocked by required conditions
Server CI / Check store layers (push) Blocked by required conditions
Server CI / Check mmctl docs (push) Blocked by required conditions
Server CI / Postgres with binary parameters (push) Blocked by required conditions
Server CI / Postgres (push) Blocked by required conditions
Server CI / Postgres (FIPS) (push) Blocked by required conditions
Server CI / Generate Test Coverage (push) Blocked by required conditions
Server CI / Run mmctl tests (push) Blocked by required conditions
Server CI / Run mmctl tests (FIPS) (push) Blocked by required conditions
Server CI / Build mattermost server app (push) Blocked by required conditions
Web App CI / check-lint (push) Waiting to run
Web App CI / check-i18n (push) Waiting to run
Web App CI / check-types (push) Waiting to run
Web App CI / test (push) Waiting to run
Web App CI / build (push) Waiting to run
* upgrade to playwright@1.56 and its dependencies

* move audited packages to devdep
2025-10-17 11:41:54 +08:00
sabril
18d2e8da9f
MM-63700 E2E/Playwright: Add accessibility testing guidelines (#33997)
* add accessibility testing guidelines

* use accessibility locators

* address comments
2025-10-15 12:00:01 +08:00
Alejandro García Montoro
d3eb6cbf1c
Revert "MM-13657: Set ExperimentalStrictCSRFEnforcement to true by default (#33444)" (#34112)
Some checks failed
API / build (push) Has been cancelled
Server CI / Compute Go Version (push) Has been cancelled
Web App CI / check-lint (push) Has been cancelled
Web App CI / check-i18n (push) Has been cancelled
Web App CI / check-types (push) Has been cancelled
Web App CI / test (push) Has been cancelled
Web App CI / build (push) Has been cancelled
Server CI / Check mocks (push) Has been cancelled
Server CI / Check go mod tidy (push) Has been cancelled
Server CI / check-style (push) Has been cancelled
Server CI / Check serialization methods for hot structs (push) Has been cancelled
Server CI / Vet API (push) Has been cancelled
Server CI / Check migration files (push) Has been cancelled
Server CI / Generate email templates (push) Has been cancelled
Server CI / Check store layers (push) Has been cancelled
Server CI / Check mmctl docs (push) Has been cancelled
Server CI / Postgres with binary parameters (push) Has been cancelled
Server CI / Postgres (push) Has been cancelled
Server CI / Postgres (FIPS) (push) Has been cancelled
Server CI / Generate Test Coverage (push) Has been cancelled
Server CI / Run mmctl tests (push) Has been cancelled
Server CI / Run mmctl tests (FIPS) (push) Has been cancelled
Server CI / Build mattermost server app (push) Has been cancelled
* Revert "MM-13657: Set ExperimentalStrictCSRFEnforcement to true by default (#33444)"

This reverts commit 257eec43ed.

* Fix call to checkCSRFToken

* Adapt test that relied on strict CSRF enforcement

This test was added after
https://github.com/mattermost/mattermost/pull/33444, so it assumed
strict CSRF enforcement to be enabled. When reverting that PR, we need
to adapt the test to account for both cases.

* Fix newer tests to use older setting
2025-10-10 19:15:45 +02:00
Harrison Healey
535d93ee98
MM-45255 Update web app to React 18 (#33858)
* Dependencies: Remove unused dependency on @mattermost/dynamic-virtualized-list

* Update Components package to React 18 and new version of RTL

* Upgrade React, React Redux, RTL, and associated libraries

I had to upgrade React Redux for the new version of React, and that
brought with it new versions of associated packges (Redux, Reselect,
Redux Thunk). A few other libraries needed to be updated or have their
explicit dependencies overridden for the new version of Redux as well.

To note for future dependency upgrades, redux-mock-store is deprecated,
and redux-batched-actions and redux-persist are inactive.

For RTL:
1. `@testing-library/react-hooks` has been rolled into
   `@testing-library/react`, and its interface has changed.
2. I had to make some changes to get TS to use the types for the new
   methods added to `expect`.

* Dependencies: Fix dom-accessibility-api patch from #33553

* Tests: Fix tests that use jest.spyOn with react-redux

* Functional: Remove usage of defaultProps on function components

* Tests: Remove usage of react-dom/test-utils

* Functional: Rename conflicting context prop on Apps components

* Tests: Always await on userEvent calls

* Functional: Patch react-overlays to fix pressing escape in unit tests

I did something similar in React Bootstrap a few weeks ago.

See https://github.com/mattermost/react-bootstrap/pull/5

* Tests: Prevent tests from fetching from real URLs

* Tests: Update snapshots changed by upgrading react-redux and styled-components

* Functional: Stop passing deprecated pure parameter to connect

* Tests: Change how we intercept console errors in tests to preserve stack traces

* Tests: Fix incorrect usage of act in Enzyme tests

These tests are a mix of:
1. Not calling act when performing something that will update the DOM (like clicking on a button or invoking a method) which either caused warnings or failed snapshots as changes weren't visible.
2. Calling act in weird ways (such as wrapping mount in an async act) which caused Enzyme to not function

Some of these changes just silence warnings, but most of them are required to make the test even run

* Tests: Fix incorrect usage of act in RTL tests

* Tests: Fix a few minor issues in tests

* Functional: Add note for why we're not using ReactDOM.createRoot

* Functional: Fix focus trap infinite recursion in test

* Types: Replace removed React.SFC

* Types: Fix type of functions in FormattedMessage values prop

* Functional: Fix DropdownInputHybrid placeholder

* Types: Patch type definitions of react-batched-actions

* Types: Fix mattermost-redux build failing due to type check in Redux Dev Tools

* Dependencies: Add type definitions for react-is

* Types: Update types around ReactNode and ReactElement

React's gotten more strict with these, so we need to be more careful with what
we return from a render method. In some of these places, we also misused some
types, so hopefully I've sorted those out.

* Types: Explicitly added types to all instances of useCallback

* Types/Tests: Update typing of Redux actions and hooks

useDispatch is sort of stricter now, but it doesn't seem to rely on the global type of `Dispatch` any more, so I ended up having to add an extra overload to make that work.

* Tests: Update new tests in useChannelSystemPolicies for new version of RTL

These were added on master after I updated RTL on the branch

* Tests: Update action used to test initial store state

* Functional: Remove remnants of code for hot reloading Redux store

* Types/Tests: Update typing around React Router

* Types/Functional: Update typing involving the FormattedMessage values prop

There's a couple functional changes to ensure that the value passed is either a valid string or Date

* Types: Misc fixes

* Functional: Don't pass unused props to ChannelHeader

* Functional: Ensure plugin setting text is rendered before passing to Setting component

The previous version might've allowed MessageDescriptors to be passed unformatted
into the Setting component (which would then be rendered in the DOM). As best as
I can tell, we never actually did that, so this shouldn't change anything in practice.

* Tests: Make tests for identifyElementRegion more reliable

* Tests: Update recent tests for new version of RTL

* E2E: Make editLastPostWithNewMessage more reliable

* Downgrade React to 18.2.0 and manually dedupe React versions

18.2.0 and 18.3.0 are nearly identical to one another, except 18.3.x includes
warnings when using any API that will be removed in React 19. I don't want to
flood the console and test logs with warnings for things we're not addressing
for the time being.

Also, they didn't export act from React itself until 18.3.1 for some reason
(despite the old import path printing a warning), so I needed to revert the
changes to its import path.

To get this all to work, for some reason, I had to manually delete all the
entries for `react` and `react-dom` from the lockfile to get NPM to use a
single version of React and ReactDOM everywhere. I did discover `npm dedupe`
in the process, but that didn't solve this problem where I was trying to
consistently downgrade everything.

* Revert changes to notice file build tool to speed up CI

* Add explicit version of types/scheduler

The version of `@types/react` that we use says it works with any version of
`@types/scheduler` which causes NPM to install a newer version of it which
is missing a file of types that it needs.

* Update new test to await on userEvent

* Fix Playwright test that relied on autogenerated class name

* Tests: Disable test for identifyElementRegion

* Functional: Change DynamicVirtualizedList ListItem to use useLayoutEffect

In a previous commit, I changed the RHS to use the monorepo
DynamicVirtualizedList instead of the old version that lived in its own repo.
That caused the RHS to no longer scroll to the bottom on initial mount or be
able to render additional pages (even though the posts are loaded). This seems
like it has to do with the improved size calculation that Zubair made because
that's the main difference in the monorepo version of that component.

For some reason I don't entirely understand, changing to useLayoutEffect seems
to fix that. I think that's because the old measurement code is written as a
class component, and useLayoutEffect fires at the same time as
componentDidMount/componentDidUpdate.

* Types: Revert some type changes to reduce test log output

* Functional: Fix places where useSelector returned new results when called with the same arguments

I wasn't planning on fixing this now, but I think the increased length of the warning logs in the tests are causing
the GitHub action for the unit tests to abort as it reaches around 10000 lines long.

* Tests: Fix place where mocked selector returned new results when called with the same arguments

Same reason as before, but this one only occurred because of a test's mocked selector. I replaced it with
a real one to get around that.

* Tests: Fail tests when selector returns new results when called with the same arguments

* Attempt to fix web app unit tests failing in CI

* Change CI tests to set workerIdleMemoryLimit instead of reducing maxWorkers

* Increase workerIdleMemoryLimit in CI

* Revert changes to test-ci command and revert changes to how unit test logs are collected

* Unrevert changes to test logging, re-add workerIdleMemoryLimit, and try disabling test coverage

* Actually disable coverage

* Fix flaky test

* Update a couple new tests to fit PR and remove an unnecessary act

* Replace bad mock in new unit test

* Fix types of new code

* Remove mock from new unit test
2025-10-07 11:11:12 -04:00
Mudit Sharma
2032f6f22a
GH-34031: Add accessibility tests for Sidebar settings panel (#34041)
* Add accessibility tests for Sidebar settings panel

* Add aria snapshots and fix accessibility test expectations for sidebar settings
2025-10-03 10:45:09 -04:00
sabril
5d6846374c
(a11y-test): team menu (#33998) 2025-10-02 13:41:50 +08:00
Pablo Vélez
b311da87a4
Mm 65123 remove channel abac ff (#33953)
* MM-65123 - remove channel abac feature flag

* enable the channel scope access control to true

* fix linters

* adjust expected error in tests

* remove no longer needed comment

* Remove write_restrictable from core ABAC settings and fix channel access control logic

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-10-01 16:12:36 +02:00
sabril
b93245b679
MM-63699 E2E/Playwright (accessibility): Notifications settings (#33969) 2025-09-26 21:23:04 +08:00
sabril
84a2d2eda7
fix: update e2e visual snapshots (#33944) 2025-09-24 13:01:57 +08:00
sabril
b579b4e63a
MM-63699: E2E/Accessibility: Settings modal (#33869)
* a11y tests on notificatins settings

* refactor settings and channel settings modal, add focus check on settings modal

* more a11y and visual tests
2025-09-19 22:51:03 +08:00
Jesse Hallam
8cace74692
MM-64486: Remove telemetry (#33606)
* MM-64486: Remove telemetry

Remove telemetry from Mattermost. We're no longer relying on Rudder upstream, and no longer making use of this information.

* recover mock for SystemStore.Get

* Fix TestClearPushNotificationSync by adding missing SystemStore mock

The test was failing because the SystemStore mock was missing the Get()
method that's required by the ServerId() function. Added the missing mock
to return a StringMap with SystemServerId.

* fix mocking issue

* Remove now-unused telemetry and constants

* Remove "Disable telemetry events" debug setting

* Remove empty functions

* Remove most "Telemetry tracking removed" comments

* Remove remains of DataPrefetch telemetry

* Remove now-unused prop from InviteMembersButton

* Remove trackDotMenuEvent

* Remove some more leftover comments

* Remove lingering logic related to trackingLocation

* Remove now-unused argument from useCopyText

* Remove lingering telemetry references from PreparingWorkspace

* fixup Remove trackDotMenuEvent

* Remove lingering telemetry references from signup page and password check

* Update snapshots and fix test broken by my changes

* Fix unintended behavior change in thread list filtering

Remove handleSetFilter wrapper that was accidentally modified during
telemetry removal. The function was calling clear() when switching to
unread filter, which was not the original behavior. Use setFilter
directly instead, restoring the original functionality.

* Remove unused useOpenDowngradeModal hook

The useOpenDowngradeModal hook was not being used anywhere in the codebase.

* Remove unused expandableLink from useExpandOverageUsersCheck

The expandableLink return value was not being used by any components.

* Re-add missing TeamLinkClicked performance telemetry

The mark(Mark.TeamLinkClicked) call was accidentally removed from the
handleSwitch function. This telemetry is needed for Looker-based
performance tracking.

* drop LogSettings.VerboseDiagnostics

---------

Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-09-04 18:46:18 +00:00
sabril
bb979f6f9f
upgrade playwright and fix client config (#33800)
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-09-01 14:12:24 +08:00
Jesse Hallam
d4d8643e29
Remove certificate-based auth (#33751)
This feature has never worked as advertised. Let's deprecate it,
retaining the config field so we can fail server startup to ensure it's
not being used at all.
2025-08-21 09:59:20 -03:00
Jesse Hallam
dd11197043
MM-64807: Deprecate format parameter in client config endpoint (#33605)
* MM-64807: Deprecate format parameter in client config endpoint

- Remove requirement for format=old query parameter in /api/v4/config/client
- Endpoint now returns client configuration by default without parameters
- Maintain backward compatibility - format parameter is accepted but ignored
- Replace GetOldClientConfig with GetClientConfig across all clients
- Update API documentation to reflect simplified endpoint
- Update webapp client to remove format parameter usage

The endpoint previously returned HTTP 501 without format=old parameter.
Now it returns the client configuration directly, making the API more
intuitive while preserving compatibility with existing clients.

* Update i18n strings after format parameter deprecation

* Update E2E tests to use getClientConfig instead of getClientConfigOld

- Replace getClientConfigOld calls in playwright test library
- Aligns with format parameter deprecation in MM-64807

* Keep format=old parameter in webapp getClientConfig for pre-v11 compatibility
2025-08-20 12:15:11 -03:00
Ben Schumacher
36b00d9bb6
[MM-64485] Remove separate notification log file (#33473)
- Remove NotificationLogSettings configuration entirely
- Add new notification-specific log levels (NotificationError, NotificationWarn, NotificationInfo, NotificationDebug, NotificationTrace)
- Consolidate all notification logs into standard mattermost.log file
- Update all notification logging code to use new multi-level logging (MlvlNotification*)
- Remove notification logger infrastructure and support packet integration
- Update test configurations and remove deprecated functionality tests
- Add comprehensive tests for new notification log levels

This change simplifies log analysis by unifying all application logging while maintaining flexibility through Advanced Logging configuration for administrators who need separate notification logs.

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

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-20 10:17:45 +02:00
Jesse Hallam
c8d6630141
MM-63240: Always allow viewing archived channels (#32162)
* server: allow access to channel bookmarks in an archived channel

* server: allow access to posts in archived channels

* server: allow accessing channel members for archived channels

* server: allow autocompleting/searching archived channels

* server: allow access to files from archived channels

* server: fix access issue on database error

* server: allow access to archived channels

* server: remove TeamSettings.ExperimentalViewArchivedChannels from telemetry

* server: remove ExperimentalViewArchivedChannels from client config

* webapp: simplify delete channel

* webapp: simplify channel settings modal

* webapp: do not redirect away from archived channel

* webapp: rhs, always search posts from archived channels

* webapp: switch channels, always support archived channels

* webapp: search channel provider, always support archived channels

* webapp: browse channels, always support archived channels

* webapp, search results? fixup?

* webapp, confusing type issue

* webapp: unarchive, no need to report view archived

* webapp: command test, no need for ExperimentalViewArchivedChannels in config

* webapp: remove ExperimentalViewArchivedChannels from system console

* webapp: redux, do not delete posts, also fix LEAVE_CHANNEL

* update e2e tests

* server: fail startup if ExperimentalViewArchivedChannels is not enabled

* extract i18n

* updated snapshots

* update tests

* simplify posts reducer

* updated tests

* additional e2e tests

* Fix locale consistency in Jest tests

Added consistent locale environment variables (LC_ALL=en_US.UTF-8 LANG=en_US.UTF-8)
to all Jest test scripts to prevent locale-dependent date formatting differences
across development environments.

This resolves snapshot test failures where DateTime.toLocaleString() would produce
different date formats on different systems (e.g., "6/8/2025" vs "08/06/2025" vs "2025-06-08").

Updated test scripts:
- test, test:watch, test:updatesnapshot, test:debug, test-ci

Updated snapshot to consistent en_US format.

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

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

* Remove includeArchivedChannels parameter from GetMemberForPost

* Remove unnecessary includeDeleted variable assignments

* Deprecate ExperimentalViewArchivedChannels config field

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-08-15 13:50:20 -03:00
Harrison Healey
0d302e19e3
MM-62990 Properly group suggestions in SuggestionList (and various other autocompletes) (#33457)
* Ensure all Suggestion rendering code always uses an array of components

* Ensure all Suggestion rendering code always uses a single matchedPretext

* Pass SuggestionResults around through suggestion components instead of raw arrays

* Have new search component use SuggestionListStatus

* Have new search and ForwardPostModal use SuggestionResults helpers

* Migrate SuggestionList and AtMentionProvider to support suggestion groups

* Migrate SearchSuggestionList and SearchChannelProvider to support suggestion groups

* Migrate NewSearch to support suggestion groups

* Make ExtensionSuggestionsProvider group results

* Make ChannelMentionProvider group results

* Make AppProvider and CommandProvider group results

* Make EmoticonProvider group results

* Don't migrate SuggestionDate to support suggestion groups

* Make SearchUserProvider group results

* Make SwitchChannelProvider group results

* Remove lingering parts of old implementations of dividers between suggestions

* Remove unused prop on SuggestionList

* Update E2E tests and stop using data-testid for SuggestionList

* Uncomment accidentally commented out lines

* Fix quick switch modal being ordered incorrectly and unskip test

* Remove leftover TODOs

* Remove unused component

* Fix comment

* Rename suggestion_list_structure.tsx to suggestion_list_contents.tsx

* Pull out isItemLoaded helper

* Add a bunch of tests

* Add more comments to suggestion_results.ts

* Make SuggestionResults type parameter default to unknown
2025-08-01 15:11:53 -04:00
Agniva De Sarker
41e88b74ac
MM-61407: Remove Bleve (#33430)
https://mattermost.atlassian.net/browse/MM-61407

```release-note
NONE
```

* webapp i18n

```release-note
NONE
```

* Fix e2e tests

```release-note
NONE
```

* fix roles in e2e tests

```release-note
NONE
```

* some review comments

```release-note
NONE
```

* add back permissions to deprecated list

```release-note
NONE
```
2025-07-31 09:35:29 +05:30
sabril
680059758b
upgrade to playwright@1.54 and its dependencies (#33568) 2025-07-29 11:24:15 +08:00
Agniva De Sarker
257eec43ed
MM-13657: Set ExperimentalStrictCSRFEnforcement to true by default (#33444)
https://mattermost.atlassian.net/browse/MM-13657
```release-note
We change ServiceSettings.ExperimentalStrictCSRFEnforcement to be
true by default for new installations. For existing installations,
the value will remain unchanged.
```

* Remove ''Experimental'' prefix from CSRF enforcement field

Change field name from ExperimentalStrictCSRFEnforcement to StrictCSRFEnforcement across all files

Co-authored-by: Agniva De Sarker <agnivade@users.noreply.github.com>

* lint fix

```release-note
NONE
```

* fix test

```release-note
NONE
```

* set StrictCSRFEnforcement to false on starting a test server

---------

Co-authored-by: claude[bot] <209825114+claude[bot]@users.noreply.github.com>
Co-authored-by: Agniva De Sarker <agnivade@users.noreply.github.com>
Co-authored-by: Saturnino Abril <5334504+saturninoabril@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2025-07-24 13:51:29 +05:30
Ibrahim Serdar Acikgoz
53c04b94d5
[MM-64516] Do not allow user editable attributes to be used in ABAC table editor (#32522) 2025-07-22 11:57:52 +02:00
Agniva De Sarker
f9a4d04c64
MM-63652: Transition gossip encryption functionality to GA (#33349)
* MM-63652: Transition gossip encryption functionality to GA

Create a new config setting, and migrate the old values to new.

https://mattermost.atlassian.net/browse/MM-63652

Skip-Enterprise-PR: true

```release-note
NONE
```

* fix i18n

also fix unit tests

```release-note
NONE
```

* For fresh installations, default to true

```release-note
NONE
```

* gofmt files

```release-note
NONE
```

* Fixing some more strings

```release-note
NONE
```

* Update e2e tests

```release-note
NONE
```
2025-07-14 19:23:12 +05:30
Harshil Sharma
d1e5fdea2c
Content flagging systems console settings (#31411)
* Added enable/disable setting and feature flag

* added rest of notifgication settings

* Added backend for content flagging setting and populated notification values from server side defaults

* WIP user selector

* Added common reviewers UI

* Added additonal reviewers section

* WIP

* WIP

* Team table base

* Added search in teams

* Added search in teams

* Added additional settings section

* WIP

* Inbtegrated reviewers settings

* WIP

* WIP

* Added server side validation

* cleanup

* cleanup

* [skip ci]

* Some refactoring

* type fixes

* lint fix

* test: add content flagging settings test file

* test: add comprehensive unit tests for content flagging settings

* enhanced tests

* test: add test file for content flagging additional settings

* test: add comprehensive unit tests for ContentFlaggingAdditionalSettingsSection

* Added additoonal settings test

* test: add empty test file for team reviewers section

* test: add comprehensive unit tests for TeamReviewersSection component

* test: update tests to handle async data fetching in team reviewers section

* test: add empty test file for content reviewers component

* feat: add comprehensive unit tests for ContentFlaggingContentReviewers component

* Added ContentFlaggingContentReviewersContentFlaggingContentReviewers test

* test: add notification settings test file for content flagging

* test: add comprehensive unit tests for content flagging notification settings

* Added ContentFlaggingNotificationSettingsSection tests

* test: add user profile pill test file

* test: add comprehensive unit tests for UserProfilePill component

* refactor: Replace enzyme shallow with renderWithContext in user_profile_pill tests

* Added UserProfilePill tests

* test: add empty test file for content reviewers team option

* test: add comprehensive unit tests for TeamOptionComponent

* Added TeamOptionComponent tests

* test: add empty test file for reason_option component

* test: add comprehensive unit tests for ReasonOption component

* Added ReasonOption tests

* cleanup

* Fixed i18n error

* fixed e2e test lijnt issues

* Updated test cases

* Added snaoshot

* Updated snaoshot

* lint fix

* lint fix

* review fixes

* updated snapshot

* CI

* Review fixes

* Removed an test, updated comment

* CI

* Test update
2025-07-10 17:47:16 +05:30
sabril
780c893b4f
upgrade playwright dependencies (#33348) 2025-07-08 23:00:48 +08:00
sabril
edbfc3d933
upgrade playwright dependencies (#32405) 2025-06-30 23:38:24 +08:00
Elias Nahum
731cc1fb5f
Add server settings to further lock files on mobile (#30949)
* Add server settings to further lock files on mobile

* fix format with prettier

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Saturnino Abril <5334504+saturninoabril@users.noreply.github.com>
2025-06-19 09:37:32 +02:00
yasser khan
b784074212
Fix Flaky test failing on prod and in master branch (#31407) 2025-06-18 17:22:57 +05:30
Devin Binnie
df1b278f62
[MM-63007][MM-63004][MM-63020][MM-63009][MM-63008] More accessibility fixes around Search (#31409)
* [MM-63008] Make collapse button on search bar an actual button

* [MM-63004][MM-63020] Convert search box to floating-ui, fix some of the roles and labels that were incorrect

* [MM-63009] Add radiogroup and radio roles to the search box types

* [MM-63007] Ensure search box reads out number of results with suggestion items

* Fix playwright tests

* PR feedback

* Remove floating ui overlay

* Remove unnecessary .first() by being more specific about the search box

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-06-17 17:47:30 -04:00
Matthew Birtch
77e50cf110
MM-61382 Date/Time Picker Input Fix and Refactor (#31330) 2025-06-16 08:01:16 -04:00
Devin Binnie
74258c3b7a
[MM-64425] Add configurable account deletion link (#31396)
* [MM-64425] Add configurable account deletion link

* Fix types

* PR feedback

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-06-12 11:00:00 -04:00
Devin Binnie
65d3d5984f
[MM-63041] Convert many inputs to the Input component, replace clientError with more correct client-side validation that conforms to the input (#31279)
* [MM-63041] Convert many inputs to the Input component, replace clientError with more correct client-side validation that conforms to the input

* Fix line length

* PR feedback

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-06-11 17:02:32 -04:00
Devin Binnie
25a4839a9e
Automatic channel category sorting (#30866)
* Automatic channel category sorting

* Fix types

* AIed

* Fix issue where categories are updated for all users

* Move all logic to server, clean up

* PR feedback

* Fix lint

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-06-11 14:29:36 -04:00
Harrison Healey
6517fa2fd1
MM-63411 Don't focus thread textbox automatically when it has a draft (#31250)
* MM-63411 Don't focus thread textbox automatically when it has a draft

* Add E2E test

* Add test files forgotten in previous commit

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-06-04 16:08:33 -04:00
sabril
f710512e3e
separate visual tests from main test, update snapshots and dependencies (#31131) 2025-05-22 23:21:23 +08:00
Devin Binnie
62a93cd36f
[MM-62980][MM-62970] Login and Password Reset accessibility fixes (#31028)
* [MM-62980] Set aria-describedby for Input component when again custom message is set

* [MM-62970] Change password reset send link input to Input

* Fix i18n

* Fix e2e

* fix snapshots

---------

Co-authored-by: yasserfaraazkhan <attitude3cena.yf@gmail.com>
2025-05-15 16:23:03 +00:00