Этот коммит содержится в:
Mario Vitale
2023-03-27 16:28:42 +02:00
родитель da7a6825ce
Коммит ba6b97fb62
1142 изменённых файлов: 44 добавлений и 44 удалений

Просмотреть файл

@@ -0,0 +1,54 @@
// 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 @custom_status
describe('Custom Status - CTAs for New Users', () => {
before(() => {
cy.apiUpdateConfig({TeamSettings: {EnableCustomUserStatuses: true}});
// # Login as test user and visit channel
cy.apiInitSetup({loginAfter: true}).then(({team, channel}) => {
cy.visit(`/${team.name}/channels/${channel.name}`);
});
});
it('MM-T3851_1 should show Update your status in the post header', () => {
// # Post a message in the channel
cy.postMessage('Hello World!');
// * Check if the post header contains "Update your status" button
cy.get('.post.current--user .post__header').findByText('Update your status').should('exist').and('be.visible');
});
it('MM-T3851_2 should open status dropdown with pulsating dot when clicked on Update your status post header', () => {
// # Click the "Update your status" button
cy.get('.post.current--user .post__header').findByText('Update your status').click();
// * Status dropdown should open
cy.get('#statusDropdownMenu').should('exist');
// * Pulsating dot should be visible in the status dropdown
cy.get('#statusDropdownMenu .custom_status__row .pulsating_dot').should('exist');
});
it('MM-T3851_3 should remove pulsating dot and Update your status post header after opening modal', () => {
// # Open custom status modal and close it
cy.get('#statusDropdownMenu .custom_status__row .pulsating_dot').click();
cy.get('#custom_status_modal').should('exist').get('button.close').click();
// * Check if the post header contains "Update your status" button
cy.get('.post.current--user .post__header').findByText('Update your status').should('not.exist');
// * Check if the pulsating dot exists by opening status dropdown
cy.get('.MenuWrapper .status-wrapper').click();
cy.get('#statusDropdownMenu .custom_status__row .pulsating_dot').should('not.exist');
});
});

Просмотреть файл

@@ -0,0 +1,135 @@
// 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 @custom_status
describe('Custom Status - Setting a Custom Status', () => {
const defaultCustomStatuses = ['In a meeting', 'Out for lunch', 'Out sick', 'Working from home', 'On a vacation'];
const customStatus = {
emoji: 'calendar',
text: 'In a meeting',
};
before(() => {
cy.apiUpdateConfig({TeamSettings: {EnableCustomUserStatuses: true}});
// # Login as test user and visit channel
cy.apiInitSetup({loginAfter: true}).then(({channelUrl}) => {
cy.visit(channelUrl);
});
});
it('MM-T3836_1 should open status dropdown', () => {
// # Click on the sidebar header to open status dropdown
cy.get('.MenuWrapper .status-wrapper').click();
// * Check if the status dropdown opens
cy.get('#statusDropdownMenu').should('exist');
});
it('MM-T3836_2 Custom status modal opens with 5 default statuses listed', () => {
// # Open custom status modal
cy.get('#statusDropdownMenu li#status-menu-custom-status').click();
cy.get('#custom_status_modal').should('exist');
// * Check if all the default suggestions exist
defaultCustomStatuses.map((statusText) => cy.get('#custom_status_modal .statusSuggestion__content').contains('span', statusText));
});
it('MM-T3836_3 "In a meeting" is selected with the calendar emoji', () => {
// * Default emoji is currently visible in the custom status input
cy.get('#custom_status_modal .StatusModal__emoji-button span').should('have.class', 'icon--emoji');
// * Input should be empty
cy.get('#custom_status_modal input.form-control').should('have.value', '');
// # Select a custom status from the suggestions
cy.get('#custom_status_modal .statusSuggestion__content').contains('span', customStatus.text).click();
// * Emoji in the custom status input should be changed
cy.get('#custom_status_modal .StatusModal__emoji-button span').invoke('attr', 'data-emoticon').should('contain', customStatus.emoji);
// * Selected custom status text should be in the input
cy.get('#custom_status_modal input.form-control').should('have.value', customStatus.text);
});
it('MM-T3836_4 In a meeting is cleared when clicked on "x" in the input', () => {
// * Suggestions should not be visible
cy.get('#custom_status_modal .statusSuggestion').should('not.exist');
// # Click on the clear button
cy.get('#custom_status_modal .StatusModal__clear-container').click();
// * Input should be empty
cy.get('#custom_status_modal input.form-control').should('have.value', '');
// * All the suggestions should be visible again
defaultCustomStatuses.map((statusText) => cy.get('#custom_status_modal .statusSuggestion__content').contains('span', statusText));
});
it('MM-T3836_5 "In a meeting" is selected with the calendar emoji', () => {
// * Default emoji is currently visible in the custom status input
cy.get('#custom_status_modal .StatusModal__emoji-button span').should('have.class', 'icon--emoji');
// * Input should be empty
cy.get('#custom_status_modal input.form-control').should('have.value', '');
// # Select a custom status from the suggestions
cy.get('#custom_status_modal .statusSuggestion__content').contains('span', customStatus.text).click();
// * Emoji in the custom status input should be changed
cy.get('#custom_status_modal .StatusModal__emoji-button span').invoke('attr', 'data-emoticon').should('contain', customStatus.emoji);
// * Selected custom status text should be in the input
cy.get('#custom_status_modal input.form-control').should('have.value', customStatus.text);
});
it('MM-T3836_6 should set custom status when click on Set Status', () => {
// # Click on the Set Status button
cy.get('#custom_status_modal .GenericModal__button.confirm').click();
// * Modal should be closed
cy.get('#custom_status_modal').should('not.exist');
// * Status should be set and the emoji should be visible in the sidebar header
cy.uiGetProfileHeader().
find('.emoticon').
should('have.attr', 'data-emoticon', customStatus.emoji);
});
it('MM-T3836_7 should display the custom status tooltip when hover on the emoji in LHS header', () => {
// # Hover on the custom status emoji in the sidebar header
cy.uiGetProfileHeader().
find('.emoticon').
trigger('mouseover');
// * Custom status tooltip should be visible
cy.get('#custom-status-tooltip').should('exist');
// * Tooltip should contain the correct custom status emoji
cy.get('#custom-status-tooltip .custom-status span.emoticon').invoke('attr', 'data-emoticon').should('contain', customStatus.emoji);
// * Tooltip should contain the correct custom status text
cy.get('#custom-status-tooltip .custom-status span.custom-status-text').should('have.text', customStatus.text);
});
it('MM-T3836_8 should open custom status modal when emoji in LHS header is clicked', () => {
// * Check that the custom status modal is not open
cy.get('#custom_status_modal').should('not.exist');
// # Click on the custom status emoji in the sidebar header
cy.uiGetProfileHeader().
find('.emoticon').
click();
// * Check that the custom status modal should be open
cy.get('#custom_status_modal').should('exist');
});
});

