Skip to content

Commit

Permalink
fixed failing unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
ShaileshParmar11 committed Jan 7, 2025
1 parent 3a55f2b commit 3427913
Show file tree
Hide file tree
Showing 6 changed files with 58 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@ import AddTestSuitePipeline from './AddTestSuitePipeline';
const mockUseHistory = {
goBack: jest.fn(),
};
jest.mock('../../../../hooks/useCustomLocation/useCustomLocation', () => {
return jest.fn().mockImplementation(() => ({
search: `?testSuiteId=test-suite-id`,
}));
});
jest.mock('../../../../hooks/useFqn', () => ({
useFqn: jest.fn().mockReturnValue({ fqn: 'test-suite-fqn' }),
}));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,14 +52,12 @@ jest.mock('../../../utils/CommonUtils', () => {
getNameFromFQN: jest.fn().mockImplementation((fqn) => fqn),
};
});
jest.mock('../../../rest/searchAPI', () => {
jest.mock('../../../rest/testAPI', () => {
return {
searchQuery: jest.fn().mockResolvedValue({
hits: {
hits: [],
total: {
value: 0,
},
getListTestCaseBySearch: jest.fn().mockResolvedValue({
data: [],
paging: {
total: 0,
},
}),
};
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/*
* Copyright 2025 Collate.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Schema corresponding to a Test Suite
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/*
* Copyright 2025 Collate.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* TestSuite Pipeline Configuration.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/*
* Copyright 2025 Collate.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* Test case is a test definition to capture data quality tests against tables, columns, and
* other data assets.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
/*
* Copyright 2025 Collate.
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
/**
* TestSuite is a set of test cases grouped together to capture data quality tests against
* data entities.
Expand Down

0 comments on commit 3427913

Please sign in to comment.