[frontend] Potential fix for ko.catalogEntriesList test flakiness
@@ -28,19 +28,67 @@ describe('ko.catalogEntriesList.js', () => {
it('should render component', async () => {
const element = await setup.renderComponent(NAME, {
catalogEntry: {
- isField: () => true,
- isComplex: () => false,
- isDatabase: () => false,
+ compute: { id: 'foo' },
+ dataCatalog: {},
+ definition: {},
+ isTemporary: false,
+ name: 'foo',
+ namespace: { id: 'foo' },
+ path: ['foo'],
+ addNavigatorTags: () => Promise.reject(),
+ canHaveNavigatorMetadata: () => false,
+ clearCache: () => Promise.resolve(),
+ deleteNavigatorTags: () => Promise.reject(),
+ getAnalysis: () => CancellablePromise.reject(),
getChildren: () => CancellablePromise.resolve([]),
- getSample: () => CancellablePromise.reject(),
+ getComment: () => CancellablePromise.resolve(''),
+ getCommentObservable: () => undefined,
+ getConnector: () => {
+ id: 'impala';
+ },
getDialect: () => 'impala',
+ getDisplayName: () => 'foo',
+ getIndex: () => 0,
+ getNavigatorMeta: () => CancellablePromise.reject(),
+ getOptimizerMeta: () => CancellablePromise.reject(),
+ getParent: () => Promise.reject(),
+ getPartitions: () => CancellablePromise.reject(),
+ getQualifiedPath: () => '',
+ getRawType: () => 'int',
+ getResolvedComment: () => '',
+ getSample: () => CancellablePromise.reject(),
+ getSourceMeta: () => CancellablePromise.reject(),
+ getTitle: () => 'foo',
+ getTopAggs: () => CancellablePromise.reject(),
+ getTopFilters: () => CancellablePromise.reject(),
+ getTopJoins: () => CancellablePromise.reject(),
+ getType: () => 'int',
+ hasPossibleChildren: () => false,
+ hasResolvedComment: () => false,
+ isArray: () => false,
+ isColumn: () => true,
+ isComplex: () => false,
+ isDatabase: () => false,
+ isField: () => true,
+ isForeignKey: () => false,
+ isKey: () => true,
+ isMapValue: () => false,
+ isMap: () => false,
+ isModel: () => false,
+ isPartitionKey: () => false,
+ isPrimaryKey: () => false,
+ isSource: () => false,
+ isTable: () => false,
+ isTableOrView: () => false,
+ isView: () => false,
loadNavigatorMetaForChildren: () => CancellablePromise.reject(),
loadOptimizerPopularityForChildren: () => CancellablePromise.reject(),
- isTableOrView: () => false,
- isSource: () => false
+ reset: () => undefined,
+ save: () => Promise.resolve(),
+ saveLater: () => undefined,
+ setComment: () => Promise.resolve('')
}
});
-
await setup.waitForKoUpdate();
expect(element.innerHTML).toMatchSnapshot();