Просмотреть файл

@@ -0,0 +1,126 @@
// 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 @custom_status
describe('Custom Status - Setting Your Own Custom Status', () => {
const customStatus = {
emoji: 'grinning',
text: 'Busy',
};
before(() => {
cy.apiUpdateConfig({TeamSettings: {EnableCustomUserStatuses: true}});
// # Login as test user and visit channel
cy.apiInitSetup({loginAfter: true}).then(({team, channel}) => {
cy.visit(`/${team.name}/channels/${channel.name}`);
});
});
it('MM-T3846_1 should change the emoji to speech balloon when typed in the input', () => {
// # Open the custom status modal
cy.uiOpenUserMenu('Set a Custom Status');
// * Default emoji is currently visible in the custom status input
cy.get('#custom_status_modal .StatusModal__emoji-button span').should('have.class', 'icon--emoji');
// # Type the status text in the input
cy.get('#custom_status_modal .StatusModal__input input').typeWithForce(customStatus.text);
// * Speech balloon emoji should now be visible in the custom status input
cy.get('#custom_status_modal .StatusModal__emoji-button span').invoke('attr', 'data-emoticon').should('contain', 'speech_balloon');
});
it('MM-T3846_2 should display the emoji picker when clicked on the emoji button', () => {
// # Click on the emoji button in the custom status input
cy.get('#custom_status_modal .StatusModal__emoji-button').click();
// * Emoji picker overlay should be opened
cy.get('#emojiPicker').should('exist');
});
it('MM-T3846_3 should select the emoji from the emoji picker', () => {
// * Check that the emoji picker is open
cy.get('#emojiPicker').should('exist');
// # Select the emoji from the emoji picker overlay
cy.clickEmojiInEmojiPicker(customStatus.emoji);
// * Emoji picker should be closed
cy.get('#emojiPicker').should('not.exist');
// * Selected emoji should be set in the custom status input emoji button
cy.get('#custom_status_modal .StatusModal__emoji-button span').invoke('attr', 'data-emoticon').should('contain', customStatus.emoji);
});
it('MM-T3846_4 should set custom status when click on Set Status', () => {
// # Click on the Set Status button
cy.get('#custom_status_modal .GenericModal__button.confirm').click();
// * Custom status modal should be closed
cy.get('#custom_status_modal').should('not.exist');
// * Correct custom status emoji should be displayed in the sidebar header
cy.uiGetProfileHeader().
find('.emoticon').
should('have.attr', 'data-emoticon', customStatus.emoji);
});
it('MM-T3846_5 should show custom status with emoji in the status dropdown', () => {
// # Open user menu
cy.uiOpenUserMenu();
// * Correct custom status text and emoji should be displayed in the status dropdown
cy.get('.status-dropdown-menu .custom_status__container').should('have.text', customStatus.text);
cy.get('.status-dropdown-menu .custom_status__row span.emoticon').invoke('attr', 'data-emoticon').should('contain', customStatus.emoji);
});
it('MM-T3846_6 should show previosly set status in the first position in Recents list', () => {
// # Click on the "Set a Custom Status" option in the status dropdown
cy.get('.status-dropdown-menu li#status-menu-custom-status').click();
// * Custom status modal should open
cy.get('#custom_status_modal').should('exist');
// * Previously set status should be first in the recents list along with the correct emoji
cy.get('#custom_status_modal .statusSuggestion__row').first().find('.statusSuggestion__text').should('have.text', customStatus.text);
cy.get('#custom_status_modal .statusSuggestion__row').first().find('span.emoticon').invoke('attr', 'data-emoticon').should('contain', customStatus.emoji);
});
it('MM-T3846_7 should set the same status again when clicked on the Set status', () => {
// # Select the first suggestion from the list and set the status
cy.get('#custom_status_modal .statusSuggestion__row').first().click();
cy.get('#custom_status_modal .GenericModal__button.confirm').click();
// * Custom status modal should be closed
cy.get('#custom_status_modal').should('not.exist');
// * Correct custom status emoji should be displayed in the sidebar header
cy.uiGetProfileHeader().
find('.emoticon').
should('have.attr', 'data-emoticon', customStatus.emoji);
});
it('MM-T3846_8 should clear the status when clicked on Clear status button', () => {
// # Open user menu then custom status
cy.uiOpenUserMenu(customStatus.text);
// # Click on the Clear status button
cy.findByRole('dialog', {name: 'Set a status'});
cy.findByText('Clear Status').click();
// # Open user menu
cy.uiOpenUserMenu();
// * Custom status text should not be displayed in the status dropdown
cy.get('.status-dropdown-menu .custom_status__row').should('not.have.text', customStatus.text);
});
});

Просмотреть файл

