[MM-39491] Force Add Server modal to stay until server has been added (#1869)
* [MM-39491] Force Add Server modal to stay until server has been added * Make the parameter optional * Actually do the logic, add a test for the logic * Add remove event listener
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
|
||||
'use strict';
|
||||
|
||||
const robot = require('robotjs');
|
||||
|
||||
const env = require('../../modules/environment');
|
||||
|
||||
describe('startup/app', function desc() {
|
||||
@@ -27,6 +29,17 @@ describe('startup/app', function desc() {
|
||||
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-T4399_2 should show no servers configured in dropdown when no servers exist', async () => {
|
||||
const mainWindow = this.app.windows().find((window) => window.url().includes('index'));
|
||||
const dropdownButtonText = await mainWindow.innerText('.TeamDropdownButton');
|
||||
|
Reference in New Issue
Block a user