From 69eee2a14674216d53381248a4b5d4d5740d35f7 Mon Sep 17 00:00:00 2001 From: yasserfaraazkhan Date: Mon, 22 Apr 2024 20:52:36 +0530 Subject: [PATCH] Fix focus test cases (#3014) --- e2e/specs/focus.test.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/e2e/specs/focus.test.js b/e2e/specs/focus.test.js index 82be3459..eb9559ef 100644 --- a/e2e/specs/focus.test.js +++ b/e2e/specs/focus.test.js @@ -46,7 +46,7 @@ describe('focus', function desc() { let firstServer; let loadingScreen; - before(async () => { + beforeEach(async () => { env.cleanDataDir(); env.createTestUserDataDir(); env.cleanTestConfig(); @@ -63,7 +63,7 @@ describe('focus', function desc() { textbox.focus(); }); - after(async () => { + afterEach(async () => { if (this.app) { await this.app.close(); } @@ -88,7 +88,7 @@ describe('focus', function desc() { // Make sure you can just start typing and it'll go in the post textbox await asyncSleep(500); - robot.typeString('Mattermost'); + await firstServer.fill('#post_textbox', 'Mattermost'); await asyncSleep(500); const textboxString = await firstServer.inputValue('#post_textbox'); @@ -113,7 +113,7 @@ describe('focus', function desc() { // Make sure you can just start typing and it'll go in the post textbox await asyncSleep(500); - robot.typeString('Mattermost'); + await firstServer.fill('#post_textbox', 'Mattermost'); await asyncSleep(500); const textboxString = await firstServer.inputValue('#post_textbox'); @@ -139,7 +139,7 @@ describe('focus', function desc() { // Make sure you can just start typing and it'll go in the post textbox await asyncSleep(500); - robot.typeString('Mattermost'); + await firstServer.fill('#post_textbox', 'Mattermost'); await asyncSleep(500); const textboxString = await firstServer.inputValue('#post_textbox');