@@ -0,0 +1,120 @@
// 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 @custom_status
describe('Custom Status - Recent Statuses', () => {
const customStatus = {
emoji: 'grinning',
text: 'Busy',
};
const defaultStatus = {
emoji: 'calendar',
text: 'In a meeting',
};
before(() => {
cy.apiUpdateConfig({TeamSettings: {EnableCustomUserStatuses: true}});
// # Login as test user and visit channel
cy.apiInitSetup({loginAfter: true}).then(({team, channel}) => {
cy.visit(`/${team.name}/channels/${channel.name}`);
});
});
it('MM-T3847_1 set a status', () => {
// # Open the custom status modal
cy.uiOpenUserMenu('Set a Custom Status');
// # Type the custom status text in the custom status modal input
cy.get('#custom_status_modal .StatusModal__input input').typeWithForce(customStatus.text);
// # Select an emoji from the emoji picker and set the status
cy.get('#custom_status_modal .StatusModal__emoji-button').click();
// # Select the emoji from the emoji picker overlay
cy.clickEmojiInEmojiPicker(customStatus.emoji);
cy.get('#custom_status_modal .GenericModal__button.confirm').click();
// * Custom status emoji should be visible in the sidebar header
cy.uiGetProfileHeader().
find('.emoticon').
should('have.attr', 'data-emoticon', customStatus.emoji);
});
it('MM-T3847_2 should show status in the top in the Recents list', () => {
// # Open the custom status modal
cy.uiOpenUserMenu(customStatus.text);
// # Click on the clear button in the custom status modal
cy.get('#custom_status_modal .StatusModal__clear-container').click();
// * Custom status modal input should be empty
cy.get('#custom_status_modal input.form-control').should('have.value', '');
// * Set status should be the first in the Recents list
cy.get('#custom_status_modal #statusSuggestion__recents .statusSuggestion__row').first().find('.statusSuggestion__text').should('have.text', customStatus.text);
});
it('MM-T3847_3 should remove the status from Recents list when corresponding clear button is clicked', () => {
// # Hover on the first suggestion in the Recents list and the clear button should be visible
cy.get('#custom_status_modal #statusSuggestion__recents .statusSuggestion__row').first().trigger('mouseover');
cy.get('#custom_status_modal #statusSuggestion__recents .statusSuggestion__row').first().get('.suggestion-clear').should('be.visible');
// # Click on the clear button of the suggestion to remove the suggestion from the Recents list
cy.get('#custom_status_modal #statusSuggestion__recents .statusSuggestion__row').first().get('.suggestion-clear').click();
// * The custom status should be removed from the Recents
cy.get('#custom_status_modal .statusSuggestion__content').should('not.contain', customStatus.text);
});
it('MM-T3847_4 should set default status when clicked on the status', () => {
// # Set a custom status from the Suggestions by clicking on it and then clicking "Set Status" button
cy.get('#custom_status_modal .statusSuggestion__content').contains('span', defaultStatus.text).click();
cy.get('#custom_status_modal .GenericModal__button.confirm').click();
// * Check if custom status is successfully set by checking the emoji in the sidebar header
cy.uiGetProfileHeader().
find('.emoticon').
should('have.attr', 'data-emoticon', defaultStatus.emoji);
});
it('MM-T3847_5 should show status set in step 4 in the top in the Recents list', () => {
// # Open the custom status modal
cy.uiOpenUserMenu(defaultStatus.text);
// # Click on the clear button in the custom status modal input
cy.get('#custom_status_modal .StatusModal__clear-container').click();
// * Custom status modal input should be empty
cy.get('#custom_status_modal input.form-control').should('have.value', '');
// * The set status should be present at the top of the Recents list
cy.get('#custom_status_modal #statusSuggestion__recents .statusSuggestion__row').first().find('.statusSuggestion__text').should('have.text', defaultStatus.text);
});
it('MM-T3847_6 should remove the default status from Recents and show in the Suggestions', () => {
cy.get('#custom_status_modal #statusSuggestion__recents .statusSuggestion__row').first().trigger('mouseover');
cy.get('#custom_status_modal #statusSuggestion__recents .statusSuggestion__row').first().get('.suggestion-clear').should('be.visible');
// * The set status should be present in Recents list and not in the Suggestions list
cy.get('#custom_status_modal #statusSuggestion__recents').should('contain', defaultStatus.text);
cy.get('#custom_status_modal #statusSuggestion__suggestions').should('not.contain', defaultStatus.text);
// # Click on the clear button of the topmost suggestion
cy.get('#custom_status_modal #statusSuggestion__recents .statusSuggestion__row').first().get('.suggestion-clear').click();
// * The status should be moved from the Recents list to the Suggestions list
cy.get('#custom_status_modal #statusSuggestion__recents').should('not.exist');
cy.get('#custom_status_modal #statusSuggestion__suggestions').should('contain', defaultStatus.text);
});
});

Просмотреть файл

