219 Коммитов

Автор SHA1 Сообщение Дата
Caleb Roseland
f52e08754c MM-62050: restrict channel bookmarks in archived channels (#29490) 2025-02-04 15:10:32 -06:00
Agniva De Sarker
ae9e6174e5 [AI assisted]: Improve system console statistics performance (#29899)
```release-note
NONE
```

Co-authored-by: Matthew Birtch <mattbirtch@gmail.com>
2025-02-04 21:54:01 +05:30
Saurabh Sharma
e8e40c79f6 [MM-61577]: Ensure all interactive functionality is operable with the keyboard in emoji picker (#29629) 2025-02-03 12:26:49 +05:30
Saurabh Sharma
28dbc3cabb [MM-61598]: Fix ARIA roles, states, and properties are valid in user profile image and @user buttons (#29692)
* [MA-26]: Fix ARIA roles, states, and properties are valid in user profile image and @user buttons

* [MA-26]: Remove irrelevant e2e tests

* [MA-26]: Remove nested interactive elements

* [MA-26]: Updated mention-link styles

* Minor change

---------

Co-authored-by: ayush-chauhan233 <ayush.chauhan@brightscout.com>
2025-02-02 13:50:01 -05:00
Devin Binnie
c079020e9e [MM-62113] Force reload of team unreads when following/unfollowing a thread (#29994)
* [MM-62113] Force reload of team unreads when following/unfollowing a thread

* E2E test

* add test key

---------

Co-authored-by: yasserfaraazkhan <attitude3cena.yf@gmail.com>
2025-01-31 16:30:06 +00:00
ayush-chauhan233
a013797ed0 [MM-45724] Accessibility on ATE unexpectedly able to tab on hidden formatting controls/buttons (#29722) 2025-01-31 21:55:40 +05:30
Saurabh Sharma
7a959038f9 [MM-61599]: Remove tabIndex from non-interactive elements (#29659) 2025-01-31 21:54:56 +05:30
Jesús Espino
f1acdce42c Removing opentracing (#29965)
* Removing opentracing

* Fixing CI
2025-01-29 07:45:13 +01:00
Saurabh Sharma
57f13549d7 [MM-61627]: Fix focus order in sidebar (#29743) 2025-01-28 19:44:06 +05:30
ayush-chauhan233
77ab7b92c6 [MM-61595]: Removed the unnecessary dialog text from toggle button's aria-label property (#29595) 2025-01-28 19:42:39 +05:30
ayush-chauhan233
ed161f31be [MM-61674]: Added appropriate roles to the menu component of post priority (#29545) 2025-01-28 12:40:02 +05:30
Christopher Poile
737bed311c MM-60115, MM-62436, MM-62493: Compliance export downloads from local and s3; e2e tests (#29806)
* add ZipReader method to filestore and file/s3 backends

to merge

to merge

* add WriteStreamResponse as an alternative to WriteFileResponse

* add generated layers

* enable download link; download job endpoint now streams export dir zips

* fix MM-62493

* re-enable e2e tests--we have download links, folks

* Add tests for ZipReader in filestore and s3store

* remove unnecessary error return on ZipReader

* little cleanup

* improve tests; some refactoring: s.Nil(err) -> s.NoError(err)

* blank commit

* backwards compatability for pre-10.5 job downloads

* compress file response; better errors; better comments; PR comments

* update generated app layers

* improve/widen tests; improve comments; simplify localstore ZipReader

* regenerate layers

* follow GoDoc conventions

* update generated layers

* remove unnecessary comment

* in jobs/job-id/download, clean exportDir before sending to ZipReader

* better comments; add an error return on ZipReader

* improve file permissions

* adjust tests for new error returns

* linting

* i18n
2025-01-27 09:28:07 +05:30
ayush-chauhan233
ca2b3fd528 [MM-61646]: Added logic to correctly give accessible name to channel header button (#29788)
* [MA-32]: Added logic to correctly give accessible name to channel header button

* [MA-32]: Fixed id name

* [MA-32]: Fixed failing e2e test case

* [MA-32]: Updated the aria-label attribute
2025-01-24 12:50:48 -05:00
Saurabh Sharma
54207acd6a [MM-61631]: Remove focusable child descendants (#29745)
* [MA-37]: Remove focusable child descendants

* [MA-37]: Fix E2E tests

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-01-24 09:52:16 -05:00
Mario Vitale
d3bd91843f Support E2E stress tests in run_tests.js (#29682)
* [skip ci] Adapt run_tests.js for stress testing
* [skip ci] Make channel_read_after_permalink_spec.js retry-able
* [skip ci] Fix ui_commands.ts fix
* [skip ci] Improve postMessageAndWait
* [skip ci] Fix unread_on_public_channel_spec.js
* [skip ci] Demote unread_on_public_channel_spec.js
* Update e2e-tests/README.md

Co-authored-by: Saturnino Abril <5334504+saturninoabril@users.noreply.github.com>

* [skip ci] Fix mesage_reply_bot_post_spec.js

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Saturnino Abril <5334504+saturninoabril@users.noreply.github.com>
2025-01-23 14:07:38 +01:00
M-ZubairAhmed
1373c05931 [MM-61966] "Browse or Create channel" menu on the right of team drop-down should use a11y supported menu (#29739) 2025-01-22 10:40:43 +05:30
ayush-chauhan233
5fbd6e1139 [MM-61588]: Fixed the keyboard interactivity of tablist and added appropriate ARIA properties (#29592)
* [MA-9]: Fixed the keyboard interactivity of tablist and added appropriate ARIA properties

* [MA-9]: Review Fixes: Added aria-level attribute to plugin preferences heading

* [MA-9]: Fixed failing e2e test case

* [MA-9]: Fixed styling in mobile view and fixed failing e2e test cases

* [MA-9]: Minor Refactoring

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-01-20 16:25:11 -05:00
ayush-chauhan233
d28f84f525 [MM-61684]: Updated the heading element tag(#29841) 2025-01-20 15:56:40 +00:00
Saurabh Sharma
2d61d13940 [MM-61637]: Add accessible name to the expand RHS button in RHS header (#29783)
* [MA-48]: Add aria-label

* [MA-48]: Update snapshots

* [MA-48]: Fix E2E tests
2025-01-16 16:03:34 -05:00
Saurabh Sharma
132c27fb34 [MM-55285]: Screen reader speaking wrong item in list in Find Channels modal (#29552)
* [MA-11]: Fix Screen reader speaking wrong item in list in Find Channels modal

* [MA-11]: Update types across files

* [MA-11]: Minor refactoring

* [MA-11]: Fix e2e test

* [MA-11]: Fix E2E tests

* [MA-11]: Update role and id

* [MA-11]: Fix playwright tests

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-01-16 14:35:13 -05:00
ayush-chauhan233
5c08e0de0b [MM-61587]: Added appropriate ARIA attributes in the channel header (#29563)
* [MA-8]: Added appropriate ARIA attributes in the channel header

* [MA-8]: Review Fixes: Updated the aria-expanded ternary condition

* [MA-8]: Rebased with master and fixed e2e failing test

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-01-15 17:24:24 -05:00
M-ZubairAhmed
4b6216f5a4 [MM-55274] User account menu doesn't follow standard accessible keyboard behavior (#29173) 2025-01-15 00:55:38 +05:30
Pablo Vélez
c01f212f60 MM-62288 - add e2e to RHS focus functionality (#29655)
* MM-62288 - add e2e to RHS focus functionality

* remove describe only

* Use existence check before closing RHS

* modify close rhs function to not fail when rhs is not opened

* avoid body to not get found

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-01-14 08:04:08 -05:00
Pablo Vélez
94ae7905ad MM-61576 - add a11y to messages and files results tabs (#29740)
* MM-61576 - add a11y to messages and files results tabs

* add coverage for left-right arrow focus tab and fix broken test

* add the proper role and label to RHS - MM-61615

* fix linter

* fix e2e tests

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2025-01-14 08:03:42 -05:00
M-ZubairAhmed
25a6501e10 [MM-62384] Move ChannelHeaderPopover from BootstrapOverlay/Popper to Floating-UI (#29820) 2025-01-14 11:49:55 +00:00
Christopher Poile
aba4434dab MM-59966 - Compliance Export overhaul - feature branch (#29789)
* [MM-59089] Add a compliance export constant (#27919)

* add a useful constant

* i18n

* another constant

* another i18n

* [MM-60422] Add GetChannelsWithActivityDuring (#28301)

* modify GetUsersInChannelDuring to accept a slice of channelIds

* add GetChannelsWithActivityDuring

* add compliance export progress message; remove unused custom status

* linting

* tests running too fast

* add batch size config settings

* add store tests

* linting

* empty commit

* i18n changes

* fix i18n ordering

* MM-60570 - Server-side changes consolidating the export CLI with server/ent code (#28640)

* add an i18n field; add the CLI's export directory

* int64 -> int

* Add UntilUpdateAt for MessageExport and AnalyticsPostCount

to merge

* remove now-unused i18n strings

* add TranslationsPreInitFromBuffer to allow CLI to use i18n

* use GetBuilder to simplify; rename TranslationsPreInitFromFileBytes

* [MM-59089] Improve compliance export timings (#1733 - Enterprise repo)

* MM-60422 - Performance and logic fixes for Compliance Exports (#1757 - Enterprise repo)

* MM-60570 - Enterprise-side changes consolidating the export CLI with server/ent code (#1769 - Enterprise repo)

* merge conflicts; missed file from ent branch

* MM-61038 - Add an option to sqlstore.New (#28702)

remove useless comment

add test

add an option to sqlstore.New

* MM-60976: Remove RunExport command from Mattermost binary (#28805)

* remove RunExport command from mattermost binary

* remove the code it was calling

* fix i18n

* remove test (was only testing license, not functionality)

* empty commit

* fix flaky GetChannelsWithActivityDuring test

* MM-60063: Dedicated Export Filestore fix, redo of #1772 (enterprise) (#28803)

* redo filestore fix #1772 (enterprise repo) on top of MM-59966 feature

* add new e2e tests for export filestore

* golint

* ok, note to self: shadowing bad, actually (when there's a defer)

* empty commit

* MM-61137 - Message export: Support 7.8.11 era dbs (#28824)

* support 7.8.11 era dbs by wrapping the store using only what we need

* fix flaky GetChannelsWithActivityDuring test

* add a comment

* only need to define the MEFileInfoStore (the one that'll be overridden)

* blank commit

* MM-60974 - Message Export: Add performance metrics (#28836)

* support 7.8.11 era dbs by wrapping the store using only what we need

* fix flaky GetChannelsWithActivityDuring test

* add a comment

* only need to define the MEFileInfoStore (the one that'll be overridden)

* performance metrics

* cleanup unneeded named returns

* blank commit

* MM-60975 - Message export: Add startTime and endTime to export folder name (#28840)

* support 7.8.11 era dbs by wrapping the store using only what we need

* fix flaky GetChannelsWithActivityDuring test

* add a comment

* only need to define the MEFileInfoStore (the one that'll be overridden)

* performance metrics

* output startTime and endTime in export folder

* empty commit

* merge conflict

* MM-60978 - Message export: Improve xml fields; fix delete semantics (#28873)

* support 7.8.11 era dbs by wrapping the store using only what we need

* fix flaky GetChannelsWithActivityDuring test

* add a comment

* only need to define the MEFileInfoStore (the one that'll be overridden)

* performance metrics

* output startTime and endTime in export folder

* empty commit

* add xml fields, omit when empty, tests

* fix delete semantics; test (and test for update semantics)

* clarify comments

* simplify edited post detection, now there's no edge case.

* add some spacing to help fast running tests

* merge conflicts/updates needed for new deleted post semantics

* linting; fixing tests from upstream merge

* use SafeDereference

* linting

* stronger typing; better wrapped errors; better formatting

* blank commit

* goimports formatting

* fix merge mistake

* minor fixes due to changes in master

* MM-61755 - Simplifying and Support reporting to the db from the CLI (#29281)

* finally clean up JobData struct and stringMap; prep for CLI using db

* and now simplify using StringMapToJobDataWithZeroValues

* remove unused fn

* create JobDataExported; clean up errors

* MM-60176 - Message Export: Global relay cleanup (#29168)

* move global relay logic into global_relay_export

* blank commit

* blank commit

* improve errors

* MM-60693 - Refactor CSV to use same codepath as Actiance (#29191)

* move global relay logic into global_relay_export

* blank commit

* refactor (and simplify) ExportParams into shared

* blank commit

* remove unused fn

* csv now uses pre-calculated joins/leaves like actiance

* improve errors

* remove nil post check; remove ignoredPosts metric

* remove unneeded copy

* MM-61696 - Refactor GlobalRelay to use same codepath as Actiance (#29225)

* move global relay logic into global_relay_export

* blank commit

* refactor (and simplify) ExportParams into shared

* blank commit

* remove unused fn

* csv now uses pre-calculated joins/leaves like actiance

* remove newly unneeded function and its test. goodbye.

* refactor GetPostAttachments for csv + global relay to share

* refactor global_relay_export and fix tests (no changes to output)

* improve errors

* remove nil post check; remove ignoredPosts metric

* remove unneeded copy

* remove unneeded nil check

* PR comments

* MM-61715 - Generalize e2e to all export types 🤖  (#29369)

* move global relay logic into global_relay_export

* blank commit

* refactor (and simplify) ExportParams into shared

* blank commit

* remove unused fn

* csv now uses pre-calculated joins/leaves like actiance

* remove newly unneeded function and its test. goodbye.

* refactor GetPostAttachments for csv + global relay to share

* refactor global_relay_export and fix tests (no changes to output)

* improve errors

* remove nil post check; remove ignoredPosts metric

* remove unneeded copy

* remove unneeded nil check

* PR comments

* refactor isDeletedMsg for all export types

* fix start and endtime, nasty csv createAt bug; bring closer to Actiance

* align unit tests with new logic (e.g. starttime / endtime)

* refactor a TimestampConvert fn for code + tests

* bug: pass templates to global relay (hurray for e2e tests, otherwise...)

* add global relay zip to allowed list (only for tests)

* test helpers

* new templates for e2e tests

* e2e tests... phew.

* linting

* merge conflicts

* unexport PostToRow; add test helper marker

* cleanup, shortening, thanks to PR comments

* MM-61972 - Generalize export data path - Actiance (#29399)

* extract and generalize the export data generation functions

* finish moving test (bc of previous extraction)

* lift a function from common -> shared (to break an import cycle)

* actiance now takes general export data, processes it into actiance data

* bring tests in line with correct sorting rules (upadateAt, messageId)

* fixups, PR comments

* turn strings.Repeat into a more descriptive const

amended: one letter fix; bad rebase

* MM-62009 - e2e clock heisenbug (#29434)

* consolidate assertions; output debuggable diffs (keeping for future)

* refactor test output generator to generators file

* waitUntilZeroPosts + pass through until to job = fix all clock issues

* simplify messages to model.NewId(); remove unneeded waitUntilZeroPosts

* model.NewId() -> storetest.NewTestID()

* MM-61980 - Generalize export data path - CSV (#29482)

* simple refactoring

* increase sleep times for (very) rare test failures

* add extra information to the generic export for CSV

* adj Actiance to handle new generic export (no difference in its output)

* no longer need mergePosts (yay), move getJoinLeavePosts for everyone

* adjust tests for new csv semantics (detailed in summary)

* and need to add the new exported data to the export_data_tests

* rearrange csv writing to happen after data export (more logical)

* linting

* remove debug statements

* figured out what was wrong with global relay e2e test 3; solid now

* PR comments

* MM-61718 - Generalize export data path - Global Relay (#29508)

* move global relay over to using the generalized export data

* performance pass -- not much can be done

* Update server/enterprise/message_export/global_relay_export/global_relay_export.go

Co-authored-by: Claudio Costa <cstcld91@gmail.com>

---------

Co-authored-by: Claudio Costa <cstcld91@gmail.com>

* MM-62058 - Align CSV with Actiance (#29551)

* refactoring actiance files and var names for clarity

* bug found in exported attachments (we used to miss some start/ends)

* changes needed for actiance due to new generic exports

* bringing CSV up to actiance standards

* fixing global relay b/c of new semantics (adding a note on an edge case)

* aligning e2e tests, adding comments to clarify what is expected/tested

* necessary changes; 1 more test for added functionality (ignoreDeleted)

* comment style

* MM-62059 - Align Global Relay with Actiance/CSV; many fixes (#29665)

* core logic changes to general export_data and the specific export paths

* unit tests and e2e tests, covering all new edge cases and all logic

* linting

* better var naming, const value, and cleaning up functions calls

* MM-62436 - Temporarily skip cypress tests that require download link (#29772)

---------

Co-authored-by: Claudio Costa <cstcld91@gmail.com>
2025-01-10 16:56:02 -05:00
M-ZubairAhmed
db3b72e46c [MM-62381] Move LinkTooltip from Popper to Floating-UI (#29727) 2025-01-09 16:18:23 +05:30
Saurabh Sharma
a3b2ecec19 [MM-61571]: Add label to form field in channel header (#29553)
* [MA-12]: Add label to form field in channel header

* [MA-12]: Update aria attributes and tests

* [MA-12]: Update snapshots, fix e2e test

* [MA-12]: Fix E2E tests

* [MA-12]: Fix type in test
2025-01-08 17:04:42 -05:00
Mario Vitale
0345cba209 [skip ci] Stabilize users_reactivation_spec.js E2E testcase (#29664) 2024-12-20 14:37:03 -04:00
Pablo Vélez
a9efd0f6d5 MM-61968 - a11y rhs focus management (#29591)
* MM-61968 - a11y rhs focus management

* fix condition when rhs was already open and not getting focus

* fix typescript errors

* skip failing test

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-12-19 12:07:27 -05:00
Caleb Roseland
09add85a51 MM-61525, MM-61868: Autohide channel bookmarks when empty (#29454) 2024-12-19 09:23:29 -06:00
ayush-chauhan233
eb3862f6eb [MM-61652]: Removed unnecessary role and aria-level from channel header (#29540)
* [BST-183]: Removed unnecessary role and aria-level from channel header

* [BST-183]: Fix failing E2E test case

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-12-18 17:38:21 -05:00
M-ZubairAhmed
fd6a662d76 [MM-62074] Move tooltips with withTooltip to new Tooltip component (#29528)
* replace inside of comp/withtooltip

* remove overlay trigger eslint rl

* update location of prev migrated new tooltips

* copy button

* shared_channel_indicator, shared_user_indicator.tsx, size_aware_image

* actions_menu, old_admin_settings, schema_admin_settings, admin_settings

* billing_summary, brand_image_setting, edit_section_edit_table_row, elapsed_duration_cell

* permissions_scheme_summary,secure_connections/controls,system_users_column_toggler_menu,system_users_export,group/group_users/users_to_remove_groups

* team_profile,user_grid_role_dropdown,priority_labels,toggle_formatting_bar,use_emoji_picker,formatting_icon

* show_formatting,alert_banner others

* more

* snap fix

* add disabled prop to menu

* test fix for avatar

feat: Add id to WithTooltip in Avatars component to fix test failures

* combine refs in withtooltip

* channel header title favorite test fix

* priority label comp changes

* types check for children

* Update avatar.tsx

* e2e fixes

* fix E2E tests

* Remove memo from WithTooltip

I found that the web app leaks a fair bit less memory when this is removed. See https://community.mattermost.com/core/pl/gwyyoww9gtbg8fddoic9meq84y for more information

* e2e lint fixes

* e2e fixes

* Fix test style issue

---------

Co-authored-by: yasserfaraazkhan <attitude3cena.yf@gmail.com>
Co-authored-by: Harrison Healey <harrisonmhealey@gmail.com>
Co-authored-by: Mattermost Build <build@mattermost.com>
2024-12-18 21:56:30 +00:00
M-ZubairAhmed
6f73204448 [MM-56713] Show consistent markdown formatting buttons & keyboard shortcuts when editing messages (#29398)
* footer

* changes

* edit

* some changes

* form submit

* ci fixes

* rev fix 1

* ci fix

* Fixed some styles

* Added delete on empty post option

* fix E2E tests

* fix more tests

* Fixed UI isses when editing post in RHS

* Fixed formatting bar behjaviour

* Reset draft to original post when cancelling or escaping

* DFisplayed @mention warning

* fixed existing test

* Added test for @mention during editing

* Displayed long message warning during edit post

* Removed a console log:

* Handled message with image links when using image proxy

* Fixed a11y styling for button

* Fixed emoji picker keyboard shortcut

* Checnged edit box ID

* Added draft test

* Fixed edit text box id

* e2e fix

* e2e fix

* handled deleting empty fposts

* Fixed e2e test

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
Co-authored-by: Harshil Sharma <harshil.sharma@mattermost.com>
Co-authored-by: yasserfaraazkhan <attitude3cena.yf@gmail.com>
2024-12-18 13:17:42 +05:30
Harrison Healey
f11ed97a5c MM-62046 Associate most labels with controls and enable label-has-associated-control ESLint rule (#29510)
* Remove label from add_user_to_channel_modal.tsx

The label isn't needed here because it was incorrectly used for error
text. I had to add the display: block to the .modal__error class to
ensure the top margin was the same as before, but I could remove the
font-weight from that class since it was only needed to counteract
the weight that Bootstrap adds for labels.
:

* Remove label from bleve_settings.tsx and replace with SettingSet

It doesn't seem correct to use a label here because it isn't tied to a
single form field. Since this component is a set of fields (a fieldset,
if you will) that looks like a setting, it seemed like a good place to
use SettingSet.

* Remove label from brand_image_setting.tsx, replace with SettingSet, and improve a11y of upload button

Like the last commit for BleveSettings, this setting is multiple inputs,
so it makes more sense as a fieldset/SettingSet.

While doing that, I also changed how the file upload button in
BrandImageSetting works because the new HTML broke how it worked before.
Previously, we overlayed an transparent file input over the button for it,
but the sizing for that got messed up, and that causes some weird
accessibility and breaks some things like hover effects. Instead, the
file input is now fully hidden, and clicking on the button triggers the
file input programatically. The behaviour is otherwise the same, but the
button now shows the hover style and there's only one keyboard focus for
the button.

* Remove some more labels from PluginManagement and use SettingSet there

* Add for attribute to labels in compliance_reports.tsx

* Use SettingSet and add the for attribute to another label in DatabaseSettings

* Use SettingSet in ElasticsearchSettings

* Add for attribute to label in GroupProfile

* Don't use label for help text in TeamEditionRightPanel

For this, I had to add a new CSS class to make the element appear as if
it was a label element as affected by Bootstrap. There's likely some
cases that this won't work, but it applies the same margin and
font-weight.

* Don't use label for help text in TrialBanner

* Don't use label for a heading in PasswordSettings

* Don't use label element in table in ChannelModeration

This text is more like a legend element in SettingSet, but I didn't use
that because it's in a table. This could possibly be given its own
CSS class.

* Don't use label element for error text in AdvancedTextEditor and MessageSubmitError

* Don't use label for help text and add for attribute in RenameChannelModal

* Don't use label for error text in SelectTeam

* Add for attribute to labels in various components

* Turn jsx-a11y/label-has-associated-control to an error

* Fix E2E test
2024-12-17 16:50:06 -05:00
Mario Vitale
bac251f312 Demote oauth_spec.ts (#29631)
* Demote oauth_spec.ts
* Remove single testcase skips for oauth_spec.ts
2024-12-17 18:41:22 +01:00
Caleb Roseland
f556965a32 MM-62044: Always show title in create bookmark flow (#29476) 2024-12-16 11:31:04 -06:00
Harrison Healey
a21d470bee MM-62045 Enable eslint-plugin-jsx-a11y and fix occurrences of jsx-a11y/anchor-has-content (#29453)
* Enable eslint-plugin-jsx-a11y and add standard rules as warnings or errors

* Fix jsx-a11y/anchor-has-content in BooleanSetting and add SettingSet

The invisible anchor was presumably supposed to let people jump from one
setting's help text to another setting. That didn't work for boolean
settings because there's no element with the ID of the setting. Instead
of an empty anchor, we needed to give something else that ID.

To improve the semantics of those settings, I also put those settings
into a fieldset with a legend containing the setting's label text
instead of using an actual label element as per how it's done on the
MDN. We'll probably end up using the SettingSet for other settings as
well.

Finally, I also fixed the link used by admin.service.useLetsEncryptDescription.disabled
to point to the right place and made it so that the link would open in
the current tab. Ideally, I'd also remove the Markdown from that help
text, but there's a lot here already.

* Fix jsx-a11y/anchor-has-content in CheckboxSetting

* Use SettingSet in PasswordSettings to improve semantics and layout

The main reason for doing this is to use a proper legend and fieldset
for these settings, but it also has the benefit of removing the extra
spacing from in between these settings.

* Change CopyText to use a button and require an aria-label for it

This fixes two ESLint warnings:
- This was failing jsx-a11y/anchor-has-content because it was an empty
  anchor element. I fixed that by giving it an aria-label matching the
tooltip of the CopyText, but that required that the label was a string,
so I had to change how CopyText is used. I also made the label required
so that people give an accessible explanation of what is being copied.
- This was also failing jsx-a11y/anchor-is-valid because it should be a
  button instead of a link. I applied the btn-link class and made it so
that that doesn't override the link's height which hopefully doesn't
cause problems anywhere else.

This is to fix jsx-a11y/anchor-has-content and jsx-a11y/anchor-is-valid
in the component. The ESLint plugin is complaining that this component
is using an anchor instead of a button element, so I changed that

* Turn jsx-a11y/anchor-has-content to be an error

* Update snapshots

* Remove lingering reference to nested prop which has been removed

* Changing system console password settings to a list and update padding for alerts in it

* Fix typo in SettingSet

* Update E2E tests to enable Elasticsearch by ID and remove duplicate enableElasticSearch helper

* Update E2E test to look for a legend instead of a label

* Fix typo in snapshot
2024-12-13 22:04:36 +00:00
Mario Vitale
70b14c37c7 Daily E2E test fixes (#29580)
* [skip ci] Stabilize testcases, clean reporting for nighly unstables

* [skip ci] Better output naming

* [skip ci] Fix testcase failure fatal condition

* [skip ci] Make linter happy

* [skip ci] Revert global beforeEach change

* [skip ci] Fix workflow file, skip unstable tests

* [skip ci] Fix testcase_failure_fatal templating
2024-12-14 04:44:25 +08:00
Jesse Hallam
7179a9d1d6 reduce usage of Utils.localizeMessage (#29282)
* reduce usage of Utils.localizeMessage

As we begin to transition to react-intl's `formatjs` for extraction, our custom wrappers like `Utils.localizeMessage` prevent an adoption roadblock.

This is the first in a series of PRs to begin to migrate away in favour of:
* `useIntl` when inside React functional component
* use `injectIntl` and use access the `intl` prop from class components
* use the new `getIntl`, leveraging a memoized `createIntl` and the store outside of React components

I'm pausing in this effort to get a feel from peers on both the substance of these changes and best practices in supporting them.

* prefer shallowWithIntl, renderWithContext, and local injectIntl wrapping

* revert unintentional whitespaces

* clarify getIntl, add minor unit test

* avoid triggering mmjstool

* update e2e tests

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-12-13 09:49:28 -04:00
Jesús Espino
b8efccae69 Migrate MM-53377 regression test from Cypress to Playwright (#29460)
* feat: Migrate MM-53377 regression test from Cypress to Playwright

* fix: Update mm_53377 regression test to use admin client for setup

* fix: Correct admin client usage in mm_53377 regression test

* refactor: Standardize mm_53377 Playwright test with consistent naming and imports

* fix: Mark MM-T53377 test as fixme for investigation

* Migrating mm_53377_regression_test_spec.js cypress test to playwright

* Fixing linter errors

* Addressing PR review comment

* Fixing broken test
2024-12-12 12:02:22 +01:00
Mario Vitale
861fcfb032 [skip ci] Stabilize replies_spec.ts (#29564) 2024-12-11 14:10:55 +01:00
Mario Vitale
7263ba4bc1 Enforce 0-failures for E2E tests (#29521) 2024-12-09 17:03:55 +01:00
M-ZubairAhmed
f80afad1b6 [MM-58441] Create a floating-ui Tooltip which will swap out ReactBootstrap tooltip (#29464)
Added a new tooltip
- components/team_sidebar/components/team_button.tsx
- components/post_view/reaction/reaction_tooltip/reaction_tooltip.tsx
- components/post_view/post_recent_reactions/post_recent_reactions.tsx
- components/common/comment_icon.tsx
2024-12-09 14:50:08 +00:00
Mario Vitale
a90f19dc0f [skip ci] Fix/demote testcases (#29497) 2024-12-06 13:23:27 +01:00
Harrison Healey
8533350a91 MM-61893 Replace usage of hasOwnProperty with Object.hasOwn (#29428)
* MM-61893 Replace usage of hasOwnProperty with Object.hasOwn

* Update type guard in messageToElement

* Replace a couple more hasOwnProperty calls
2024-12-03 21:53:23 +00:00
Jesse Hallam
7c6f1d4554 feat: Add tooltips to channel info RHS top buttons (#29170)
* feat: Add tooltips to channel info RHS top buttons

* style: address linting issues

* feat: Add accessibility ids to Tooltips in top_buttons.tsx

* leverage WithTooltip for standardized styling

---------

Co-authored-by: Mattermost Build <build@mattermost.com>
2024-12-02 10:16:20 -04:00
Harrison Healey
049aa42633 MM-59952/MM-61438 Fix web app not responding to WS events for status (#29371)
* MM-59952/MM-61438 Fix web app not responding to WS events for status

* Add E2E tests
2024-11-25 13:47:29 -05:00
Mario Vitale
37edbc8533 Stabilize and demote tests (#29367)
* Stabilize and demote tests
2024-11-25 17:05:35 +01:00
Mario Vitale
01b8359347 Add fixed testcase back in (#29345)
* Add fixed testcase back in
2024-11-21 14:00:23 +01:00