MM-54123 Add group to channel (#22954)
* adding group members to channel initial commit * adding group to channel functionality along with add new team members * fixing circular dependency * fixing e2e and other optimizations * adding e2e tests for adding group members to channels * cypress lint * fixing comments * adding count to button * improvements * adjusting some stuff from PR comments * remove ability to add user to team, update message for non-team members * remove adding to team from add groups functionality * update misspelled variable * lint and unit test fixes * add tests, cleanup * lint fix * revert package-lock.json * fixes for cypress tests * rename TeamInviteBanner to TeamWarningBanner, since invites are no longer allowed * update for warning * lint fixes * cleanup * fix failing e2e tests * update messages to not use markdown --------- Co-authored-by: Scott Bishel <scott.bishel@mattermost.com> Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
45
e2e-tests/cypress/tests/support/api/group.ts
Обычный файл
45
e2e-tests/cypress/tests/support/api/group.ts
Обычный файл
@@ -0,0 +1,45 @@
|
||||
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
||||
// See LICENSE.txt for license information.
|
||||
|
||||
// *****************************************************************************
|
||||
// Groups
|
||||
// https://api.mattermost.com/#tag/groups
|
||||
// *****************************************************************************
|
||||
|
||||
import {ChainableT} from '../../types';
|
||||
|
||||
function apiCreateCustomUserGroup(displayName: string, name: string, userIds: string[]): ChainableT<Cypress.Group> {
|
||||
return cy.request({
|
||||
headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||
url: '/api/v4/groups',
|
||||
method: 'POST',
|
||||
body: {
|
||||
display_name: displayName,
|
||||
name,
|
||||
source: 'custom',
|
||||
allow_reference: true,
|
||||
user_ids: userIds,
|
||||
},
|
||||
}).then((response) => {
|
||||
expect(response.status).to.equal(201);
|
||||
return cy.wrap(response);
|
||||
});
|
||||
}
|
||||
|
||||
Cypress.Commands.add('apiCreateCustomUserGroup', apiCreateCustomUserGroup);
|
||||
|
||||
declare global {
|
||||
// eslint-disable-next-line @typescript-eslint/no-namespace
|
||||
namespace Cypress {
|
||||
interface Chainable {
|
||||
|
||||
/**
|
||||
* Create custom user group
|
||||
* @param {string} displayName - the display name of the group
|
||||
* @param {string} name - the @ mentionable name of the group
|
||||
* @param {string[]} userIds - users to add to the group
|
||||
*/
|
||||
apiCreateCustomUserGroup: typeof apiCreateCustomUserGroup;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -8,6 +8,7 @@ import './cloud';
|
||||
import './cluster';
|
||||
import './common';
|
||||
import './data_retention';
|
||||
import './group';
|
||||
import './keycloak';
|
||||
import './ldap';
|
||||
import './playbooks';
|
||||
|
||||
Ссылка в новой задаче
Block a user