@@ -0,0 +1,170 @@
// 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.
// ***************************************************************
// Group: @channels @custom_status
describe('Custom Status - Verifying Where Custom Status Appears', () => {
const customStatus = {
emoji: 'grinning',
text: 'Busy',
};
let currentUser;
before(() => {
cy.apiUpdateConfig({TeamSettings: {EnableCustomUserStatuses: true}});
// # Login as test user and visit channel
cy.apiInitSetup({loginAfter: true}).then(({team, user, channel}) => {
cy.visit(`/${team.name}/channels/${channel.name}`);
currentUser = user;
});
});
it('MM-T3850_1 set a status', () => {
cy.uiOpenUserMenu('Set a Custom Status');
// # Type the custom status text in the custom status modal input
cy.findByPlaceholderText('Set a status').type(customStatus.text, {force: true});
// # Select an emoji from the emoji picker and set the status
cy.get('#custom_status_modal .StatusModal__emoji-button').click();
cy.get('#emojiPicker').should('be.visible').find('.emoji-picker__items').should('be.visible');
cy.findByTestId(customStatus.emoji).trigger('mouseover', {force: true}).click({force: true});
cy.get('#custom_status_modal .GenericModal__button.confirm').should('be.visible').click();
// * Custom status modal should be closed
cy.get('#custom_status_modal').should('not.exist');
});
it('MM-T3850_2 should display the custom status emoji in LHS header', () => {
// * Custom status emoji should be visible in the sidebar header
cy.uiGetProfileHeader().
find('.emoticon').
should('have.attr', 'data-emoticon', customStatus.emoji);
});
it('MM-T3850_3 should show custom status emoji in the post header', () => {
// # Post a message in the current channel
cy.postMessage('Hello World!');
// * Custom status emoji should be visible in the post header
cy.get('.post.current--user .post__header span.emoticon').should('exist').invoke('attr', 'data-emoticon').should('contain', customStatus.emoji);
});
it('MM-T3850_4 should show custom status emoji in the RHS post header', () => {
// # Hover on the last post by current user and click on the Reply button
cy.get('.post.current--user .post__header').should('be.visible').first().trigger('mouseover');
cy.get('.post.current--user .post__header').should('be.visible').first().get('.post-menu button[aria-label="reply"]').should('exist').click({force: true});
// * Custom status emoji should be visible in the RHS post header
cy.get('#rhsContainer .post-right__content .post.current--user.thread__root .post__header span.emoticon').should('exist').invoke('attr', 'data-emoticon').should('contain', customStatus.emoji);
// # Close the RHS sidebar
cy.get('#rhsCloseButton').click();
});
it('MM-T3850_5 should show full custom status in the user popover', () => {
// # Click on the post header of the last post by the current user and open profile popover
cy.get('.post.current--user .post__header .user-popover').first().click();
cy.get('#user-profile-popover').should('exist');
// * Check if the profile popover contains custom status text and emoji
cy.get('#user-profile-popover #user-popover-status').should('contain', customStatus.text);
cy.get('#user-profile-popover #user-popover-status span.emoticon').should('exist').invoke('attr', 'data-emoticon').should('contain', customStatus.emoji);
});
it('MM-T3850_6 should show custom status emoji next to username in the channel members popover', () => {
// # Click on the Members icon in the channel header and open the Member list popover
cy.get('#member_popover').should('exist').click();
cy.get('#member-list-popover').should('exist');
// * Custom status emoji should be visible next to username of the current user which is first in the list
cy.get('#member-list-popover .more-modal__row').first().get('span.emoticon').should('exist').invoke('attr', 'data-emoticon').should('contain', customStatus.emoji);
});
it('MM-T3850_7 should show custom status emoji next to username in the channel members modal', () => {
// # Click on the View members button in the member popover and open the channel members modal
cy.get('#member-list-popover .more-modal__button button').click();
cy.get('#channelMembersModal').should('exist');
// # Search the current user's username in the search input
cy.get('#searchUsersInput').type(currentUser.username);
// * Custom status emoji should be visible next to the username of the current user
cy.get('#channelMembersModal .more-modal__row span.emoticon').should('exist').invoke('attr', 'data-emoticon').should('contain', customStatus.emoji);
// # Close the channel members modal
cy.get('#channelMembersModal .close').click();
});
it('MM-T3850_8 should show custom status emoji next to username in the team members modal', () => {
// # Open team menu and click on "View Members"
cy.uiOpenTeamMenu('View Members');
cy.get('#teamMembersModal').should('exist');
// # Search the current user's username in the search input
cy.get('#searchUsersInput').type(currentUser.username);
// * Custom status emoji should be visible next to the username of the current user
cy.get('#teamMembersModal .more-modal__row span.emoticon').should('exist').invoke('attr', 'data-emoticon').should('contain', customStatus.emoji);
// # Close the team members modal
cy.get('#teamMembersModal .close').click();
});
it('MM-T3850_9 should show custom status emoji next to username in the more direct messages modal', () => {
// # Click on the + button for Direct messages and open the Direct messages modal
cy.get('button[aria-label="Write a direct message"]').click();
cy.get('#moreDmModal').should('exist');
// # Search the current user's username in the search input
cy.get('#moreDmModal #react-select-2-input').type(currentUser.username);
// * Custom status emoji should be visible next to the username of the current user
cy.get('#moreDmModal .more-modal__row span.emoticon').should('exist').invoke('attr', 'data-emoticon').should('contain', customStatus.emoji);
});
it('MM-T3850_10 should show custom status emoji next to username in DM in LHS Direct Messages section and full custom status in channel header', () => {
// # Click on the search result to open the Direct messages channel
cy.get('#moreDmModal .more-modal__row').should('be.visible').and('contain', currentUser.username).click({force: true});
// * Check if the channel is open and contains the channel header
cy.get('#channelHeaderDescription .header-status__text').should('exist');
// * Custom status text and emoji should be displayed in the channel header
cy.get('#channelHeaderDescription .header-status__text').should('contain', customStatus.text);
cy.get('#channelHeaderDescription .header-status__text span.emoticon').should('exist').invoke('attr', 'data-emoticon').should('contain', customStatus.emoji);
// * Custom status emoji should be visible along with username in the LHS Direct Messages section
cy.get('.SidebarChannelGroup_content').contains('(you)').get('span.emoticon').should('exist').invoke('attr', 'data-emoticon').should('contain', customStatus.emoji);
});
it('MM-T3850_11 should show custom status emoji at autocomplete', () => {
// # type: /message @[username]
cy.uiGetPostTextBox().type(`/message @${currentUser.username}`);
// * Autocomplete shows the user along with the custom status emoji
cy.get('#suggestionList').find('.suggestion-list__item').eq(0).contains(`@${currentUser.username}`).get('span.emoticon').should('exist').invoke('attr', 'data-emoticon').should('contain', customStatus.emoji);
cy.uiGetPostTextBox().type('{enter}');
});
it('MM-T3850_12 should show custom status emoji at channel switcher', () => {
// # Open Find Channels
cy.uiOpenFindChannels();
// # Type username on the input
cy.findByRole('textbox', {name: 'quick switch input'}).type(currentUser.username);
// * Custom status is shown next to username in the channel switcher
cy.get('#suggestionList').should('be.visible');
cy.findByTestId(currentUser.username).should('be.visible').
find('.emoticon').should('have.attr', 'data-emoticon', 'grinning');
});
});

Просмотреть файл

