Skip to content

Commit a3b50b3

Browse files
committed
Review changes
1 parent c4c118e commit a3b50b3

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/lib/select/select.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -321,12 +321,12 @@ describe('MdSelect', () => {
321321

322322
options =
323323
overlayContainerElement.querySelectorAll('md-option') as NodeListOf<HTMLElement>;
324-
expect(options[0].classList).not.toContain('mat-selected');
325-
expect(options[1].classList).toContain('mat-selected');
324+
expect(options[0].classList).not.toContain('mat-selected', 'Expected first option to no longer be selected');
325+
expect(options[1].classList).toContain('mat-selected', 'Expected second option to be selected');
326326

327327
const optionInstances = fixture.componentInstance.options.toArray();
328-
expect(optionInstances[0].selected).toBe(false);
329-
expect(optionInstances[1].selected).toBe(true);
328+
expect(optionInstances[0].selected).toBe(false, 'Expected first option to no longer be selected');
329+
expect(optionInstances[1].selected).toBe(true, 'Expected second option to be selected');
330330
});
331331

332332
it('should remove selection if option has been removed', async(() => {

src/lib/select/select.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -545,6 +545,7 @@ export class MdSelect implements AfterContentInit, OnDestroy, OnInit, ControlVal
545545
}
546546

547547
this._clearSelection();
548+
548549
if (isArray) {
549550
value.forEach((currentValue: any) => this._selectValue(currentValue));
550551
this._sortValues();

0 commit comments

Comments
 (0)