fix: running tests with release build (#31092)

This commit is contained in:
Milan Burda 2021-09-27 16:58:03 +02:00 committed by GitHub
parent c377fe4ba6
commit 98ac0ca52a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 16 additions and 28 deletions

View file

@ -462,9 +462,9 @@ describe('MenuItems', () => {
{ label: 'text', accelerator: 'Alt+A' }
]);
expect(menu.getAcceleratorTextAt(0)).to.equal(isDarwin() ? 'Command+A' : 'Ctrl+A');
expect(menu.getAcceleratorTextAt(1)).to.equal('Shift+A');
expect(menu.getAcceleratorTextAt(2)).to.equal('Alt+A');
expect(menu._getAcceleratorTextAt(0)).to.equal(isDarwin() ? 'Command+A' : 'Ctrl+A');
expect(menu._getAcceleratorTextAt(1)).to.equal('Shift+A');
expect(menu._getAcceleratorTextAt(2)).to.equal('Alt+A');
});
it('should display modifiers correctly for special keys', () => {
@ -474,9 +474,9 @@ describe('MenuItems', () => {
{ label: 'text', accelerator: 'Alt+Tab' }
]);
expect(menu.getAcceleratorTextAt(0)).to.equal(isDarwin() ? 'Command+Tab' : 'Ctrl+Tab');
expect(menu.getAcceleratorTextAt(1)).to.equal('Shift+Tab');
expect(menu.getAcceleratorTextAt(2)).to.equal('Alt+Tab');
expect(menu._getAcceleratorTextAt(0)).to.equal(isDarwin() ? 'Command+Tab' : 'Ctrl+Tab');
expect(menu._getAcceleratorTextAt(1)).to.equal('Shift+Tab');
expect(menu._getAcceleratorTextAt(2)).to.equal('Alt+Tab');
});
it('should not display modifiers twice', () => {
@ -485,8 +485,8 @@ describe('MenuItems', () => {
{ label: 'text', accelerator: 'Shift+Shift+Tab' }
]);
expect(menu.getAcceleratorTextAt(0)).to.equal('Shift+A');
expect(menu.getAcceleratorTextAt(1)).to.equal('Shift+Tab');
expect(menu._getAcceleratorTextAt(0)).to.equal('Shift+A');
expect(menu._getAcceleratorTextAt(1)).to.equal('Shift+Tab');
});
it('should display correctly for shifted keys', () => {
@ -499,12 +499,12 @@ describe('MenuItems', () => {
{ label: 'text', accelerator: 'Control+?' }
]);
expect(menu.getAcceleratorTextAt(0)).to.equal('Ctrl+Shift+=');
expect(menu.getAcceleratorTextAt(1)).to.equal('Ctrl++');
expect(menu.getAcceleratorTextAt(2)).to.equal('Ctrl+Shift+3');
expect(menu.getAcceleratorTextAt(3)).to.equal('Ctrl+#');
expect(menu.getAcceleratorTextAt(4)).to.equal('Ctrl+Shift+/');
expect(menu.getAcceleratorTextAt(5)).to.equal('Ctrl+?');
expect(menu._getAcceleratorTextAt(0)).to.equal('Ctrl+Shift+=');
expect(menu._getAcceleratorTextAt(1)).to.equal('Ctrl++');
expect(menu._getAcceleratorTextAt(2)).to.equal('Ctrl+Shift+3');
expect(menu._getAcceleratorTextAt(3)).to.equal('Ctrl+#');
expect(menu._getAcceleratorTextAt(4)).to.equal('Ctrl+Shift+/');
expect(menu._getAcceleratorTextAt(5)).to.equal('Ctrl+?');
});
});
});