@@ -0,0 +1,56 @@
// 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 @custom_status
describe('Custom Status - Slash Commands', () => {
const customStatus = {
emoji: 'laughing',
text: 'Feeling happy',
};
before(() => {
cy.apiUpdateConfig({TeamSettings: {EnableCustomUserStatuses: true}});
// # Login as test user and visit channel
cy.apiInitSetup({loginAfter: true}).then(({channelUrl}) => {
cy.visit(channelUrl);
});
});
it('MM-T3852_1 should set custom status by slash command', () => {
// # Set the custom status using slash command
cy.postMessage(`/status :${customStatus.emoji}: ${customStatus.text}`);
// * Check if custom status is successfully set by checking the emoji in the sidebar header
cy.uiGetProfileHeader().
find('.emoticon').
should('have.attr', 'data-emoticon', customStatus.emoji);
// * Check if the last system message tells that the custom status is set and contains the custom status emoji and text
cy.get('.post.post--system').last().
should('contain.text', 'Your status is set to “').
and('contain.text', ` ${customStatus.text}”. You can change your status from the status popover in the channel sidebar header.`);
cy.get('.post.post--system').last().get(`span[data-emoticon="${customStatus.emoji}"]`).should('exist');
});
it('MM-T3852_2 should clear custom status by slash command', () => {
// # Clear the custom status using slash command
cy.postMessage('/status clear');
// * Check if custom status is successfully cleared by checking the emoji in the sidebar header
cy.uiGetProfileHeader().
find('.emoticon').
should('not.exist');
// * Check if the last system message tells that the status is cleared
cy.get('.post.post--system').last().should('contain.text', 'Your status was cleared.');
});
});

Просмотреть файл

@@ -0,0 +1,139 @@
// 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 @custom_status
import dayjs from 'dayjs';
describe('MM-T4063 Custom status expiry', () => {
before(() => {
cy.apiUpdateConfig({TeamSettings: {EnableCustomUserStatuses: true}});
// # Login as test user and visit channel
cy.apiInitSetup({loginAfter: true}).then(({channelUrl}) => {
cy.visit(channelUrl);
});
});
const defaultCustomStatuses = ['In a meeting', 'Out for lunch', 'Out sick', 'Working from home', 'On a vacation'];
const customStatus = {
emoji: 'hamburger',
text: 'Out for lunch',
duration: '30 minutes',
};
const waitingTime = 30; //minutes
let expiresAt = dayjs();
const expiryTimeFormat = 'h:mm A';
it('MM-T4063_1 should open status dropdown', () => {
// # Click on the sidebar header to open status dropdown
cy.get('.MenuWrapper .status-wrapper').click();
// * Check if the status dropdown opens
cy.get('#statusDropdownMenu').should('exist');
});
it('MM-T4063_2 Custom status modal opens with 5 default statuses listed', () => {
// # Open custom status modal
cy.get('#statusDropdownMenu li#status-menu-custom-status').click();
cy.get('#custom_status_modal').should('exist');
// * Check if all the default suggestions exist
defaultCustomStatuses.map((statusText) => cy.get('#custom_status_modal .statusSuggestion__content').contains('span', statusText));
});
it('MM-T4063_3 Correct custom status is selected with the correct emoji and correct duration', () => {
// * Default emoji is currently visible in the custom status input
cy.get('#custom_status_modal .StatusModal__emoji-button span').should('have.class', 'icon--emoji');
// * Input should be empty
cy.get('#custom_status_modal input.form-control').should('have.value', '');
// # Select a custom status from the suggestions
cy.get('#custom_status_modal .statusSuggestion__content').contains('span', customStatus.text).click();
// * Emoji in the custom status input should be changed
cy.get('#custom_status_modal .StatusModal__emoji-button span').invoke('attr', 'data-emoticon').should('contain', customStatus.emoji);
// * Selected custom status text should be in the input
cy.get('#custom_status_modal input.form-control').should('have.value', customStatus.text);
// * Selected custom status duration should be displayed in the Clear after section
cy.get('#custom_status_modal .expiry-wrapper .expiry-value').should('have.text', customStatus.duration);
});
it('MM-T4063_4 should set custom status when click on Set Status', () => {
// # Click on the Set Status button
cy.get('#custom_status_modal .GenericModal__button.confirm').click();
// * Modal should be closed
cy.get('#custom_status_modal').should('not.exist');
// # Setting the time at which the custom status should be expired
expiresAt = dayjs().add(waitingTime, 'minute');
// * Status should be set and the emoji should be visible in the sidebar header
cy.uiGetProfileHeader().
find('.emoticon').
should('have.attr', 'data-emoticon', customStatus.emoji);
});
it('MM-T4063_5 should show the set custom status with expiry when status dropdown is opened', () => {
// # Click on the sidebar header to open status dropdown
cy.get('.MenuWrapper .status-wrapper').click();
// * Check if the status dropdown opens
cy.get('#statusDropdownMenu').should('exist');
// * Correct custom status text and emoji should be displayed in the status dropdown
cy.get('.status-dropdown-menu .custom_status__container').should('have.text', customStatus.text);
cy.get('.status-dropdown-menu .custom_status__row span.emoticon').invoke('attr', 'data-emoticon').should('contain', customStatus.emoji);
// * Correct clear time should be displayed in the status dropdown
cy.get('.status-dropdown-menu .custom_status__expiry time').should('have.text', expiresAt.format(expiryTimeFormat));
});
it('MM-T4063_6 custom status should be cleared after duration of set custom status', () => {
// # Forwarding the time by the duration of custom status
cy.clock(Date.now());
cy.tick(waitingTime * 60 * 1000);
// * Correct clear time should be displayed in the status dropdown
cy.get('.status-dropdown-menu .custom_status__expiry', {timeout: 40000}).should('not.exist');
});
it('MM-T4063_7 current custom status should display expiry time in custom status modal', () => {
// # Open custom status modal
cy.get('#statusDropdownMenu li#status-menu-custom-status').click();
cy.get('#custom_status_modal').should('exist');
// * Should show expiry time of status when current status is selected
cy.get('#custom_status_modal .statusSuggestion__content').contains('span', customStatus.text).click();
cy.get('#custom_status_modal .expiry-value').should('have.text', expiresAt.format(expiryTimeFormat));
// # Close custom status modal
cy.get('#custom_status_modal .modal-header .close').click();
});
it('MM-T4063_8 previous custom status duration should be reset if custom status is expired', () => {
// # Forwarding the time by the duration of custom status
cy.clock(Date.now());
cy.tick(waitingTime * 60 * 1000);
// # Open custom status modal
cy.get('.status-dropdown-menu').click();
cy.get('#statusDropdownMenu li#status-menu-custom-status').click();
cy.get('#custom_status_modal').should('exist');
// * Should show duration of previous status when previous status is selected
cy.get('#custom_status_modal .statusSuggestion__content').contains('span', customStatus.text).click();
cy.get('#custom_status_modal .expiry-value').should('have.text', customStatus.duration);
});
});

