коммит произвёл
GitHub
родитель
375ce229f4
Коммит
967e44805b
@@ -21,7 +21,7 @@ describe('Keyboard Shortcuts', () => {
|
||||
|
||||
it('MM-T1277 SHIFT+UP', () => {
|
||||
// # Press shift+up to open the latest thread in the channel in the RHS
|
||||
cy.uiGetPostTextBox().type('{shift}{uparrow}');
|
||||
cy.uiGetPostTextBox().type('{shift+uparrow}', {delay: 50});
|
||||
|
||||
// * RHS Opens up
|
||||
cy.get('.sidebar--right__header').should('be.visible');
|
||||
@@ -33,7 +33,28 @@ describe('Keyboard Shortcuts', () => {
|
||||
cy.uiGetPostTextBox().click();
|
||||
|
||||
// # Press shift+up again
|
||||
cy.uiGetPostTextBox().type('{shift}{uparrow}');
|
||||
cy.uiGetPostTextBox().type('{shift+uparrow}', {delay: 50});
|
||||
|
||||
// * RHS textbox should be focused
|
||||
cy.uiGetReplyTextBox().should('be.focused');
|
||||
|
||||
// # Post a reply in the thread
|
||||
cy.uiGetReplyTextBox().type('This is a reply{enter}');
|
||||
|
||||
// # Close the RHS by clicking the X button
|
||||
cy.get('#rhsCloseButton').click();
|
||||
|
||||
// * Verify RHS is closed
|
||||
cy.get('.sidebar--right__header').should('not.exist');
|
||||
|
||||
// # Click into the center channel post textbox
|
||||
cy.uiGetPostTextBox().click();
|
||||
|
||||
// # Press shift+up to open the thread with replies
|
||||
cy.uiGetPostTextBox().type('{shift+uparrow}', {delay: 50});
|
||||
|
||||
// * RHS Opens up
|
||||
cy.get('.sidebar--right__header').should('be.visible');
|
||||
|
||||
// * RHS textbox should be focused
|
||||
cy.uiGetReplyTextBox().should('be.focused');
|
||||
|
||||
@@ -15,12 +15,14 @@ import * as TIMEOUTS from '../../../fixtures/timeouts';
|
||||
describe('Messaging', () => {
|
||||
let offTopicUrl;
|
||||
let testChannelName;
|
||||
let user;
|
||||
|
||||
before(() => {
|
||||
// # Login as test user
|
||||
cy.apiInitSetup({loginAfter: true}).then((out) => {
|
||||
offTopicUrl = out.offTopicUrl;
|
||||
testChannelName = out.channel.display_name;
|
||||
user = out.user;
|
||||
});
|
||||
});
|
||||
|
||||
@@ -97,6 +99,43 @@ describe('Messaging', () => {
|
||||
cy.uiGetReplyTextBox().should('be.focused');
|
||||
});
|
||||
|
||||
it('MM-T205 Focus to remain in RHS textbox when replying to reply post in center channel (CRT disabled)', () => {
|
||||
// # Ensure collapsed reply threads is disabled
|
||||
cy.apiSaveCRTPreference(user.id, 'off');
|
||||
|
||||
// # Post a thread root message
|
||||
cy.postMessage('Thread root message');
|
||||
|
||||
// # Open RHS and post a reply
|
||||
cy.clickPostCommentIcon();
|
||||
cy.uiGetReplyTextBox().type('First reply{enter}');
|
||||
|
||||
// # Close RHS
|
||||
cy.get('#rhsCloseButton').click();
|
||||
|
||||
// * Verify RHS is closed
|
||||
cy.get('.sidebar--right__header').should('not.exist');
|
||||
|
||||
// # Get the reply post ID and click its comment icon
|
||||
cy.getLastPostId().then((postId) => {
|
||||
// # Click the reply arrow on the reply post
|
||||
cy.clickPostCommentIcon(postId);
|
||||
|
||||
// * Verify RHS opens and textbox is focused
|
||||
cy.get('.sidebar--right__header').should('be.visible');
|
||||
cy.uiGetReplyTextBox().should('be.focused');
|
||||
|
||||
// # Focus away from RHS textbox
|
||||
cy.get('#rhsContainer .post-right__content').click();
|
||||
|
||||
// # Click reply arrow on the same reply post again
|
||||
cy.clickPostCommentIcon(postId);
|
||||
});
|
||||
|
||||
// * Verify RHS textbox is focused again
|
||||
cy.uiGetReplyTextBox().should('be.focused');
|
||||
});
|
||||
|
||||
it('MM-T203 Focus does not move when it has already been set elsewhere', () => {
|
||||
// # Verify Focus in add channel member modal
|
||||
verifyFocusInAddChannelMemberModal();
|
||||
@@ -157,8 +196,8 @@ function verifyFocusInAddChannelMemberModal() {
|
||||
// * Check that input box has character A
|
||||
cy.get('#selectItems input').should('have.value', 'A');
|
||||
|
||||
// # Click anywhere in the modal that is not on a field that can take focus
|
||||
cy.get('#deletePostModalLabel > span').click();
|
||||
// # Remove the focus from the input box
|
||||
cy.get('#selectItems input').blur();
|
||||
|
||||
// * Note the focus has been removed from the search box
|
||||
cy.get('#selectItems input').should('not.be.focused');
|
||||
|
||||
Ссылка в новой задаче
Block a user