Thread reply edit file handling bug fix (#30470)

* Fixed a bug where escape would delete all typed content

* Fixed rootId and postID

* fixed tests

* Type fix

* Fixed a test

* Search result edit fix

* Removed a test change

* threads view isn't RHS

* Fixed a cypress test

* Fixed a cypress test

* Fixed a flaky playwighr test
Этот коммит содержится в:
Harshil Sharma
2025-03-18 16:19:18 +05:30
коммит произвёл GitHub
родитель c1d4f5cb9f
Коммит c951a9cfac
13 изменённых файлов: 78 добавлений и 76 удалений

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

@@ -302,7 +302,10 @@ describe('Keyboard Shortcuts', () => {
cy.uiGetPostTextBox().type('{uparrow}');
// # Add some text to the previous message and save
cy.get('#edit_textbox').type('Test').type('{enter}');
// cy.get('#edit_textbox').type('Test').type('{enter}');
cy.get('#edit_textbox').type('Test');
cy.wait(TIMEOUTS.ONE_SEC);
cy.get('#edit_textbox').type('{enter}');
cy.wait(TIMEOUTS.ONE_SEC);
cy.getLastPost().within(() => {

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

@@ -732,7 +732,7 @@ describe('Messaging', () => {
cy.get('#edit_textbox').should('be.visible');
// * Update the post message and type ENTER
cy.get('#edit_textbox', {timeout: TIMEOUTS.FIVE_SEC}).invoke('val', '').type(message2).type('{enter}').wait(TIMEOUTS.HALF_SEC);
cy.get('#edit_textbox', {timeout: TIMEOUTS.FIVE_SEC}).invoke('val', '').type(message2).wait(TIMEOUTS.HALF_SEC).type('{enter}').wait(TIMEOUTS.HALF_SEC);
// * Post appears in RHS search results, displays Pinned badge
cy.get(`#searchResult_${postId}`).findByText('Edited').should('exist');

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

@@ -3,6 +3,7 @@
import {expect, Locator} from '@playwright/test';
import path from 'node:path';
import {waitUntil} from '@e2e-support/test_action';
export default class ChannelsPostCreate {
readonly container: Locator;
@@ -106,6 +107,12 @@ export default class ChannelsPostCreate {
});
await this.attachmentButton.click();
// wait for all files to be uploaded
await waitUntil(async () => {
const attachment = await this.container.locator('.file-preview').count();
return attachment === files.length;
});
}
await this.sendMessage();