Modify run conditions for nightly e2e job to create test cycle and post in channel. (#2971)
This commit is contained in:
@@ -43,7 +43,10 @@ describe('focus', function desc() {
|
||||
],
|
||||
};
|
||||
|
||||
beforeEach(async () => {
|
||||
let firstServer;
|
||||
let loadingScreen;
|
||||
|
||||
before(async () => {
|
||||
env.cleanDataDir();
|
||||
env.createTestUserDataDir();
|
||||
env.cleanTestConfig();
|
||||
@@ -51,9 +54,16 @@ describe('focus', function desc() {
|
||||
await asyncSleep(1000);
|
||||
this.app = await env.getApp();
|
||||
this.serverMap = await env.getServerMap(this.app);
|
||||
|
||||
loadingScreen = this.app.windows().find((window) => window.url().includes('loadingScreen'));
|
||||
await loadingScreen.waitForSelector('.LoadingScreen', {state: 'hidden'});
|
||||
firstServer = this.serverMap[`${config.teams[0].name}___TAB_MESSAGING`].win;
|
||||
await env.loginToMattermost(firstServer);
|
||||
const textbox = await firstServer.waitForSelector('#post_textbox');
|
||||
textbox.focus();
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
after(async () => {
|
||||
if (this.app) {
|
||||
await this.app.close();
|
||||
}
|
||||
@@ -61,17 +71,6 @@ describe('focus', function desc() {
|
||||
});
|
||||
|
||||
describe('Focus textbox tests', () => {
|
||||
let firstServer;
|
||||
|
||||
beforeEach(async () => {
|
||||
const loadingScreen = this.app.windows().find((window) => window.url().includes('loadingScreen'));
|
||||
await loadingScreen.waitForSelector('.LoadingScreen', {state: 'hidden'});
|
||||
firstServer = this.serverMap[`${config.teams[0].name}___TAB_MESSAGING`].win;
|
||||
await env.loginToMattermost(firstServer);
|
||||
const textbox = await firstServer.waitForSelector('#post_textbox');
|
||||
textbox.focus();
|
||||
});
|
||||
|
||||
it('MM-T1315 should return focus to the message box when closing the settings window', async () => {
|
||||
this.app.evaluate(({ipcMain}, showWindow) => {
|
||||
ipcMain.emit(showWindow);
|
||||
@@ -85,6 +84,8 @@ describe('focus', function desc() {
|
||||
const isTextboxFocused = await firstServer.$eval('#post_textbox', (el) => el === document.activeElement);
|
||||
isTextboxFocused.should.be.true;
|
||||
|
||||
await firstServer.fill('#post_textbox', '');
|
||||
|
||||
// Make sure you can just start typing and it'll go in the post textbox
|
||||
await asyncSleep(500);
|
||||
robot.typeString('Mattermost');
|
||||
@@ -108,6 +109,8 @@ describe('focus', function desc() {
|
||||
const isTextboxFocused = await firstServer.$eval('#post_textbox', (el) => el === document.activeElement);
|
||||
isTextboxFocused.should.be.true;
|
||||
|
||||
await firstServer.fill('#post_textbox', '');
|
||||
|
||||
// Make sure you can just start typing and it'll go in the post textbox
|
||||
await asyncSleep(500);
|
||||
robot.typeString('Mattermost');
|
||||
@@ -132,6 +135,8 @@ describe('focus', function desc() {
|
||||
const isTextboxFocused = await firstServer.$eval('#post_textbox', (el) => el === document.activeElement);
|
||||
isTextboxFocused.should.be.true;
|
||||
|
||||
await firstServer.fill('#post_textbox', '');
|
||||
|
||||
// Make sure you can just start typing and it'll go in the post textbox
|
||||
await asyncSleep(500);
|
||||
robot.typeString('Mattermost');
|
||||
|
Reference in New Issue
Block a user