Skip to content

Commit

Permalink
CR fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
OlimpiaZurek committed Nov 2, 2023
1 parent a59a1ae commit 3a94b35
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion tests/perf-test/ReportActionCompose.perf-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -102,22 +102,34 @@ test('should render Composer with text input interactions', async () => {
return waitForBatchedUpdates().then(() => measurePerformance(<ReportActionComposeWrapper />, {scenario}));
});

test('should press composer buttons', async () => {
test('should press add attachemnt button', async () => {
const scenario = async () => {
// Query for the attachment button
const hintAttachmentButtonText = Localize.translateLocal('reportActionCompose.addAction');
const attachmentButton = await screen.findByLabelText(hintAttachmentButtonText);

expect(attachmentButton).toBeDefined();
fireEvent.press(attachmentButton, mockEvent);
};

return waitForBatchedUpdates().then(() => measurePerformance(<ReportActionComposeWrapper />, {scenario}));
});

test('should press add emoji button', async () => {
const scenario = async () => {
// Query for the emoji button
const hintEmojiButtonText = Localize.translateLocal('reportActionCompose.emoji');
const emojiButton = await screen.findByLabelText(hintEmojiButtonText);

expect(emojiButton).toBeDefined();
fireEvent.press(emojiButton);
};

return waitForBatchedUpdates().then(() => measurePerformance(<ReportActionComposeWrapper />, {scenario}));
});

test('should press send message button', async () => {
const scenario = async () => {
// Query for the send button
const hintSendButtonText = Localize.translateLocal('common.send');
const sendButton = await screen.findByLabelText(hintSendButtonText);
Expand Down

0 comments on commit 3a94b35

Please sign in to comment.