Fixed some E2E tests that broke on v5.2 (#2453)
* Fixing some E2E tests * Fixed a couple flaky ones * Fixed some issues on Windows
This commit is contained in:
@@ -16,11 +16,6 @@ describe('startup/app', function desc() {
|
||||
env.createTestUserDataDir();
|
||||
env.cleanTestConfig();
|
||||
this.app = await env.getApp();
|
||||
|
||||
// Skip welcome screen modal
|
||||
const welcomeScreenModal = this.app.windows().find((window) => window.url().includes('welcomeScreen'));
|
||||
welcomeScreenModal.click('.WelcomeScreen .WelcomeScreen__button');
|
||||
await asyncSleep(500);
|
||||
});
|
||||
|
||||
afterEach(async () => {
|
||||
@@ -30,29 +25,6 @@ describe('startup/app', function desc() {
|
||||
await env.clearElectronInstances();
|
||||
});
|
||||
|
||||
it('MM-T4399_1 should show the new server modal when no servers exist', async () => {
|
||||
const newServerModal = this.app.windows().find((window) => window.url().includes('newServer'));
|
||||
const modalTitle = await newServerModal.innerText('#newServerModal .modal-title');
|
||||
modalTitle.should.equal('Add Server');
|
||||
});
|
||||
|
||||
it('MM-T4419 should not allow the user to close the new server modal when no servers exist', async () => {
|
||||
const newServerModal = this.app.windows().find((window) => window.url().includes('newServer'));
|
||||
|
||||
const existing = await newServerModal.isVisible('#cancelNewServerModal');
|
||||
existing.should.be.false;
|
||||
|
||||
robot.keyTap('escape');
|
||||
const existingModal = this.app.windows().find((window) => window.url().includes('newServer'));
|
||||
existingModal.should.not.be.null;
|
||||
});
|
||||
|
||||
it('MM-T4985 should show app name in title bar when no servers exist', async () => {
|
||||
const mainWindow = this.app.windows().find((window) => window.url().includes('index'));
|
||||
const titleBarText = await mainWindow.innerText('.app-title');
|
||||
titleBarText.should.equal('Mattermost');
|
||||
});
|
||||
|
||||
it('MM-T4400 should be stopped when the app instance already exists', (done) => {
|
||||
const secondApp = env.getApp();
|
||||
|
||||
@@ -84,4 +56,12 @@ describe('startup/app', function desc() {
|
||||
const modalButton = await welcomeScreenModal.innerText('.WelcomeScreen .WelcomeScreen__button');
|
||||
modalButton.should.equal('Get Started');
|
||||
});
|
||||
|
||||
if (process.platform !== 'linux') {
|
||||
it('MM-T4985 should show app name in title bar when no servers exist', async () => {
|
||||
const mainWindow = this.app.windows().find((window) => window.url().includes('index'));
|
||||
const titleBarText = await mainWindow.innerText('.app-title');
|
||||
titleBarText.should.equal('Mattermost');
|
||||
});
|
||||
}
|
||||
});
|
||||
|
Reference in New Issue
Block a user