Skip to content

Commit

Permalink
fix PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
alexwizp committed Apr 22, 2020
1 parent ee7803f commit 3b34339
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ export class SearchSource {
}

/** ***
* PUBLIC APIgetInternalStartServices
* PUBLIC API
*****/

setPreferredSearchStrategyId(searchStrategyId: string) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -234,12 +234,15 @@ describe('resolveSavedObjects', () => {
});

describe('resolveIndexPatternConflicts', () => {
let dependencies: Parameters<typeof resolveIndexPatternConflicts>[4];
let dependencies: Parameters<typeof resolveIndexPatternConflicts>[3];

beforeEach(() => {
const search = dataPluginMock.createStartContract().search;

dependencies = {
indexPatterns: ({
get: (id: string) => Promise.resolve({ id }),
} as unknown) as IndexPatternsContract,
search,
};
});
Expand Down Expand Up @@ -299,9 +302,6 @@ describe('resolveSavedObjects', () => {
resolutions,
conflictedIndexPatterns,
overwriteAll,
({
get: (id: string) => Promise.resolve({ id }),
} as unknown) as IndexPatternsContract,
dependencies
);

Expand Down Expand Up @@ -365,9 +365,6 @@ describe('resolveSavedObjects', () => {
resolutions,
conflictedIndexPatterns,
overwriteAll,
({
get: (id: string) => Promise.resolve({ id }),
} as unknown) as IndexPatternsContract,
dependencies
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -162,8 +162,8 @@ export async function resolveIndexPatternConflicts(
resolutions: Array<{ oldId: string; newId: string }>,
conflictedIndexPatterns: any[],
overwriteAll: boolean,
indexPatterns: IndexPatternsContract,
dependencies: {
indexPatterns: IndexPatternsContract;
search: DataPublicPluginStart['search'];
}
) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -502,9 +502,9 @@ describe('Flyout', () => {
component.instance().resolutions,
mockConflictedIndexPatterns,
true,
defaultProps.indexPatterns,
{
search: defaultProps.search,
indexPatterns: defaultProps.indexPatterns,
}
);
expect(saveObjectsMock).toHaveBeenCalledWith(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,8 +393,8 @@ export class Flyout extends Component<FlyoutProps, FlyoutState> {
resolutions,
conflictedIndexPatterns!,
isOverwriteAllChecked,
indexPatterns,
{
indexPatterns,
search,
}
);
Expand Down

0 comments on commit 3b34339

Please sign in to comment.