mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 01:38:56 -04:00
* Do not collect code coverage on test_helpers Note: some test helpers are no longer being used but might be some day - e.g., shallowWithIntl will be used on the beta badge * Fix uncovered type line - since we're not iterating over productNames, no need for it to be an array - it can be written more clearly in string union format * Fix branch coverage on index.tsx - Since KibanaLogic is setting `|| {}` fallbacks in any case, I've opted to remove them in this file and let fallbacks be handled there - Fixed typing to make it clear plugins can be undefined (i.e., disabled/optional, etc) in props + reorganize w/ comments - KibanaValues requires an Omit to override props types * Crawler DomainsTable test coverage/improvements - Fix test failing locally due to timezones by increasing the timezone offset - Cover missing branch line by adding a domain with no `lastCrawl` - Remove unnecessary extra beforeEach with dupe re-shallow/mounts - move getTable helper to its most relevant block (it's not being used in the generic column content checks, only in the actions column suite) Co-authored-by: Kibana Machine <42973632+kibanamachine@users.noreply.github.com> # Conflicts: # x-pack/plugins/enterprise_search/public/applications/app_search/components/crawler/components/domains_table.test.tsx
This commit is contained in:
parent
fd4f0db030
commit
aa608ff32f
4 changed files with 13 additions and 8 deletions
|
@ -15,5 +15,6 @@ module.exports = {
|
|||
'<rootDir>/x-pack/plugins/enterprise_search/**/*.{ts,tsx}',
|
||||
'!<rootDir>/x-pack/plugins/enterprise_search/public/*.ts',
|
||||
'!<rootDir>/x-pack/plugins/enterprise_search/server/*.ts',
|
||||
'!<rootDir>/x-pack/plugins/enterprise_search/public/applications/test_helpers/**/*.{ts,tsx}',
|
||||
],
|
||||
};
|
||||
|
|
|
@ -45,10 +45,10 @@ export const renderApp = (
|
|||
const unmountKibanaLogic = mountKibanaLogic({
|
||||
config,
|
||||
charts: plugins.charts,
|
||||
cloud: plugins.cloud || {},
|
||||
cloud: plugins.cloud,
|
||||
history: params.history,
|
||||
navigateToUrl: core.application.navigateToUrl,
|
||||
security: plugins.security || {},
|
||||
security: plugins.security,
|
||||
setBreadcrumbs: core.chrome.setBreadcrumbs,
|
||||
setChromeIsVisible: core.chrome.setIsVisible,
|
||||
setDocTitle: core.chrome.docTitle.change,
|
||||
|
|
|
@ -20,18 +20,23 @@ import { createHref, CreateHrefOptions } from '../react_router_helpers';
|
|||
|
||||
interface KibanaLogicProps {
|
||||
config: { host?: string };
|
||||
// Kibana core
|
||||
history: History;
|
||||
cloud: Partial<CloudSetup>;
|
||||
charts: ChartsPluginStart;
|
||||
navigateToUrl: ApplicationStart['navigateToUrl'];
|
||||
security: Partial<SecurityPluginStart>;
|
||||
setBreadcrumbs(crumbs: ChromeBreadcrumb[]): void;
|
||||
setChromeIsVisible(isVisible: boolean): void;
|
||||
setDocTitle(title: string): void;
|
||||
renderHeaderActions(HeaderActions: FC): void;
|
||||
// Required plugins
|
||||
charts: ChartsPluginStart;
|
||||
// Optional plugins
|
||||
cloud?: CloudSetup;
|
||||
security?: SecurityPluginStart;
|
||||
}
|
||||
export interface KibanaValues extends KibanaLogicProps {
|
||||
export interface KibanaValues extends Omit<KibanaLogicProps, 'cloud' | 'security'> {
|
||||
navigateToUrl(path: string, options?: CreateHrefOptions): Promise<void>;
|
||||
cloud: Partial<CloudSetup>;
|
||||
security: Partial<SecurityPluginStart>;
|
||||
}
|
||||
|
||||
export const KibanaLogic = kea<MakeLogicType<KibanaValues>>({
|
||||
|
|
|
@ -38,8 +38,7 @@ export interface RoleMapping {
|
|||
};
|
||||
}
|
||||
|
||||
const productNames = [APP_SEARCH_PLUGIN.NAME, WORKPLACE_SEARCH_PLUGIN.NAME] as const;
|
||||
export type ProductName = typeof productNames[number];
|
||||
export type ProductName = typeof APP_SEARCH_PLUGIN.NAME | typeof WORKPLACE_SEARCH_PLUGIN.NAME;
|
||||
|
||||
export interface Invitation {
|
||||
email: string;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue