mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-24 01:25:37 -05:00
Fix custom UI validation bugs (#1583)
This commit is contained in:
@@ -118,4 +118,14 @@ suite('ExtHostModelView Validation Tests', () => {
|
||||
});
|
||||
assert.equal(inputBox.valid, true, 'Input box did not update validity to true based on the validityChanged event');
|
||||
});
|
||||
|
||||
test('Main thread validityChanged events cause component to fire validity changed events', () => {
|
||||
let validityFromEvent: boolean = undefined;
|
||||
inputBox.onValidityChanged(valid => validityFromEvent = valid);
|
||||
extHostModelView.$handleEvent(handle, inputBox.id, {
|
||||
eventType: ComponentEventType.validityChanged,
|
||||
args: false
|
||||
});
|
||||
assert.equal(validityFromEvent, false, 'Main thread validityChanged event did not cause component to fire its own event');
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user