From 4f66ff4c986ac6c29cb861b453f4cca4414c5ac3 Mon Sep 17 00:00:00 2001 From: Emily <92288602+burtonemily@users.noreply.github.com> Date: Wed, 17 May 2023 11:26:10 +1000 Subject: [PATCH] Removed double waitForAnimation function --- ts/test/automation/disappearing_messages.spec.ts | 14 ++++---------- ts/test/automation/linked_device_requests.spec.ts | 1 - 2 files changed, 4 insertions(+), 11 deletions(-) diff --git a/ts/test/automation/disappearing_messages.spec.ts b/ts/test/automation/disappearing_messages.spec.ts index cf89e8ad6..b19c33d21 100644 --- a/ts/test/automation/disappearing_messages.spec.ts +++ b/ts/test/automation/disappearing_messages.spec.ts @@ -1,33 +1,26 @@ import { sleepFor } from '../../session/utils/Promise'; import { newUser } from './setup/new_user'; import { sessionTestTwoWindows } from './setup/sessionTest'; +import { createContact } from './utilities/create_contact'; import { sendMessage } from './utilities/message'; -import { sendNewMessage } from './utilities/send_message'; import { clickOnMatchingText, clickOnTestIdWithText, - waitForControlMessageWithText, waitForMatchingText, - waitForTestIdWithText, + waitForTestIdWithText } from './utilities/utils'; // tslint:disable: no-console const testMessage = 'Test-Message- (A -> B) '; -const testReply = 'Reply-Test-Message- (B -> A)'; const sentMessage = `${testMessage}${Date.now()}`; -const sentReplyMessage = `${testReply} :${Date.now()}`; sessionTestTwoWindows('Disappearing messages', async ([windowA, windowB]) => { // Open App // Create User const [userA, userB] = await Promise.all([newUser(windowA, 'Alice'), newUser(windowB, 'Bob')]); // Create Contact - await sendNewMessage(windowA, userB.sessionid, sentMessage); - await sendNewMessage(windowB, userA.sessionid, sentReplyMessage); - await waitForControlMessageWithText(windowA, 'Your message request has been accepted'); - // await waitForMatchingText(windowA, `You have accepted ${userA.userName}'s message request`); - // await waitForMatchingText(windowB, 'Your message request has been accepted'); + await createContact(windowA, windowB, userA, userB) // Click on user's avatar to open conversation options await clickOnTestIdWithText(windowA, 'conversation-options-avatar') // Select disappearing messages drop down @@ -81,6 +74,7 @@ sessionTestTwoWindows('Disappearing messages', async ([windowA, windowB]) => { `${userA.userName} set the disappearing message timer to 5 seconds` ); // Wait 5 seconds + await sleepFor(5000) await waitForMatchingText(windowB, `${userA.userName} has turned off disappearing messages.`); // verify message is deleted in windowB const errorDesc2 = 'Should not be found'; diff --git a/ts/test/automation/linked_device_requests.spec.ts b/ts/test/automation/linked_device_requests.spec.ts index c2db549ed..9a9adbab4 100644 --- a/ts/test/automation/linked_device_requests.spec.ts +++ b/ts/test/automation/linked_device_requests.spec.ts @@ -48,7 +48,6 @@ sessionTestTwoWindows('Decline request syncs', async ([windowA, windowB]) => { await waitForTestIdWithText(windowC, 'module-conversation__user__profile-name', userA.userName); await clickOnTestIdWithText(windowB, 'decline-message-request'); await clickOnTestIdWithText(windowB, 'session-confirm-ok-button', 'Decline'); - await waitForTestIdWithText(windowB, 'session-toast', 'Blocked'); await waitForMatchingText(windowB, 'No pending message requests'); await waitForMatchingText(windowC, 'No pending message requests');