From e64064aed10fba8ea7673e80dd439f9193759804 Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Wed, 13 May 2020 16:05:17 +1000 Subject: [PATCH] integration-test add logs check for basic friend request with single device involved --- integration_test/add_friends_test.js | 10 +++++++++- integration_test/common.js | 6 +++--- integration_test/link_device_test.js | 2 +- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/integration_test/add_friends_test.js b/integration_test/add_friends_test.js index 90dbcf230..29a5e83ab 100644 --- a/integration_test/add_friends_test.js +++ b/integration_test/add_friends_test.js @@ -29,7 +29,7 @@ describe('Add friends', function() { [app, app2] = await Promise.all([ common.startAndStub(app1Props), - common.startAndStub2(app2Props), + common.startAndStubN(app2Props,2), ]); }); @@ -116,5 +116,13 @@ describe('Add friends', function() { ConversationPage.acceptedFriendRequestMessage, 5000 ); + + // app trigger the friend request logic first + const aliceLogs = await app.client.getRenderProcessLogs(); + const bobLogs = await app2.client.getRenderProcessLogs(); + await common.logsContains(aliceLogs, `Sending undefined:friend-request message to ${common.TEST_PUBKEY2}`); + await common.logsContains(bobLogs, `Received a NORMAL_FRIEND_REQUEST from source: ${common.TEST_PUBKEY1}, primarySource: ${common.TEST_PUBKEY1},`); + await common.logsContains(bobLogs, `Sending incoming-friend-request-accept:onlineBroadcast message to ${common.TEST_PUBKEY1}`); + await common.logsContains(aliceLogs, `Sending outgoing-friend-request-accepted:onlineBroadcast message to ${common.TEST_PUBKEY2}`); }); }); diff --git a/integration_test/common.js b/integration_test/common.js index 152b003aa..ef1d0912d 100644 --- a/integration_test/common.js +++ b/integration_test/common.js @@ -29,19 +29,19 @@ module.exports = { 'faxed mechanic mocked agony unrest loincloth pencil eccentric boyfriend oasis speedy ribbon faxed', TEST_PUBKEY1: '0552b85a43fb992f6bdb122a5a379505a0b99a16f0628ab8840249e2a60e12a413', - TEST_DISPLAY_NAME1: 'integration_tester_1', + TEST_DISPLAY_NAME1: 'tester_Alice', TEST_MNEMONIC2: 'guide inbound jerseys bays nouns basin sulking awkward stockpile ostrich ascend pylons ascend', TEST_PUBKEY2: '054e1ca8681082dbd9aad1cf6fc89a32254e15cba50c75b5a73ac10a0b96bcbd2a', - TEST_DISPLAY_NAME2: 'integration_tester_2', + TEST_DISPLAY_NAME2: 'tester_Bob', TEST_MNEMONIC3: 'alpine lukewarm oncoming blender kiwi fuel lobster upkeep vogue simplest gasp fully simplest', TEST_PUBKEY3: '05f8662b6e83da5a31007cc3ded44c601f191e07999acb6db2314a896048d9036c', - TEST_DISPLAY_NAME3: 'integration_tester_3', + TEST_DISPLAY_NAME3: 'tester_Charlie', /* ************** OPEN GROUPS ****************** */ VALID_GROUP_URL: 'https://chat.getsession.org', diff --git a/integration_test/link_device_test.js b/integration_test/link_device_test.js index c0b80aa5f..c805bdb8e 100644 --- a/integration_test/link_device_test.js +++ b/integration_test/link_device_test.js @@ -46,7 +46,7 @@ describe('Link Device', function() { await common.triggerUnlinkApp2FromApp(app, app2); }); - describe('linkDevice:sync no groups, closed group, nor open groups', async () => { + it('linkDevice:sync no groups, closed group, nor open groups', async () => { await common.linkApp2ToApp(app, app2, common.TEST_PUBKEY1); await common.timeout(2000);