Просмотреть файл

@@ -0,0 +1,125 @@
// 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 @custom_status
import dayjs from 'dayjs';
describe('MM-T4064 Status expiry visibility', () => {
before(() => {
cy.apiUpdateConfig({TeamSettings: {EnableCustomUserStatuses: true}});
// # Login as test user and visit channel
cy.apiInitSetup({loginAfter: true}).then(({channelUrl}) => {
cy.visit(channelUrl);
});
});
const defaultCustomStatuses = ['In a meeting', 'Out for lunch', 'Out sick', 'Working from home', 'On a vacation'];
const customStatus = {
emoji: 'calendar',
text: 'In a meeting',
duration: '1 hour',
};
const waitingTime = 60; //minutes
let expiresAt = dayjs();
const expiryTimeFormat = 'h:mm A';
it('MM-T4064_1 should open status dropdown', () => {
// # Click on the sidebar header to open status dropdown
cy.get('.MenuWrapper .status-wrapper').click();
// * Check if the status dropdown opens
cy.get('#statusDropdownMenu').should('exist');
});
it('MM-T4064_2 Custom status modal opens with 5 default statuses listed', () => {
// # Open custom status modal
cy.get('#statusDropdownMenu li#status-menu-custom-status').click();
cy.get('#custom_status_modal').should('exist');
// * Check if all the default suggestions exist
defaultCustomStatuses.map((statusText) => cy.get('#custom_status_modal .statusSuggestion__content').contains('span', statusText));
});
it('MM-T4064_3 Correct custom status is selected with the correct emoji and correct duration', () => {
// * Default emoji is currently visible in the custom status input
cy.get('#custom_status_modal .StatusModal__emoji-button span').should('have.class', 'icon--emoji');
// * Input should be empty
cy.get('#custom_status_modal input.form-control').should('have.value', '');
// # Select a custom status from the suggestions
cy.get('#custom_status_modal .statusSuggestion__content').contains('span', customStatus.text).click();
// * Emoji in the custom status input should be changed
cy.get('#custom_status_modal .StatusModal__emoji-button span').invoke('attr', 'data-emoticon').should('contain', customStatus.emoji);
// * Selected custom status text should be in the input
cy.get('#custom_status_modal input.form-control').should('have.value', customStatus.text);
// * Selected custom status duration should be displayed in the Clear after section
cy.get('#custom_status_modal .expiry-wrapper .expiry-value').should('have.text', customStatus.duration);
});
it('MM-T4064_4 should set custom status when click on Set Status', () => {
// # Click on the Set Status button
cy.get('#custom_status_modal .GenericModal__button.confirm').click();
// * Modal should be closed
cy.get('#custom_status_modal').should('not.exist');
// # Setting the time at which the custom status should be expired
expiresAt = dayjs().add(waitingTime, 'minute');
// * Status should be set and the emoji should be visible in the sidebar header
cy.uiGetProfileHeader().
find('.emoticon').
should('have.attr', 'data-emoticon', customStatus.emoji);
});
it('MM-T4064_5 should show the set custom status with expiry when status dropdown is opened', () => {
// # Click on the sidebar header to open status dropdown
cy.get('.MenuWrapper .status-wrapper').click();
// * Check if the status dropdown opens
cy.get('#statusDropdownMenu').should('exist');
// * Correct custom status text and emoji should be displayed in the status dropdown
cy.get('.status-dropdown-menu .custom_status__container').should('have.text', customStatus.text);
cy.get('.status-dropdown-menu .custom_status__row span.emoticon').invoke('attr', 'data-emoticon').should('contain', customStatus.emoji);
// * Correct clear time should be displayed in the status dropdown
cy.get('.status-dropdown-menu .custom_status__expiry time').should('have.text', expiresAt.format(expiryTimeFormat));
});
it('MM-T4064_6 should show expiry time in the tooltip of custom status emoji in the post header', () => {
// # Post a message in the channel
cy.postMessage('Hello World!');
// # Hover on the custom status emoji present in the post header
cy.get('.post.current--user .post__header span.emoticon').trigger('mouseover');
// * Custom status tooltip should be visible
cy.get('#custom-status-tooltip').should('exist');
// * Tooltip should contain the correct custom status expiry time
cy.get('#custom-status-tooltip .custom-status-expiry time').should('have.text', expiresAt.format(expiryTimeFormat));
});
it('MM-T4064_7 should show custom status expiry time in the user popover', () => {
// # Click on the post header of the last post by the current user and open profile popover
cy.get('.post.current--user .post__header .user-popover').first().click();
cy.get('#user-profile-popover').should('exist');
// * Check if the profile popover contains custom status expiry time in the Status heading
cy.get('#user-profile-popover #user-popover-status .user-popover__subtitle time').should('have.text', expiresAt.format(expiryTimeFormat));
});
});

Просмотреть файл

