generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: #87 - fix search - add unit test
- Loading branch information
Showing
3 changed files
with
191 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,36 +1,135 @@ | ||
import { App } from '@sap/knowledge-hub-extension-types'; | ||
|
||
export const appStateTabsBlogs = { | ||
ariaLabel: 'BLOGS_TAB', | ||
count: -1, | ||
headerText: '', | ||
key: 'blogs', | ||
path: '/blogs' | ||
}; | ||
|
||
export const appStateTabsBlogsWithCount = { | ||
ariaLabel: 'BLOGS_TAB', | ||
count: 10, | ||
headerText: '', | ||
key: 'blogs', | ||
path: '/blogs' | ||
}; | ||
|
||
export const appStateTabsHome = { | ||
ariaLabel: 'HOME_TAB', | ||
count: -1, | ||
headerText: '', | ||
key: 'home', | ||
path: '/' | ||
}; | ||
|
||
export const appStateTabsTutorials = { | ||
ariaLabel: 'TUTORIALS_TAB', | ||
count: -1, | ||
headerText: '', | ||
key: 'tutorials', | ||
path: '/tutorials' | ||
}; | ||
|
||
export const appStateTabsTutorialsWithCount = { | ||
ariaLabel: 'TUTORIALS_TAB', | ||
count: 10, | ||
headerText: '', | ||
key: 'tutorials', | ||
path: '/tutorials' | ||
}; | ||
|
||
export const appStateTabsBlogsWithText = { | ||
ariaLabel: 'BLOGS_TAB', | ||
count: -1, | ||
headerText: 'BLOGS_TAB', | ||
key: 'blogs', | ||
path: '/blogs' | ||
}; | ||
|
||
export const appStateTabsHomeWithText = { | ||
ariaLabel: 'HOME_TAB', | ||
count: -1, | ||
headerText: 'HOME_TAB', | ||
key: 'home', | ||
path: '/' | ||
}; | ||
|
||
export const appStateTabsTutorialsWithText = { | ||
ariaLabel: 'TUTORIALS_TAB', | ||
count: -1, | ||
headerText: 'TUTORIALS_TAB', | ||
key: 'tutorials', | ||
path: '/tutorials' | ||
}; | ||
|
||
export const appStateTabs = { | ||
blogs: appStateTabsBlogs, | ||
home: appStateTabsHome, | ||
tutorials: appStateTabsTutorials | ||
}; | ||
|
||
export const appStateTabsWithText = { | ||
blogs: appStateTabsBlogsWithText, | ||
home: appStateTabsHomeWithText, | ||
tutorials: appStateTabsTutorialsWithText | ||
}; | ||
|
||
export const appStateTabsWithBlogsCount = { | ||
blogs: appStateTabsBlogsWithCount, | ||
home: appStateTabsHome, | ||
tutorials: appStateTabsTutorials | ||
}; | ||
|
||
export const appStateTabsWithTutorialsCount = { | ||
blogs: appStateTabsBlogs, | ||
home: appStateTabsHome, | ||
tutorials: appStateTabsTutorialsWithCount | ||
}; | ||
|
||
// | ||
|
||
export const appInitialState: App = { | ||
app: { | ||
appFilters: {}, | ||
appId: '' | ||
}, | ||
ui: { | ||
ready: false, | ||
tabs: {} | ||
tabs: appStateTabs | ||
} | ||
}; | ||
|
||
export const appStateTabs = { | ||
blogs: { | ||
ariaLabel: 'BLOGS_TAB', | ||
count: -1, | ||
headerText: '', | ||
key: 'blogs', | ||
path: '/blogs' | ||
export const appInitialStateReady: App = { | ||
app: { | ||
appFilters: {}, | ||
appId: '' | ||
}, | ||
ui: { | ||
ready: true, | ||
tabs: appStateTabsWithText | ||
} | ||
}; | ||
|
||
export const appStateWithTabsWithBlogsCount = { | ||
app: { | ||
appFilters: {}, | ||
appId: '' | ||
}, | ||
home: { | ||
ariaLabel: 'HOME_TAB', | ||
count: -1, | ||
headerText: '', | ||
key: 'home', | ||
path: '/' | ||
ui: { | ||
ready: false, | ||
tabs: appStateTabsWithBlogsCount | ||
} | ||
}; | ||
|
||
export const appStateWithTabsWithTutorialsCount = { | ||
app: { | ||
appFilters: {}, | ||
appId: '' | ||
}, | ||
tutorials: { | ||
ariaLabel: 'TUTORIALS_TAB', | ||
count: -1, | ||
headerText: '', | ||
key: 'tutorials', | ||
path: '/tutorials' | ||
ui: { | ||
ready: false, | ||
tabs: appStateTabsWithTutorialsCount | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters