mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 21:09:43 +00:00
add some integration tests for static status bar items
This commit is contained in:
parent
93b1636904
commit
c106fbe627
|
@ -7,6 +7,7 @@
|
|||
"enabledApiProposals": [
|
||||
"authSession",
|
||||
"contribViewsRemote",
|
||||
"contribStatusBarItems",
|
||||
"customEditorMove",
|
||||
"diffCommand",
|
||||
"documentFiltersExclusive",
|
||||
|
@ -192,7 +193,14 @@
|
|||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
],
|
||||
"statusBarItems": {
|
||||
"id": "myStaticItem",
|
||||
"alignment": "right",
|
||||
"priority": 17,
|
||||
"name": "My Static Item",
|
||||
"text": "Hello $(globe)"
|
||||
}
|
||||
},
|
||||
"scripts": {
|
||||
"compile": "node ./node_modules/vscode/bin/compile -watch -p ./",
|
||||
|
|
|
@ -1036,4 +1036,26 @@ suite('vscode API - window', () => {
|
|||
statusBarEntryWithId.name = 'Test Name';
|
||||
assert.strictEqual(statusBarEntryWithId.name, 'Test Name');
|
||||
});
|
||||
|
||||
test('createStatusBar - static', async function () {
|
||||
|
||||
const item = window.createStatusBarItem('myStaticItem');
|
||||
|
||||
assert.strictEqual(item.alignment, StatusBarAlignment.Right);
|
||||
assert.strictEqual(item.priority, 17);
|
||||
assert.strictEqual(item.name, 'My Static Item');
|
||||
assert.strictEqual(item.text, 'Hello $(globe)');
|
||||
|
||||
item.dispose();
|
||||
});
|
||||
|
||||
test('createStatusBar - static, CANNOT change some props', async function () {
|
||||
|
||||
const item = window.createStatusBarItem('myStaticItem', StatusBarAlignment.Left, 12);
|
||||
|
||||
assert.strictEqual(item.alignment, StatusBarAlignment.Right);
|
||||
assert.strictEqual(item.priority, 17);
|
||||
|
||||
item.dispose();
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in a new issue