Fix focus test cases (#3014)
This commit is contained in:
@@ -46,7 +46,7 @@ describe('focus', function desc() {
|
|||||||
let firstServer;
|
let firstServer;
|
||||||
let loadingScreen;
|
let loadingScreen;
|
||||||
|
|
||||||
before(async () => {
|
beforeEach(async () => {
|
||||||
env.cleanDataDir();
|
env.cleanDataDir();
|
||||||
env.createTestUserDataDir();
|
env.createTestUserDataDir();
|
||||||
env.cleanTestConfig();
|
env.cleanTestConfig();
|
||||||
@@ -63,7 +63,7 @@ describe('focus', function desc() {
|
|||||||
textbox.focus();
|
textbox.focus();
|
||||||
});
|
});
|
||||||
|
|
||||||
after(async () => {
|
afterEach(async () => {
|
||||||
if (this.app) {
|
if (this.app) {
|
||||||
await this.app.close();
|
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
|
// Make sure you can just start typing and it'll go in the post textbox
|
||||||
await asyncSleep(500);
|
await asyncSleep(500);
|
||||||
robot.typeString('Mattermost');
|
await firstServer.fill('#post_textbox', 'Mattermost');
|
||||||
await asyncSleep(500);
|
await asyncSleep(500);
|
||||||
|
|
||||||
const textboxString = await firstServer.inputValue('#post_textbox');
|
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
|
// Make sure you can just start typing and it'll go in the post textbox
|
||||||
await asyncSleep(500);
|
await asyncSleep(500);
|
||||||
robot.typeString('Mattermost');
|
await firstServer.fill('#post_textbox', 'Mattermost');
|
||||||
await asyncSleep(500);
|
await asyncSleep(500);
|
||||||
|
|
||||||
const textboxString = await firstServer.inputValue('#post_textbox');
|
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
|
// Make sure you can just start typing and it'll go in the post textbox
|
||||||
await asyncSleep(500);
|
await asyncSleep(500);
|
||||||
robot.typeString('Mattermost');
|
await firstServer.fill('#post_textbox', 'Mattermost');
|
||||||
await asyncSleep(500);
|
await asyncSleep(500);
|
||||||
|
|
||||||
const textboxString = await firstServer.inputValue('#post_textbox');
|
const textboxString = await firstServer.inputValue('#post_textbox');
|
||||||
|
Reference in New Issue
Block a user