коммит произвёл
GitHub
родитель
8bd603eb12
Коммит
a9a879d00d
@@ -40,7 +40,7 @@ describe('Messaging', () => {
|
||||
cy.uiGetChannelPinButton().click();
|
||||
|
||||
// * RHS title displays as "Pinned Posts" and "[channel name]"
|
||||
cy.get('#sidebar-right').should('be.visible').and('contain', 'Pinned Posts').and('contain', `${testChannel.display_name}`);
|
||||
cy.get('#sidebar-right').should('be.visible').and('contain', 'Pinned messages').and('contain', `${testChannel.display_name}`);
|
||||
|
||||
// * Pinned post appear in RHS
|
||||
cy.get(`#rhsPostMessageText_${postId}`).should('exist');
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
import {getAdminAccount} from '../../../support/env';
|
||||
|
||||
describe('Pinned posts', () => {
|
||||
describe('pinned messages', () => {
|
||||
let testTeam;
|
||||
let testChannel;
|
||||
let testUser;
|
||||
@@ -62,12 +62,12 @@ describe('Pinned posts', () => {
|
||||
// # Click pin icon
|
||||
cy.uiGetChannelPinButton().click();
|
||||
|
||||
// * Should not have any pinned posts
|
||||
cy.get('#search-items-container .no-results__title').should('have.text', 'No pinned posts yet');
|
||||
// * Should not have any pinned messages
|
||||
cy.get('#search-items-container .no-results__title').should('have.text', 'No pinned messages yet');
|
||||
});
|
||||
});
|
||||
|
||||
it('MM-T2174 Switching channels in center also changes pinned posts RHS', () => {
|
||||
it('MM-T2174 Switching channels in center also changes pinned messages RHS', () => {
|
||||
// # Login
|
||||
cy.apiLogin(testUser);
|
||||
|
||||
@@ -81,16 +81,16 @@ describe('Pinned posts', () => {
|
||||
// # Click pin icon
|
||||
cy.uiGetChannelPinButton().click();
|
||||
|
||||
// * Number of pinned posts in RHS should be 1
|
||||
// * Number of pinned messages in RHS should be 1
|
||||
cy.findByTestId('search-item-container').should('have.length', 1);
|
||||
|
||||
// # Go to town square
|
||||
cy.get('#sidebarItem_town-square').should('be.visible').click();
|
||||
|
||||
// * Should not have any pinned posts
|
||||
cy.get('#search-items-container .no-results__title').should('have.text', 'No pinned posts yet');
|
||||
// * Should not have any pinned messages
|
||||
cy.get('#search-items-container .no-results__title').should('have.text', 'No pinned messages yet');
|
||||
|
||||
// * Number of pinned posts in RHS should be 0
|
||||
// * Number of pinned messages in RHS should be 0
|
||||
cy.findByTestId('search-item-container').should('not.exist');
|
||||
|
||||
// # Visit a test channel
|
||||
@@ -117,7 +117,7 @@ describe('Pinned posts', () => {
|
||||
|
||||
return cy.getLastPostId();
|
||||
}).then((postId) => {
|
||||
// * Number of pinned posts in RHS should be 0
|
||||
// * Number of pinned messages in RHS should be 0
|
||||
cy.findByTestId('search-item-container').should('not.exist');
|
||||
|
||||
// # Pin the post
|
||||
@@ -131,7 +131,7 @@ describe('Pinned posts', () => {
|
||||
});
|
||||
});
|
||||
|
||||
it('MM-T2177 Deleting pinned post while viewing RHS pinned posts removes post from RHS', () => {
|
||||
it('MM-T2177 Deleting pinned post while viewing RHS pinned messages removes post from RHS', () => {
|
||||
// # Login
|
||||
cy.apiLogin(testUser);
|
||||
|
||||
@@ -141,8 +141,8 @@ describe('Pinned posts', () => {
|
||||
// # Click pin icon
|
||||
cy.uiGetChannelPinButton().click();
|
||||
|
||||
// * Should not have any pinned posts
|
||||
cy.get('#search-items-container .no-results__title').should('have.text', 'No pinned posts yet');
|
||||
// * Should not have any pinned messages
|
||||
cy.get('#search-items-container .no-results__title').should('have.text', 'No pinned messages yet');
|
||||
|
||||
// # Post a message
|
||||
cy.postMessage('Hello again');
|
||||
@@ -162,8 +162,8 @@ describe('Pinned posts', () => {
|
||||
cy.get(`#delete_post_${postId}`).scrollIntoView().should('be.visible').click();
|
||||
cy.get('#deletePostModalButton').should('be.visible').click();
|
||||
|
||||
// * Should not have any pinned posts
|
||||
cy.get('#search-items-container .no-results__title').should('have.text', 'No pinned posts yet');
|
||||
// * Should not have any pinned messages
|
||||
cy.get('#search-items-container .no-results__title').should('have.text', 'No pinned messages yet');
|
||||
|
||||
// * Post should be deleted
|
||||
cy.get(`#post_${postId}`).should('not.exist');
|
||||
@@ -200,15 +200,15 @@ describe('Pinned posts', () => {
|
||||
// # Click pin icon
|
||||
cy.uiGetChannelPinButton().click();
|
||||
|
||||
// * Should not have any pinned posts
|
||||
cy.get('#search-items-container .no-results__title').should('have.text', 'No pinned posts yet');
|
||||
// * Should not have any pinned messages
|
||||
cy.get('#search-items-container .no-results__title').should('have.text', 'No pinned messages yet');
|
||||
|
||||
// * The old post should be gone
|
||||
cy.get(`#post_${postId}`).should('not.exist');
|
||||
});
|
||||
});
|
||||
|
||||
it('MM-T2922 Pinned post count indicates the number of pinned posts in currently viewed channel', () => {
|
||||
it('MM-T2922 Pinned post count indicates the number of pinned messages in currently viewed channel', () => {
|
||||
// # Login
|
||||
cy.apiLogin(testUser);
|
||||
|
||||
@@ -274,7 +274,7 @@ describe('Pinned posts', () => {
|
||||
// * Pinned count should be 1
|
||||
cy.get('#channelPinnedPostCountText').should('have.text', '1');
|
||||
|
||||
// * Number of pinned posts in RHS should also be 1
|
||||
// * Number of pinned messages in RHS should also be 1
|
||||
cy.findByTestId('search-item-container').should('have.length', 1);
|
||||
});
|
||||
});
|
||||
|
||||
@@ -52,7 +52,7 @@ describe('Messaging', () => {
|
||||
cy.findByText('Add Reaction').should('be.visible');
|
||||
cy.findByText('Mark as Unread').should('be.visible');
|
||||
cy.findByText('Copy Link').should('be.visible');
|
||||
cy.findByText('Save').should('be.visible');
|
||||
cy.findByText('Save Message').should('be.visible');
|
||||
cy.findByText('Pin to Channel').should('be.visible');
|
||||
cy.findByText('Edit').should('be.visible');
|
||||
cy.findByText('Delete').should('be.visible');
|
||||
|
||||
@@ -104,7 +104,7 @@ describe('Post PreHeader', () => {
|
||||
cy.get('#searchContainer').should('be.visible').within(() => {
|
||||
cy.get('.sidebar--right__title').
|
||||
should('be.visible').
|
||||
and('contain', 'Pinned Posts').
|
||||
and('contain', 'Pinned messages').
|
||||
and('contain', 'Off-Topic');
|
||||
|
||||
// * Check that the post pre-header is not shown for the pinned message in RHS
|
||||
|
||||
@@ -35,7 +35,7 @@ describe('Messaging - Opening a private channel using keyboard shortcuts', () =>
|
||||
cy.findByRole('textbox', {name: 'quick switch input'}).type('Pr').type('{downarrow}').type('{enter}');
|
||||
|
||||
// * Private channel opens
|
||||
cy.get('#channelHeaderTitle').should('be.visible').should('contain', 'Private channel').wait(TIMEOUTS.HALF_SEC);
|
||||
cy.get('#channelHeaderTitle').should('be.visible').should('contain', 'Private').wait(TIMEOUTS.HALF_SEC);
|
||||
|
||||
// * Focus in the message box
|
||||
cy.uiGetPostTextBox().should('be.focused');
|
||||
|
||||
@@ -33,7 +33,7 @@ describe('Save Post', () => {
|
||||
|
||||
cy.get('@postId1').then((postId) => {
|
||||
// # Save message by clicking the menu item in the dotmenu
|
||||
cy.uiClickPostDropdownMenu(postId, 'Save');
|
||||
cy.uiClickPostDropdownMenu(postId, 'Save Message');
|
||||
|
||||
// * Assert the post pre-header is displayed and works as expected
|
||||
verifySavedPost(postId, message);
|
||||
|
||||
Ссылка в новой задаче
Block a user