mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-24 10:38:59 +01:00
add some integration tests for static status bar items
This commit is contained in:
@@ -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();
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user