From 779be1213eb56ee55c34689743d4b2216b8002cd Mon Sep 17 00:00:00 2001 From: Audric Ackermann Date: Thu, 21 May 2020 09:24:05 +1000 Subject: [PATCH] fix delete message test by making it independant --- integration_test/message_functions_test.js | 13 ++++++------- ts/components/session/LeftPaneSectionHeader.tsx | 4 ++-- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/integration_test/message_functions_test.js b/integration_test/message_functions_test.js index 8732ed321..ba496d347 100644 --- a/integration_test/message_functions_test.js +++ b/integration_test/message_functions_test.js @@ -4,7 +4,7 @@ /* eslint-disable import/no-extraneous-dependencies */ const path = require('path'); -const { after, before, describe, it } = require('mocha'); +const { afterEach, beforeEach, describe, it } = require('mocha'); const common = require('./common'); const ConversationPage = require('./page-objects/conversation.page'); @@ -14,23 +14,22 @@ describe('Message Functions', function() { this.timeout(60000); this.slow(15000); - before(async () => { + beforeEach(async () => { await common.killallElectron(); await common.stopStubSnodeServer(); [app, app2] = await common.startAppsAsFriends(); + // create group and add new friend + await common.addFriendToNewClosedGroup(app, app2); }); - after(async () => { + afterEach(async () => { await common.stopApp(app); await common.killallElectron(); await common.stopStubSnodeServer(); }); it('can send attachment', async () => { - // create group and add new friend - await common.addFriendToNewClosedGroup(app, app2); - // send attachment from app1 to closed group const fileLocation = path.join(__dirname, 'test_attachment'); const messageText = 'test_attachment'; @@ -68,7 +67,7 @@ describe('Message Functions', function() { .click(); await app.client.element(ConversationPage.deleteMessageCtxButton).click(); - // delete messaage from modal + // delete message from modal await app.client.waitForExist( ConversationPage.deleteMessageModalButton, 5000 diff --git a/ts/components/session/LeftPaneSectionHeader.tsx b/ts/components/session/LeftPaneSectionHeader.tsx index 54e8171b8..336c748ba 100644 --- a/ts/components/session/LeftPaneSectionHeader.tsx +++ b/ts/components/session/LeftPaneSectionHeader.tsx @@ -105,7 +105,7 @@ export class LeftPaneSectionHeader extends React.Component { count={notificationCount} size={NotificationCountSize.ON_HEADER} onClick={this.props.buttonClicked} - key='notification-count' // we can only have one of those here + key="notification-count" // we can only have one of those here /> ); @@ -115,7 +115,7 @@ export class LeftPaneSectionHeader extends React.Component { count={notificationCount} size={NotificationCountSize.ON_HEADER} onClick={this.props.buttonClicked} - key='notification-count' // we can only have one of those here + key="notification-count" // we can only have one of those here /> ); }