diff --git a/integration_test/common.js b/integration_test/common.js index 43bf55897..d0fbcf381 100644 --- a/integration_test/common.js +++ b/integration_test/common.js @@ -638,13 +638,15 @@ module.exports = { .should.eventually.equal(openGroupUrl); await app.client.element(ConversationPage.joinOpenGroupButton).click(); - // validate session loader is shown - await app.client.isExisting(ConversationPage.sessionLoader).should - .eventually.be.true; + await app.client.waitForExist( + ConversationPage.sessionToastJoinOpenGroup, + 2 * 1000 + ); + // account for slow home internet connection delays... await app.client.waitForExist( ConversationPage.sessionToastJoinOpenGroupSuccess, - 60 * 1000 + 20 * 1000 ); // validate overlay is closed @@ -652,9 +654,10 @@ module.exports = { .eventually.be.false; // validate open chat has been added - await app.client.isExisting( - ConversationPage.rowOpenGroupConversationName(name) - ).should.eventually.be.true; + await app.client.waitForExist( + ConversationPage.rowOpenGroupConversationName(name), + 20 * 1000 + ); }, async stopStubSnodeServer() { diff --git a/integration_test/open_group_test.js b/integration_test/open_group_test.js index 08a22d785..6e13adb56 100644 --- a/integration_test/open_group_test.js +++ b/integration_test/open_group_test.js @@ -59,7 +59,7 @@ describe('Open groups', function() { 1 * 1000 ); - // validate overlay is still opened + // validate overlay is still opened as connection failed await app.client.isExisting(ConversationPage.leftPaneOverlay).should .eventually.be.true; }); diff --git a/integration_test/page-objects/conversation.page.js b/integration_test/page-objects/conversation.page.js index 4110edd05..ff64fe285 100644 --- a/integration_test/page-objects/conversation.page.js +++ b/integration_test/page-objects/conversation.page.js @@ -44,11 +44,14 @@ module.exports = { // channels joinOpenGroupButton: commonPage.divRoleButtonWithText('Join Open Group'), openGroupInputUrl: commonPage.textAreaWithPlaceholder('chat.getsession.org'), + sessionToastJoinOpenGroup: commonPage.toastWithText( + 'Connecting to server...' + ), sessionToastJoinOpenGroupSuccess: commonPage.toastWithText( - 'Successfully connected to new open group server' + 'Successfully connected to open group' ), sessionToastJoinOpenGroupAlreadyExist: commonPage.toastWithText( - 'You are already connected to this public channel' + 'You are already connected to this open group' ), rowOpenGroupConversationName: groupName => commonPage.spanWithClassAndText( diff --git a/ts/components/session/LeftPaneMessageSection.tsx b/ts/components/session/LeftPaneMessageSection.tsx index 9b33e50cf..ffe4c34a3 100644 --- a/ts/components/session/LeftPaneMessageSection.tsx +++ b/ts/components/session/LeftPaneMessageSection.tsx @@ -476,10 +476,15 @@ export class LeftPaneMessageSection extends React.Component { // Connect to server try { + window.pushToast({ + title: window.i18n('connectingToServer'), + id: 'connectToServer', + type: 'success', + }); await OpenGroup.join(serverUrl, async () => { if (await OpenGroup.serverExists(serverUrl)) { window.pushToast({ - title: window.i18n('connectingToServer'), + title: window.i18n('connectToServerSuccess'), id: 'connectToServer', type: 'success', }); diff --git a/ts/session/snode_api/lokiRpc.ts b/ts/session/snode_api/lokiRpc.ts index 2bf5ebf66..0151643bd 100644 --- a/ts/session/snode_api/lokiRpc.ts +++ b/ts/session/snode_api/lokiRpc.ts @@ -85,7 +85,7 @@ export async function snodeRpc( params: any, targetNode: Snode ): Promise { - const url = `https://${targetNode.ip}${targetNode.port}/storage_rpc/v1`; + const url = `https://${targetNode.ip}:${targetNode.port}/storage_rpc/v1`; // TODO: The jsonrpc and body field will be ignored on storage server if (params.pubKey) {