[Feature] Dashboard filter indicators (#7908)

* dashboard filter indicators

* add/fix unit tests
This commit is contained in:
Grace Guo
2019-08-21 17:34:08 -07:00
committed by GitHub
parent 0fd7364503
commit 40776bd547
74 changed files with 2455 additions and 454 deletions

View File

@@ -49,22 +49,22 @@ describe('findTabIndexByComponentId', () => {
];
const badPath = ['ROOT_ID', 'TABS-MNQQSW-kyd', 'TAB-ABC', 'TABS-Oduxop1L7I'];
it('should return 0 if no directPathToChild', () => {
it('should return -1 if no directPathToChild', () => {
expect(
findTabIndexByComponentId({
currentComponent: topLevelTabsComponent,
directPathToChild: [],
}),
).toBe(0);
).toBe(-1);
});
it('should return 0 if not found tab id', () => {
it('should return -1 if not found tab id', () => {
expect(
findTabIndexByComponentId({
currentComponent: topLevelTabsComponent,
directPathToChild: badPath,
}),
).toBe(0);
).toBe(-1);
});
it('should return children index if matched an id in the path', () => {