Add button with icon to touch bar spec
This commit is contained in:
parent
c32a723e29
commit
ca46d52b0c
1 changed files with 6 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
||||||
const assert = require('assert')
|
const assert = require('assert')
|
||||||
|
const path = require('path')
|
||||||
const {BrowserWindow, TouchBar} = require('electron').remote
|
const {BrowserWindow, TouchBar} = require('electron').remote
|
||||||
const {closeWindow} = require('./window-helpers')
|
const {closeWindow} = require('./window-helpers')
|
||||||
|
|
||||||
|
@ -48,6 +49,11 @@ describe('TouchBar module', function () {
|
||||||
const label = new TouchBarLabel({label: 'bar'})
|
const label = new TouchBarLabel({label: 'bar'})
|
||||||
const touchBar = new TouchBar([
|
const touchBar = new TouchBar([
|
||||||
new TouchBarButton({label: 'foo', backgroundColor: '#F00', click: () => {}}),
|
new TouchBarButton({label: 'foo', backgroundColor: '#F00', click: () => {}}),
|
||||||
|
new TouchBarButton({
|
||||||
|
icon: path.join(__dirname, 'fixtures', 'assets', 'logo.png'),
|
||||||
|
iconPosition: 'right',
|
||||||
|
click: () => {}
|
||||||
|
}),
|
||||||
new TouchBarColorPicker({selectedColor: '#F00', change: () => {}}),
|
new TouchBarColorPicker({selectedColor: '#F00', change: () => {}}),
|
||||||
new TouchBarGroup({items: new TouchBar([new TouchBarLabel({label: 'hello'})])}),
|
new TouchBarGroup({items: new TouchBar([new TouchBarLabel({label: 'hello'})])}),
|
||||||
label,
|
label,
|
||||||
|
|
Loading…
Reference in a new issue