mirror of
https://github.com/hanzoai/team.git
synced 2026-11-01 07:55:31 +00:00
26 lines
917 B
JavaScript
26 lines
917 B
JavaScript
// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved.
|
|
// See LICENSE.txt for license information.
|
|
|
|
import * as TIMEOUTS from '../../../../fixtures/timeouts';
|
|
|
|
export function loginAndVisitChannel(user, channelUrl) {
|
|
cy.apiLogin(user);
|
|
cy.visit(channelUrl);
|
|
|
|
cy.get('#postListContent', {timeout: TIMEOUTS.ONE_MIN}).should('be.visible');
|
|
cy.uiGetPostTextBox();
|
|
}
|
|
|
|
export function verifyEphemeralMessage(message) {
|
|
// # Checking if we got the ephemeral message with the selection we made
|
|
cy.wait(TIMEOUTS.HALF_SEC).getLastPostId().then((botLastPostId) => {
|
|
cy.get(`#post_${botLastPostId}`).within(() => {
|
|
// * Check if Bot message only visible to you
|
|
cy.findByText('(Only visible to you)').should('exist');
|
|
|
|
// * Check if we got ephemeral message of our selection
|
|
cy.findByText(message).should('exist');
|
|
});
|
|
});
|
|
}
|