fix: Bug - Video attachment on android gets sent in the message bubble above with no preview image
This commit is contained in:
@@ -94,6 +94,25 @@ export class ChatMessagesPage {
|
||||
}, files);
|
||||
}
|
||||
|
||||
/** Sends the currently-attached files with no text caption (attachment-only message). */
|
||||
async sendPendingAttachments(): Promise<void> {
|
||||
await this.waitForReady();
|
||||
await expect(this.sendButton).toBeEnabled({ timeout: 10_000 });
|
||||
await this.sendButton.click();
|
||||
}
|
||||
|
||||
/** The message bubble that contains the rendered image with the given alt text. */
|
||||
getMessageItemContainingImage(altText: string): Locator {
|
||||
return this.messageItems.filter({
|
||||
has: this.page.locator(`img[alt="${altText}"]`)
|
||||
}).last();
|
||||
}
|
||||
|
||||
/** Resolves the stable data-message-id of the bubble holding the given image. */
|
||||
async getMessageIdContainingImage(altText: string): Promise<string | null> {
|
||||
return this.getMessageItemContainingImage(altText).getAttribute('data-message-id');
|
||||
}
|
||||
|
||||
async openGifPicker(): Promise<void> {
|
||||
await this.waitForReady();
|
||||
await this.gifButton.click();
|
||||
|
||||
Reference in New Issue
Block a user