Skip to content

Commit

Permalink
fix(segmented-button): Fixed unit test in IE11 (#6271)
Browse files Browse the repository at this point in the history
  • Loading branch information
abhiomkar committed Jul 27, 2020
1 parent 7555383 commit b96fbfc
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,13 +58,13 @@ const setupTest = () => {
};

const setAllSelected = (els: NodeListOf<Element>) => {
els.forEach((el) => {
Array.from(els).forEach((el: Element) => {
el.classList.add(testCssClasses.SELECTED);
});
}

const setAllUnselected = (els: NodeListOf<Element>) => {
els.forEach((el) => {
Array.from(els).forEach((el: Element) => {
el.classList.remove(testCssClasses.SELECTED);
});
}
Expand Down Expand Up @@ -288,7 +288,7 @@ describe('MDCSegmentedButton', () => {
const segments = root.querySelectorAll(testSelectors.SEGMENT);
const selectedSegment = segments[testIndices.SELECTED];
selectedSegment.setAttribute(attributes.DATA_SEGMENT_ID, testSegmentIds.SELECTED_SEGMENT_ID);

setAllUnselected(segments);
component.selectSegment(testIndices.SELECTED);
expect(selectedSegment.classList.contains(testCssClasses.SELECTED)).toBeTrue();
Expand Down

0 comments on commit b96fbfc

Please sign in to comment.