@@ -0,0 +1,161 @@
// 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 @custom_status
import dayjs from 'dayjs';
import advancedFormat from 'dayjs/plugin/advancedFormat';
describe('MM-T4065 Setting manual status clear time less than 7 days away', () => {
before(() => {
cy.apiUpdateConfig({TeamSettings: {EnableCustomUserStatuses: true}});
// # Login as test user and visit channel
cy.apiInitSetup({loginAfter: true}).then(({channelUrl}) => {
cy.visit(channelUrl);
});
});
const defaultCustomStatuses = ['In a meeting', 'Out for lunch', 'Out sick', 'Working from home', 'On a vacation'];
const defaultDurations = ["Don't clear", '30 minutes', '1 hour', '4 hours', 'Today', 'This week', 'Choose date and time'];
const customStatus = {
emoji: 'hamburger',
text: 'Out for lunch',
duration: '30 minutes',
};
dayjs.extend(advancedFormat);
const today = dayjs();
const dateToBeSelected = today.add(3, 'd');
const months = dateToBeSelected.get('month') - today.get('month');
it('MM-T4065_1 should open status dropdown', () => {
// # Click on the sidebar header to open status dropdown
cy.get('.MenuWrapper .status-wrapper').click();
// * Check if the status dropdown opens
cy.get('#statusDropdownMenu').should('exist');
});
it('MM-T4065_2 Custom status modal opens with 5 default statuses listed', () => {
// # Open custom status modal
cy.get('#statusDropdownMenu li#status-menu-custom-status').click();
cy.get('#custom_status_modal').should('exist');
// * Check if all the default suggestions exist
defaultCustomStatuses.map((statusText) => cy.get('#custom_status_modal .statusSuggestion__content').contains('span', statusText));
});
it('MM-T4065_3 Correct custom status is selected with the correct emoji and correct duration', () => {
// * Default emoji is currently visible in the custom status input
cy.get('#custom_status_modal .StatusModal__emoji-button span').should('have.class', 'icon--emoji');
// * Input should be empty
cy.get('#custom_status_modal input.form-control').should('have.value', '');
// # Select a custom status from the suggestions
cy.get('#custom_status_modal .statusSuggestion__content').contains('span', customStatus.text).click();
// * Emoji in the custom status input should be changed
cy.get('#custom_status_modal .StatusModal__emoji-button span').invoke('attr', 'data-emoticon').should('contain', customStatus.emoji);
// * Selected custom status text should be in the input
cy.get('#custom_status_modal input.form-control').should('have.value', customStatus.text);
// * Selected custom status duration should be displayed in the Clear after section
cy.get('#custom_status_modal .expiry-wrapper .expiry-value').should('have.text', customStatus.duration);
});
it('MM-T4065_4 Clear after dropdown opens with all default durations listed', () => {
// * Check that the expiry menu is not openclick on the menu to open it
cy.get('#custom_status_modal .statusExpiry__menu #statusExpiryMenu').should('not.exist');
// # Click on the expiry menu
cy.get('#custom_status_modal .statusExpiry__menu').click();
// * Check that the expiry menu opens
cy.get('#custom_status_modal .statusExpiry__menu #statusExpiryMenu').should('exist');
// * Check if all default durations exist in the menu
defaultDurations.map((duration, index) => cy.get(`#custom_status_modal #statusExpiryMenu li#expiry_menu_item_${index}`).should('have.text', duration));
});
it('MM-T4065_5 should show date/time input on selecting Choose date and time', () => {
// * Check that the date and time input are not present
cy.get('#custom_status_modal .dateTime').should('not.exist');
// # Click the Choose Date and Time option from the menu
cy.get('#custom_status_modal #statusExpiryMenu li').last().click();
// * Check that the date and time input should be present
cy.get('#custom_status_modal .dateTime').should('exist');
});
it('MM-T4065_6 should show selected date in the date input field', () => {
// # Click on DayPicker input field
cy.get('.dateTime__calendar-icon').click();
// * Verify that DayPicker overlay is visible
cy.get('.date-picker__popper').should('be.visible');
// # Click on the date which is dateToBeSelected
for (let i = 0; i < months; i++) {
cy.get('.fa-angle-right').click();
}
cy.get('.date-picker__popper').find(`.rdp-month button[aria-label="${dateToBeSelected.format('Do MMMM (dddd)')}"]`).click();
// * Check that the date input should have the correct value
cy.get('input#customStatus__calendar-input').should('have.value', dateToBeSelected.format('YYYY-MM-DD'));
});
it('MM-T4065_7 should show selected time in the time input field', () => {
// * Check that the timepicker menu is not present and click to open it
cy.get('#custom_status_modal .dateTime__time-menu #expiryTimeMenu').should('not.exist');
cy.get('#custom_status_modal .dateTime__time-menu').click();
// * Check that the time picker menu is present
cy.get('#custom_status_modal .dateTime__time-menu #expiryTimeMenu').should('exist');
// # Choose the last item in the time picker menu
cy.get('#custom_status_modal .dateTime__time-menu #expiryTimeMenu li').last().click();
// * Check that the time input contains the correct time
cy.get('.dateTime__time-menu .dateTime__input time').should('have.text', '11:30 PM');
});
it('MM-T4065_8 should set custom status when click on Set Status', () => {
// # Click on the Set Status button
cy.get('#custom_status_modal .GenericModal__button.confirm').click();
// * Modal should be closed
cy.get('#custom_status_modal').should('not.exist');
// * Status should be set and the emoji should be visible in the sidebar header
cy.uiGetProfileHeader().
find('.emoticon').
should('have.attr', 'data-emoticon', customStatus.emoji);
});
it('MM-T4065_9 should show the set custom status with expiry when status dropdown is opened', () => {
// # Click on the sidebar header to open status dropdown
cy.get('.MenuWrapper .status-wrapper').click();
// * Check if the status dropdown opens
cy.get('#statusDropdownMenu').should('exist');
// * Correct custom status text and emoji should be displayed in the status dropdown
cy.get('.status-dropdown-menu .custom_status__container').should('have.text', customStatus.text);
cy.get('.status-dropdown-menu .custom_status__row span.emoticon').invoke('attr', 'data-emoticon').should('contain', customStatus.emoji);
// * Correct clear time should be displayed in the status dropdown
cy.get('.status-dropdown-menu .custom_status__expiry time').should('have.text', dateToBeSelected.format('dddd'));
});
});

