test:MM-T817/MM-T818/MM-T819 Zooming in the Menu Bar (#1979)
* test:MM-T817/MM-T818/MM-T819 Zooming in the Menu Bar * test:MM-T818/T819 Zoom in zoom out in the menu bar
This commit is contained in:

committed by
GitHub

parent
2e8a2b1330
commit
e4394caf97
@@ -20,7 +20,7 @@ async function setupPromise(window, id) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
describe('mattermost', function desc() {
|
describe('menu/view', function desc() {
|
||||||
this.timeout(30000);
|
this.timeout(30000);
|
||||||
|
|
||||||
const config = env.demoMattermostConfig;
|
const config = env.demoMattermostConfig;
|
||||||
@@ -86,6 +86,53 @@ describe('mattermost', function desc() {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
it('MM-T817 Actual Size Zoom in the menu bar', async () => {
|
||||||
|
if (process.platform === 'win32' || process.platform === 'linux') {
|
||||||
|
const mainWindow = this.app.windows().find((window) => window.url().includes('index'));
|
||||||
|
mainWindow.should.not.be.null;
|
||||||
|
await mainWindow.click('button.three-dot-menu');
|
||||||
|
robot.keyTap('v');
|
||||||
|
robot.keyTap('a');
|
||||||
|
const zoomLevel = await mainWindow.evaluate('window.devicePixelRatio');
|
||||||
|
zoomLevel.should.be.equal(1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
it('MM-T818 Zoom in from the menu bar', async () => {
|
||||||
|
if (process.platform === 'win32' || process.platform === 'linux') {
|
||||||
|
const mainWindow = this.app.windows().find((window) => window.url().includes('index'));
|
||||||
|
const loadingScreen = this.app.windows().find((window) => window.url().includes('loadingScreen'));
|
||||||
|
await loadingScreen.waitForSelector('.LoadingScreen', {state: 'hidden'});
|
||||||
|
const firstServer = this.serverMap[`${config.teams[0].name}___TAB_MESSAGING`].win;
|
||||||
|
await env.loginToMattermost(firstServer);
|
||||||
|
await firstServer.waitForSelector('#searchBox');
|
||||||
|
await mainWindow.click('button.three-dot-menu');
|
||||||
|
robot.keyTap('v');
|
||||||
|
robot.keyTap('z');
|
||||||
|
robot.keyTap('enter');
|
||||||
|
const zoomLevel = await firstServer.evaluate('window.devicePixelRatio');
|
||||||
|
zoomLevel.should.be.greaterThan(1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
it('MM-T819 Zoom out from the menu bar', async () => {
|
||||||
|
if (process.platform === 'win32' || process.platform === 'linux') {
|
||||||
|
const mainWindow = this.app.windows().find((window) => window.url().includes('index'));
|
||||||
|
const loadingScreen = this.app.windows().find((window) => window.url().includes('loadingScreen'));
|
||||||
|
await loadingScreen.waitForSelector('.LoadingScreen', {state: 'hidden'});
|
||||||
|
const firstServer = this.serverMap[`${config.teams[0].name}___TAB_MESSAGING`].win;
|
||||||
|
await env.loginToMattermost(firstServer);
|
||||||
|
await firstServer.waitForSelector('#searchBox');
|
||||||
|
await mainWindow.click('button.three-dot-menu');
|
||||||
|
robot.keyTap('v');
|
||||||
|
robot.keyTap('z');
|
||||||
|
robot.keyTap('z');
|
||||||
|
robot.keyTap('enter');
|
||||||
|
const zoomLevel = await firstServer.evaluate('window.devicePixelRatio');
|
||||||
|
zoomLevel.should.be.lessThan(1);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
describe('Reload', () => {
|
describe('Reload', () => {
|
||||||
let browserWindow;
|
let browserWindow;
|
||||||
let webContentsId;
|
let webContentsId;
|
||||||
|
Reference in New Issue
Block a user