mirror of
https://github.com/hanzoai/team.git
synced 2026-10-30 14:49:35 +00:00
* refactor: migrate database/users_spec.js to ts - migrate file autocomplete/database/users_spec.js to typescripts - udpate system.d.ts data type adding type for shouldHaveElasticsearchDisabled * refactor: migrate users_in_channel_switcher_spec.js - migrate file users_in_channel_switcher_spec to typescript - fix issue with data type on file autocomplete/helpers.ts function verifySuggestionAtChannelSwitcher - fix issue with data type on file autocomplete/common_test.ts function doTestQuickChannelSwitcher * refactor: migrate users_in_message_input_box_spec to ts - migrate file database/users_in_message_input_box_spec.js to typescript - migrate file support/ui/suggestion_list.js to typescript and update docs and type definitions - update references to doTestPostextbox function - update references to verifySuggestionAtPostTextbox function --------- Co-authored-by: Mattermost Build <[email protected]>
45 lines
1.5 KiB
TypeScript
45 lines
1.5 KiB
TypeScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
// ***************************************************************
|
|
// - [#] indicates a test step (e.g. # Go to a page)
|
|
// - [*] indicates an assertion (e.g. * Check the title)
|
|
// - Use element ID when selecting an element. Create one if none.
|
|
// ***************************************************************
|
|
|
|
// Stage: @prod
|
|
// Group: @channels @autocomplete
|
|
|
|
import {getRandomLetter} from '../../../../utils';
|
|
import {doTestDMChannelSidebar, doTestUserChannelSection} from '../common_test';
|
|
import {createSearchData, SimpleUser} from '../helpers';
|
|
|
|
describe('Autocomplete with Database - Users', () => {
|
|
const prefix = getRandomLetter(3);
|
|
let testUsers: Record<string, SimpleUser>;
|
|
let testTeam: Cypress.Team;
|
|
|
|
before(() => {
|
|
cy.apiGetClientLicense().then(({isCloudLicensed}) => {
|
|
if (!isCloudLicensed) {
|
|
cy.shouldHaveElasticsearchDisabled();
|
|
}
|
|
});
|
|
|
|
createSearchData(prefix).then((searchData) => {
|
|
testUsers = searchData.users;
|
|
testTeam = searchData.team;
|
|
|
|
cy.apiLogin(searchData.sysadmin);
|
|
});
|
|
});
|
|
|
|
it('MM-T4081 Users in correct in/out of channel sections', () => {
|
|
doTestUserChannelSection(prefix, testTeam, testUsers);
|
|
});
|
|
|
|
it('MM-T4082 DM can be opened with a user not on your team or in your DM channel sidebar', () => {
|
|
doTestDMChannelSidebar(testUsers);
|
|
});
|
|
});
|