* 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>
* 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
* 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>
Changed "Remove sessions" to "Revoke sessions" in System Console menu
to match the terminology used in the confirmation modal and API.
Also fixed TypeScript error in dropdown_input_hybrid component.
* 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
* Update system_user_detail to enable editing of User Attributes
- This adds a `updateUserCustomProfileAttributesValues` method to client4 to allow updating attributes for a given userID, as a match to getUserCustomProfilesAttributesValues
- Fixed issue in saveCustomProfileAttributes where it used the version that did not take the passed in userId
* Fixes for tests
* Update saveCustomProfileAttribute mock in users.test.ts
The `saveCustomProfileAttribute` test was still using the old getCustomProfileAttributeValuesRoute instead of the same route that `getCustomProfileAttributeValues` uses.
* Adding e2e tests for editing User attributes (custom and system) in System Console
* Fix testing issue with selector for 'Authentication Method'
* workflows/server-ci-report.yml: security fixes by validating inputs (#33892)
* [MM-61899] Properly restrict users who previously shared a team from DMs/GMs when they no longer share a team. (#30094)
* [MM-61899] Properly restrict users who previously shared a team from DMs/GMs when they no longer share a team.
* Fix checks
* Fix test
* Fix i18n
* Added E2E tests
* Merge'd
* Add restricted DM check to more places
* Merge'd
* Restrict patching the channel (updating the channel)
* Update verbiage in the admin console
* Fix lint
* More tests
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* Mirror Postgres 14 docker image (#34009)
* ugprade to go 1.24.6 (#34004)
* Bump Postgres minimum supported version to 14 (#34010)
* Downgrade French language (#33826)
* Downgrade French language
* Update i18n.jsx
* Updates buildFieldAttrs to preseve existing attrs when editing a field (#33991)
* Updates buildFieldAttrs to preseve existing attrs when editing a field
* Fix preserve option issue for select/multiselect type fields
* Fix linter
---------
Co-authored-by: Miguel de la Cruz <miguel@ctrlz.es>
* MM-64423 - Removing the clear func on switch (#31214)
* MM-64423 - Removing the clear func on switch
* Select all teams by default
* Updating test
* Updating test
* Removing showFilterHaveBeenReset
* Removing search string
* Do not clear the search term
* Updating tests
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* 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>
* [MM-65837], [MM-65824] - Update Dependencies (#33972)
* Update github.com/mholt/archives
* Update github.com/spf13/viper
* make batch migration worker tests less flaky
---------
Co-authored-by: Jesse Hallam <jesse@mattermost.com>
* (a11y-test): team menu (#33998)
* MM-66071: Do not error on empty slice in /groups/names (#34021)
* Do not error on empty slice in /groups/names
If group_names is an empty slice, this should not be an invalid
parameter. We return what we were asked for: an empty array.
* Avoid requests to /groups/names if list is empty
If the list of group names is empty, we do not need to ask the server
for the corresponding groups: we already know it'll be an empty list.
* Fix ABAC not available for entry (#34027)
Automatic Merge
* Explicitly name Postgres container volume (#33954)
* Explicitly name Postgres container volume
* Remove unused server/docker-compose.yaml
This file doesn't seem to actually be used. When we run docker compose locally,
it uses docker-compose.makefile.yml merged with the output of
build/docker-compose-generator/main.go.
* Revert "Remove unused server/docker-compose.yaml"
This reverts commit 5a45965217.
* Update volume name
* Flag post API (#33765)
* 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
* WIP
* lint fix
* Added post flagging properties setup
* review fixes
* updated snapshot
* CI
* Added base APIs
* Fetched team status data on load and team switch
* WIP
* Review fixes
* wip
* WIP
* Removed an test, updated comment
* CI
* Added tests
* Added tests
* Lint fix
* Added API specs
* Fixed types
* CI fixes
* API tests
* lint fixes
* Set env variable so API routes are regiustered
* Test update
* term renaming and disabling API tests on MySQL
* typo
* Updated store type definition
* Minor tweaks
* Added tests
* Removed error in app startup when content flaghging setup fails
* Updated sync condition:
* Flag message modal basE
* added post preview
* displaying options
* Adde comment input
* Updated tests and docs
* finction rename
* WIP
* Updated tests
* refactor
* lint fix
* MOved to data migration
* lint fix
* CI
* added new migration mocks
* Used setup for tests
* some comment
* Removed unnecesseery nil check
* Form validation
* WIP tests
* WIP tests
* WIP tests
* fix: mock content flagging config selector with correct reasons format
Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat>
* fix: add mock for getContentFlaggingConfig in flag post modal test
Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat>
* Updated error code order in API docs
* removed empty files
* Added tests
* lint fixes
* minor tweak
* lint fix
* type fix
* fixed test
* nit
* test enhancements
* API WIP
* API WIP
* creating values
* creating content flagging channel and properties
* Able to save properties
* Added another property field
* WIP
* WIP
* Added validations
* Added data validations and hidden post if confifgured to
* lint fixes
* Added API spec
* Added some tests
* Added tests for getContentReviewBot
* test: add comprehensive tests for getContentReviewChannels function
* Added more app layer tests
* Added TestCanFlagPost
* test: Add comprehensive tests for FlagPost function
* Added all app layer tests
* Removed a file that was reamoved downstream
* test: add content flagging test file
* test: add comprehensive tests for FlagContentRequest.IsValid method
* Added model tests
* test: add comprehensive tests for SqlPropertyValueStore.CreateMany
* test: add comprehensive tests for flagPost() API function
* Added API tests
* linter fix
* WIP
* sent post flagging confirmation message
* fixed i18n nissues
* fixed i18n nissues
* CI
* Updated test
* fix: reset contentFlaggingGroupId for test isolation in content flagging tests
* removed cached group ID
* removed debug log
* review fixes
* Used correct ot name
* CI
* Updated mobile text
* Handled JSON error
* fixerdf i18n
* CI
* Integrate flag post api (#33798)
* WIP
* WIP
* Added API call
* test: add test for Client4.flagPost API call in FlagPostModal
* fix: remove userEvent.setup() from flag post modal test
* test: wrap submit button click in act for proper state updates
* Updated tests
* lint fix
* CI
* Updated to allow special characters in comments
* Handled empty comment
* Used finally
* CI
* Fixed test
* Spillage card integration (#33832)
* Created getContentFlaggingFields API
* created getPostPropertyValues API
* WIP
* Created useContentFlaggingFields hook
* WIP
* WIP
* Added option to retain data for reviewers
* Displayed deleted post's preview
* DIsplayed all properties
* Adding field name i18n
* WIP - managing i18n able texts
* Finished displaying all fields
* Manual cleanup
* lint fixes
* team role filter logic fix
* Fixed tests
* created new API to fetch flagged posts
* lint fix
* Added new client methods
* test: add comprehensive tests for content flagging APIs
* Added new API tests
* fixed openapi spec
* Fixed DataSpillageReport tests
* Fixed PostMarkdown test
* Fixed PostPreviewPropertyRenderer test
* Added metadata to card renderer
* test fixes
* Added no comment placeholder
* Fixed test
* refactor: improve test mocking for data spillage report component
* test mock updates
* Updated reducer
* not resetting mocks
* WIP
* review fixes
* CI
* Fixed
* fixes
* Content flagging actions implementation (#33852)
* Added view detail button
* Created RemoveFlaggedMessageConfirmationModal modal
* Added key and remove flag request modal
* IMplemented delete flagged post
* Handled edge cases of deleting flagged post
* keep message
* UI integration
* Added WS event for post report update and handled deleted files of flagged post
* Added error handling in keep/remove forms
* i18n fixes
* Updated OpenAPI specs
* fixed types
* fixed types
* refactoring
* Fixed tests
* review fixes
* Added new property translations
* Improved test
* fixed test
* CI
* fixes
* CI
* fixed a test
* CI
---------
Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat>
* 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
* Update system_user_detail to enable editing of User Attributes
- This adds a `updateUserCustomProfileAttributesValues` method to client4 to allow updating attributes for a given userID, as a match to getUserCustomProfilesAttributesValues
- Fixed issue in saveCustomProfileAttributes where it used the version that did not take the passed in userId
* Fixes for tests
* Update saveCustomProfileAttribute mock in users.test.ts
The `saveCustomProfileAttribute` test was still using the old getCustomProfileAttributeValuesRoute instead of the same route that `getCustomProfileAttributeValues` uses.
* Adding e2e tests for editing User attributes (custom and system) in System Console
* Fix testing issue with selector for 'Authentication Method'
* Fixes from PR suggestions
* Fix lint/export issues
* Fix playwright lint issue halting e2e smoke test
* Results from npm run prettier:fix (in e2e-tests/playwright folder)
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Co-authored-by: Devin Binnie <52460000+devinbinnie@users.noreply.github.com>
Co-authored-by: Alejandro García Montoro <alejandro.garciamontoro@gmail.com>
Co-authored-by: Jesse Hallam <jesse.hallam@gmail.com>
Co-authored-by: Amy Blais <29708087+amyblais@users.noreply.github.com>
Co-authored-by: Miguel de la Cruz <miguel@mcrx.me>
Co-authored-by: Miguel de la Cruz <miguel@ctrlz.es>
Co-authored-by: Asaad Mahmood <asaadmahmood@users.noreply.github.com>
Co-authored-by: Pablo Vélez <pablovv2012@gmail.com>
Co-authored-by: Eva Sarafianou <eva.sarafianou@gmail.com>
Co-authored-by: Jesse Hallam <jesse@mattermost.com>
Co-authored-by: sabril <5334504+saturninoabril@users.noreply.github.com>
Co-authored-by: Maria A Nunez <maria.nunez@mattermost.com>
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Co-authored-by: Harshil Sharma <18575143+harshilsharma63@users.noreply.github.com>
Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) <aider@aider.chat>
Co-authored-by: Mudit Sharma <ms1725@srmist.edu.in>
* 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>
* [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>
* [MM-63717] LDAP Wizard skeleton (#31029)
* add ldap_wizard component to render its admin components
* i18n
* test adjustment
* keys and props fixes
* title fix
* fix placeholders
* fix value initialization
* linting
* remove all ...props (except custom component); any->unknown
* fix i18n (temp, will be changed in later PR)
* better return; simplify function checking/calling
* [MM-64259] Sections sidebar and navigation (#31059)
* initial sections list sidebar
* sidebar highlighting and scroll on click
* some tidying up
* add custom section titles for section sidebar
* i18n
* updating border on sections
* scss style lint
* color -> border-color
* simplify activeSectionKey initialization; remove trailing newline
* add useSectionNavigation; clean up ldap_wizard and scss; PR comments
* extract section of code into renderSidebar()
---------
Co-authored-by: Asaad Mahmood <asaadmahmood@users.noreply.github.com>
* [MM-64296] Add test connection for connection settings panel (#31190)
* button -> ldap test connect api
* fix console error by sanitizing value in text component
* return detailed error as error; adjust button -> primary, flushLeft
* middle of redesigning how we do hover text, first button
* add hover text to bools and file uploads
* i18n
* add LdapSettings as api type; add new endpoint to api yaml
* allow testing without first enabling LDAP and saving config
* i18n id changes
* improve TestLdapConnection to current standards
* PR comments
* safeDereference; cleaner returns
* remove hover markdown; formatting and typing simplification
* use button for "More Info"; i18n
* finish renaming help_text_hover -> help_text_more_info
* fix error output
* only send bindpassword if it has been changed
* fix: don't send blank bindPassword when it is still *****
* merge conflict
* [MM-64480] Refactor Admin Definition (#31280)
* move ldap definition to its own file for simplicity & context
* refactor admin_definition to eliminate circular dependencies
* merge conflicts
* before: buggy userHasReadPermissinOnSomeResources; after: fix incorrect snapshot
* merge conflict: new bindPasssword definition was left behind; fixed.
* merge conflict
* [MM-63765] LDAP Wizard: User filter expandable section (#31286)
* add "more info" hover to user filter help texts; make wider
* add expandable_setting type and component
* use Dislosure show/hide pattern for accessibility
* fix tooltip scss selectors
* fix hover -> more_info; make sure translation files are correct
* use join('\n\n') instead of the eslint disable line
* Revert "use join('\n\n') instead of the eslint disable line"
This reverts commit 274667e875b34703f14fee0706cd28b0125cefc9.
* [MM-64482] LDAP Wizard - Test User filters (#31312)
* initial cut at UI and backend for test filters
* api definitions; mocks
* clean up to current standards
* [MM-64512] - Test user filters UI (#31355)
* result_count -> total_count
* json cannot marshal error, returning error as string as god intended
* render errors with icon, hover text, and better feedback texts
* gather the settings that may be in expandable sections
* remove success, use error == "" to indicate success
* [MM-64536] LDAP Wizard: Test user attributes (#31373)
* LdapFilterTestResult -> LdapDiagnosticResult; FilterName -> TestName
* implement test_attributes endpoint and limited frontend (first step)
* adding EntriesWithValue
* [MM-64550] LDAP Wizard: Test user attributes UI (#31374)
* [MM-64551] LDAP Wizard: Test group attributes (#31375)
* remove Test LDAP button (not needed); reused helptext for other btn
* implement test_group_attributes endpoint; button/client-side paths
* [MM-64552] LDAP Wizard: Test group attributes UI (#31376)
* implement Test Group Attributes button
* simplify helper functions (improves useCallback dependencies)
* show the default filter that was used on the backend in the tooltip
* show the icon when there's an error (e.g. required filter/attribute)
* fix infinite rerendering
* fix error after failed save; fix navigation unlocked after save
* empty
* Adjust message feedback given we don't test the schema anymore
* improve css; don't use inline styles
* removed unneccesary pointer indirection
* improved i18n strings and logic
* combining filters/attributes/group attributes endpoints
improve types
* improve help text for User Filter (it's tricky)
* AvailableAttrs -> AvailableAttributes
* fix for e2e tests (renamed title)
* more e2e fixes
* skip broken e2e test
---------
Co-authored-by: Asaad Mahmood <asaadmahmood@users.noreply.github.com>
* [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>
* 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>
* initial implementation of test documentation in spec file with AI-assisted prompt from Claude and linter script
* update snapshots
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* pageup/pagedown button scroll for center post-list
* revert package.json
* changing id, using ? and returning in keyHandler
* added e2e test for pageup/pagedown scroll
* Fix dynamic-virtualized-list not being in lockfile and update path
Moving the package under the MM namespace wasn't necessary, but it stops
some warnings from NPM.
* Move E2E test from Cypress to Playwright
Cypress's cy.type doesn't seem to properly trigger browser functions
because it doesn't seem to use native keyboard events. A newer version
of Cypress has a new cy.press method which is supposed to use native
keyboard events, but it also only supports the tab key currently, so it
wouldn't be useful here.
* Fix new test on iPad
* Add page up/down support to RHS and Threads view
* Update type definitions for dynamic-virtualized-list
---------
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
* MM-61173 - channel settings modal: base modal, initial commit, file creation and base component
* new enhancements to the base modal creation
* revert changes on textbox_links and edit channel header
* fix types and add back unintentioned deleted value
* add the preview textbox component
* extract logic for info tab into its own component
* add the purpose input to the window
* move other component logic to its own component and code clean up
* ability to update channel type
* more advances on the archive channel tab
* fix unit test in textbox
* fix translations
* do not show the archive modal in default channel
* fix issue with url editor not being resetted on undo action
* adjust text and styling for the header and purpose inputs
* remove textboxlinks and use button eye icon
* adjust test and preview button style
* add unit test to channel patch
* move logic from parent modal to info tab component
* fix border issues and focus back to preview textareas
* prevent saving changes when pressing enter when selecting an icon
* enhance input component to cover limits validations and enhances tests
* set default error message for save changes panel
* add props to provide custom value to the buttons
* remove channel input errors on reset button click
* create new component settings textbox
* rename component to advanced textbox and add unit tests
* styling of the info tab and add error state to advanced textbox
* add logic to prevent tab switch with unsaved changes
* adjust url error logic and code clean up
* code clean up and enhance comments
* add char min length to advanced textbox logic
* add the channel settings modal to the new menu
* add new test files and fix reset error
* remove unused error variables
* adjust translations and remove unncesary import
* enhance permissions for archive channels and manage channel settings
* Adjust permission tree so channel admins can convert from private to public
* enhance the test suit around channel conversion type
* fix some e2e tests and solve channel input name issue
* fix unit test by interacting first with the input element
* adjust e2e tests to channel settings modal changes
* remove commented tests and implement pr feedback
* adjust more pr feedback to the code
* more pr feedback enhancements
* further enhancements to tab navigation, and adjust more e2e tests
* remove unused components and fix e2e tests
* revert unnecessary permissions changes
* Add name label to textboxes
* adjust e2e and unit tests
* revert min lenght change value and adjust tests and snapshots
* Channel banner settings (#30721)
* Added channel banner setting header
* Updated section styling
* handled animation
* handled min and max lengths
* cleanup
* color change fix
* general improvements
* Fixed API test
* removed unused param className
* added e2e tests
* test: add channel settings configuration tab test file
* Based on the context, here's a concise commit message for this change:
feat: Add comprehensive tests for ChannelSettingsConfigurationTab
* added some more tests
* CI
* reverted package-lock.json changes in Playwright
* remove extra border from advaced textbox
* adjust styling for name label in advance texbox and restart preview state on modal close
* sync package.lock in playwright
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Harshil Sharma <harshilsharma63@gmail.com>
Co-authored-by: Harshil Sharma <18575143+harshilsharma63@users.noreply.github.com>
* add e2e tests for custom profile settings
* fix failed tests
* reorg folder and file convention, and add more details of the tests
* add e2e-tests for custom profile attributes in profile popover
* cleanup
* add test keys, move to folder of feature and move common function and constants to helper file
---------
Co-authored-by: Saturnino Abril <5334504+saturninoabril@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
* MM-63313 Make theme setting radio buttons horizontal and update text
* MM-63313 Add Playwright test for a11y of theme settings
* Update snapshot
* Run prettier on E2E tests
* Address feedback
* Ensure new test reliably passes on Firefox
For whatever reason, Firefox lets you tab onto the Sidebar Styles panel
while it's expanding, possibly because it's a scrollable container with
overflowing content or because other browsers don't register the
children of that panel as visible while the panel is animating open.
Either way, we can look at the CSS on the panel to confirm when the
transition is done.
* Revert previous changes made to premade theme label alignment and size
In the last PR, these were changed from generic divs to buttons, and the
default browser style for buttons adds some extra padding and centres
the button text by default, so we have to override that.
* Adjust margins on inline radio group
* Fix playwright test code styling
* Fix bad import in E2E tests
* add e2e tests for custom profile settings
* fix failed tests
* reorg folder and file convention, and add more details of the tests
---------
Co-authored-by: Mattermost Build <build@mattermost.com>
* test PermissionView semantics
* change required ancillary permissions
`PermissionSysconsoleReadReportingTeamStatistics` doesn't strictly need `PermissionViewTeam`, but can work with whatever teams the user has access to.
* remove unnecessary timeouts
* remove redundant comment
* update snapshots
* Update e2e-tests/playwright/specs/functional/system_console/permissions/team_access.spec.ts
Co-authored-by: Saturnino Abril <5334504+saturninoabril@users.noreply.github.com>
---------
Co-authored-by: Saturnino Abril <5334504+saturninoabril@users.noreply.github.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
* move "e2e-tests/playwright/test" to "e2e-tests/playwright/test" and expose "ensurePluginsLoaded"
* add test setup, and expose ensurePluginsLoaded and ensureServerDeployment to pw