Просмотреть файл

@@ -0,0 +1,145 @@
// 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 @custom_status
import dayjs from 'dayjs';
import advancedFormat from 'dayjs/plugin/advancedFormat';
describe('MM-T4066 Setting manual status clear time more than 7 days away', () => {
before(() => {
cy.apiUpdateConfig({TeamSettings: {EnableCustomUserStatuses: true}});
// # Login as test user and visit channel
cy.apiInitSetup({loginAfter: true}).then(({channelUrl}) => {
cy.visit(channelUrl);
});
});
const defaultCustomStatuses = ['In a meeting', 'Out for lunch', 'Out sick', 'Working from home', 'On a vacation'];
const defaultDurations = ["Don't clear", '30 minutes', '1 hour', '4 hours', 'Today', 'This week', 'Choose date and time'];
const customStatus = {
emoji: 'hamburger',
text: 'Out for lunch',
duration: '30 minutes',
};
dayjs.extend(advancedFormat);
const today = dayjs();
const dateToBeSelected = today.add(8, 'd');
const months = dateToBeSelected.get('month') - today.get('month');
it('MM-T4066_1 should open status dropdown', () => {
// # Click on the sidebar header to open status dropdown
cy.get('.MenuWrapper .status-wrapper').click();
// * Check if the status dropdown opens
cy.get('#statusDropdownMenu').should('exist');
});
it('MM-T4066_2 Custom status modal opens with 5 default statuses listed', () => {
// # Open custom status modal
cy.get('#statusDropdownMenu li#status-menu-custom-status').click();
cy.get('#custom_status_modal').should('exist');
// * Check if all the default suggestions exist
defaultCustomStatuses.map((statusText) => cy.get('#custom_status_modal .statusSuggestion__content').contains('span', statusText));
});
it('MM-T4066_3 Correct custom status is selected with the correct emoji and correct duration', () => {
// * Default emoji is currently visible in the custom status input
cy.get('#custom_status_modal .StatusModal__emoji-button span').should('have.class', 'icon--emoji');
// * Input should be empty
cy.get('#custom_status_modal input.form-control').should('have.value', '');
// # Select a custom status from the suggestions
cy.get('#custom_status_modal .statusSuggestion__content').contains('span', customStatus.text).click();
// * Emoji in the custom status input should be changed
cy.get('#custom_status_modal .StatusModal__emoji-button span').invoke('attr', 'data-emoticon').should('contain', customStatus.emoji);
// * Selected custom status text should be in the input
cy.get('#custom_status_modal input.form-control').should('have.value', customStatus.text);
// * Selected custom status duration should be displayed in the Clear after section
cy.get('#custom_status_modal .expiry-wrapper .expiry-value').should('have.text', customStatus.duration);
});
it('MM-T4066_4 Clear after dropdown opens with all default durations listed', () => {
// * Check that the expiry menu is not openclick on the menu to open it
cy.get('#custom_status_modal .statusExpiry__menu #statusExpiryMenu').should('not.exist');
// # Click on the expiry menu
cy.get('#custom_status_modal .statusExpiry__menu').click();
// * Check that the expiry menu opens
cy.get('#custom_status_modal .statusExpiry__menu #statusExpiryMenu').should('exist');
// * Check if all default durations exist in the menu
defaultDurations.map((duration, index) => cy.get(`#custom_status_modal #statusExpiryMenu li#expiry_menu_item_${index}`).should('have.text', duration));
});
it('MM-T4066_5 should show date/time input on selecting Choose date and time', () => {
// * Check that the date and time input are not present
cy.get('#custom_status_modal .dateTime').should('not.exist');
// # Click the Choose Date and Time option from the menu
cy.get('#custom_status_modal #statusExpiryMenu li').last().click();
// * Check that the date and time input should be present
cy.get('#custom_status_modal .dateTime').should('exist');
});
it('MM-T4066_6 should show selected date in the date input field', () => {
// # Click on DayPicker input field
cy.get('.dateTime__calendar-icon').click();
// * Verify that DayPicker overlay is visible
cy.get('.date-picker__popper').should('be.visible');
// # Click on the date which is dateToBeSelected
for (let i = 0; i < months; i++) {
cy.get('.fa-angle-right').click();
}
cy.get('.date-picker__popper').find(`.rdp-month button[aria-label="${dateToBeSelected.format('Do MMMM (dddd)')}"]`).click();
// * Check that the date input should have the correct value
cy.get('input#customStatus__calendar-input').should('have.value', dateToBeSelected.format('YYYY-MM-DD'));
});
it('MM-T4066_7 should set custom status when click on Set Status', () => {
// # Click on the Set Status button
cy.get('#custom_status_modal .GenericModal__button.confirm').click();
// * Modal should be closed
cy.get('#custom_status_modal').should('not.exist');
// * Status should be set and the emoji should be visible in the sidebar header
cy.uiGetProfileHeader().
find('.emoticon').
should('have.attr', 'data-emoticon', customStatus.emoji);
});
it('MM-T4066_8 should show the set custom status with expiry when status dropdown is opened', () => {
// # Click on the sidebar header to open status dropdown
cy.get('.MenuWrapper .status-wrapper').click();
// * Check if the status dropdown opens
cy.get('#statusDropdownMenu').should('exist');
// * Correct custom status text and emoji should be displayed in the status dropdown
cy.get('.status-dropdown-menu .custom_status__container').should('have.text', customStatus.text);
cy.get('.status-dropdown-menu .custom_status__row span.emoticon').invoke('attr', 'data-emoticon').should('contain', customStatus.emoji);
// * Correct clear time should be displayed in the status dropdown
cy.get('.status-dropdown-menu .custom_status__expiry time').should('have.text', dateToBeSelected.format('MMM DD'));
});
});