From cc3e03c5e4084ba7b3cde3b0255f4098482e6706 Mon Sep 17 00:00:00 2001 From: Vincent Date: Wed, 29 Apr 2020 12:17:53 +1000 Subject: [PATCH] tests finalise --- integration_test/common.js | 1 - integration_test/message_functions_test.js | 4 ++-- integration_test/open_group_test.js | 7 +++---- integration_test/settings_test.js | 7 ++++++- 4 files changed, 11 insertions(+), 8 deletions(-) diff --git a/integration_test/common.js b/integration_test/common.js index a6e1d8b14..cac5a9526 100644 --- a/integration_test/common.js +++ b/integration_test/common.js @@ -64,7 +64,6 @@ module.exports = { // a wrapper to work around electron/spectron bug async setValueWrapper(app, selector, value) { - await app.client.element(selector).click(); // keys, setValue and addValue hang on certain platforms if (process.platform === 'darwin') { diff --git a/integration_test/message_functions_test.js b/integration_test/message_functions_test.js index 73296d1a7..c15f64621 100644 --- a/integration_test/message_functions_test.js +++ b/integration_test/message_functions_test.js @@ -58,7 +58,7 @@ describe('Message Functions', function() { await app.client.waitForExist( ConversationPage.existingSendMessageText(messageText), - 5000 + 6000 ); await app2.client.waitForExist( ConversationPage.existingReceivedMessageText(messageText), @@ -74,7 +74,7 @@ describe('Message Functions', function() { // delete messaage from modal await app.client.waitForExist( ConversationPage.deleteMessageModalButton, - 3000 + 5000 ); await app.client.element(ConversationPage.deleteMessageModalButton).click(); diff --git a/integration_test/open_group_test.js b/integration_test/open_group_test.js index e61f6047a..dba3d13e7 100644 --- a/integration_test/open_group_test.js +++ b/integration_test/open_group_test.js @@ -50,10 +50,9 @@ describe('Open groups', function() { .eventually.be.false; // validate open chat has been added - await app.client.waitForExist( - ConversationPage.rowOpenGroupConversationName(name), - 4000 - ); + await app.client.isExisting( + ConversationPage.rowOpenGroupConversationName(name) + ).should.eventually.be.true; } it('openGroup: works with valid open group url', async () => { diff --git a/integration_test/settings_test.js b/integration_test/settings_test.js index 6772d90aa..b166592b3 100644 --- a/integration_test/settings_test.js +++ b/integration_test/settings_test.js @@ -106,10 +106,15 @@ describe('Settings', function() { await app.client.keys('Enter'); - // Verify password removed + // Verify password removed with toast await app.client.waitForExist( CommonPage.toastWithText('Removed Password'), 2000 ); + + // Verify password actully removed + await app.client.isExisting( + CommonPage.divWithClass('session-settings__password-lock') + ).should.eventually.be.false; }); });