From e2c73f2fe5907462a2db3e065b1937a37fbfd8c1 Mon Sep 17 00:00:00 2001 From: Vincent Date: Tue, 28 Apr 2020 11:59:12 +1000 Subject: [PATCH] fixups --- config/test-integration-session-3.json | 6 ---- integration_test/common.js | 39 +++++++++++++--------- integration_test/message_functions_test.js | 2 +- integration_test/settings_test.js | 6 ++-- 4 files changed, 27 insertions(+), 26 deletions(-) delete mode 100644 config/test-integration-session-3.json diff --git a/config/test-integration-session-3.json b/config/test-integration-session-3.json deleted file mode 100644 index 9165effd6..000000000 --- a/config/test-integration-session-3.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "storageProfile": "testIntegration3Profile", - "openDevTools": false, - "updatesEnabled": false, - "localServerPort": "8489" -} diff --git a/integration_test/common.js b/integration_test/common.js index 704322079..8eb506349 100644 --- a/integration_test/common.js +++ b/integration_test/common.js @@ -66,8 +66,6 @@ module.exports = { async setValueWrapper(app, selector, value) { await app.client.element(selector).click(); // keys, setValue and addValue hang on certain platforms - // could put a branch here to use one of those - // if we know what platforms are good and which ones are broken if (process.platform === 'darwin') { await app.client.execute( @@ -325,9 +323,11 @@ module.exports = { }, async addFriendToNewClosedGroup(app, app2) { - await app.client - .element(ConversationPage.closedGroupNameTextarea) - .setValue(this.VALID_CLOSED_GROUP_NAME1); + await this.setValueWrapper( + app, + ConversationPage.closedGroupNameTextarea, + this.VALID_CLOSED_GROUP_NAME1 + ); await app.client .element(ConversationPage.closedGroupNameTextarea) .getValue() @@ -335,7 +335,8 @@ module.exports = { await app.client .element(ConversationPage.createClosedGroupMemberItem) - .isVisible(); + .isVisible() + .should.eventually.be.true; // select the first friend as a member of the groups being created await app.client @@ -343,7 +344,8 @@ module.exports = { .click(); await app.client .element(ConversationPage.createClosedGroupMemberItemSelected) - .isVisible(); + .isVisible() + .should.eventually.be.true; // trigger the creation of the group await app.client @@ -356,10 +358,11 @@ module.exports = { ); await app.client.isExisting( ConversationPage.headerTitleGroupName(this.VALID_CLOSED_GROUP_NAME1) - ); + ).should.eventually.be.true; await app.client .element(ConversationPage.headerTitleMembers(2)) - .isVisible(); + .isVisible() + .should.eventually.be.true; // validate overlay is closed await app.client @@ -376,7 +379,7 @@ module.exports = { ConversationPage.rowOpenGroupConversationName( this.VALID_CLOSED_GROUP_NAME1 ) - ); + ).should.eventually.be.true; // next check app2 has been invited and has the group in its conversations await app2.client.waitForExist( @@ -508,9 +511,11 @@ module.exports = { }, async sendMessage(app, messageText, fileLocation = undefined) { - await app.client - .element(ConversationPage.sendMessageTextarea) - .setValue(messageText); + await this.setValueWrapper( + app, + ConversationPage.sendMessageTextarea, + messageText + ); await app.client .element(ConversationPage.sendMessageTextarea) .getValue() @@ -518,9 +523,11 @@ module.exports = { // attach a file if (fileLocation) { - await app.client - .element(ConversationPage.attachmentInput) - .setValue(fileLocation); + await this.setValueWrapper( + app, + ConversationPage.attachmentInput, + fileLocation + ); } // send message diff --git a/integration_test/message_functions_test.js b/integration_test/message_functions_test.js index e533592e0..73296d1a7 100644 --- a/integration_test/message_functions_test.js +++ b/integration_test/message_functions_test.js @@ -35,7 +35,7 @@ describe('Message Functions', function() { await common.addFriendToNewClosedGroup(app, app2); // send attachment from app1 to closed group - const fileLocation = path.join(__dirname, '/test_attachment'); + const fileLocation = path.join(__dirname, 'test_attachment'); const messageText = 'test_attachment'; common.sendMessage(app, messageText, fileLocation); diff --git a/integration_test/settings_test.js b/integration_test/settings_test.js index 2477c8b34..6772d90aa 100644 --- a/integration_test/settings_test.js +++ b/integration_test/settings_test.js @@ -34,9 +34,9 @@ describe('Settings', function() { }); after(async () => { - // await common.stopApp(app); - // await common.killallElectron(); - // await common.stopStubSnodeServer(); + await common.stopApp(app); + await common.killallElectron(); + await common.stopStubSnodeServer(); }); it('can toggle menubar', async () => {