fix: enable autoHideMenuBar
tests on Linux and Windows (#46829)
* fix: enable autoHideMenuBar tests Co-authored-by: Charles Kerr <charles@charleskerr.com> * docs: mark autoHideMenuBar as supported on Linux, Windows Co-authored-by: Charles Kerr <charles@charleskerr.com> --------- Co-authored-by: trop[bot] <37223003+trop[bot]@users.noreply.github.com> Co-authored-by: Charles Kerr <charles@charleskerr.com>
This commit is contained in:
parent
52a7c752e6
commit
d224d03e31
4 changed files with 7 additions and 7 deletions
|
@ -396,7 +396,7 @@ A `View` property for the content view of the window.
|
|||
|
||||
A `string` (optional) property that is equal to the `tabbingIdentifier` passed to the `BrowserWindow` constructor or `undefined` if none was set.
|
||||
|
||||
#### `win.autoHideMenuBar`
|
||||
#### `win.autoHideMenuBar` _Linux_ _Windows_
|
||||
|
||||
A `boolean` property that determines whether the window menu bar should hide itself automatically. Once set, the menu bar will only show when users press the single `Alt` key.
|
||||
|
||||
|
|
|
@ -497,7 +497,7 @@ A `Integer` property representing the unique ID of the window. Each ID is unique
|
|||
|
||||
A `string` (optional) property that is equal to the `tabbingIdentifier` passed to the `BrowserWindow` constructor or `undefined` if none was set.
|
||||
|
||||
#### `win.autoHideMenuBar`
|
||||
#### `win.autoHideMenuBar` _Linux_ _Windows_
|
||||
|
||||
A `boolean` property that determines whether the window menu bar should hide itself automatically. Once set, the menu bar will only show when users press the single `Alt` key.
|
||||
|
||||
|
|
|
@ -58,8 +58,8 @@
|
|||
`false` on macOS. This option is not configurable on other platforms.
|
||||
* `disableAutoHideCursor` boolean (optional) - Whether to hide cursor when typing.
|
||||
Default is `false`.
|
||||
* `autoHideMenuBar` boolean (optional) - Auto hide the menu bar unless the `Alt`
|
||||
key is pressed. Default is `false`.
|
||||
* `autoHideMenuBar` boolean (optional) _Linux_ _Windows_ - Auto hide the menu bar
|
||||
unless the `Alt` key is pressed. Default is `false`.
|
||||
* `enableLargerThanScreen` boolean (optional) _macOS_ - Enable the window to
|
||||
be resized larger than screen. Only relevant for macOS, as other OSes
|
||||
allow larger-than-screen windows by default. Default is `false`.
|
||||
|
|
|
@ -2360,10 +2360,10 @@ describe('BrowserWindow module', () => {
|
|||
});
|
||||
});
|
||||
|
||||
describe('autoHideMenuBar state', () => {
|
||||
ifdescribe(process.platform !== 'darwin')('autoHideMenuBar state', () => {
|
||||
afterEach(closeAllWindows);
|
||||
|
||||
it('for properties', () => {
|
||||
describe('for properties', () => {
|
||||
it('can be set with autoHideMenuBar constructor option', () => {
|
||||
const w = new BrowserWindow({ show: false, autoHideMenuBar: true });
|
||||
expect(w.autoHideMenuBar).to.be.true('autoHideMenuBar');
|
||||
|
@ -2379,7 +2379,7 @@ describe('BrowserWindow module', () => {
|
|||
});
|
||||
});
|
||||
|
||||
it('for functions', () => {
|
||||
describe('for functions', () => {
|
||||
it('can be set with autoHideMenuBar constructor option', () => {
|
||||
const w = new BrowserWindow({ show: false, autoHideMenuBar: true });
|
||||
expect(w.isMenuBarAutoHide()).to.be.true('autoHideMenuBar');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue