fix open group integration tests

pull/1287/head
Audric Ackermann 5 years ago
parent 52cb50f063
commit 8558764768
No known key found for this signature in database
GPG Key ID: 999F434D76324AD4

@ -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() {

@ -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;
});

@ -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(

@ -476,10 +476,15 @@ export class LeftPaneMessageSection extends React.Component<Props, State> {
// 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',
});

@ -85,7 +85,7 @@ export async function snodeRpc(
params: any,
targetNode: Snode
): Promise<boolean | SnodeResponse> {
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) {

Loading…
Cancel
Save