forked from open-metadata/OpenMetadata
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
open-metadata#14363: Fixed version page breaking issue for Table and …
…Pipeline assets. (open-metadata#14474) * Fixed column displayName change resulting in error on table version page * fixed pipeline name not showing on pipeline version page * added unit tests for fixed table and pipeline version pages * Wrapped edit displayName icon with button component * added cypress tests for the fixed version page bugs for table and pipeline version pages
- Loading branch information
1 parent
297aa70
commit 0a3b03b
Showing
13 changed files
with
337 additions
and
75 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
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
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
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
52 changes: 52 additions & 0 deletions
52
openmetadata-ui/src/main/resources/ui/src/components/VersionTable/VersionTable.test.tsx
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 |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Copyright 2023 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. | ||
*/ | ||
|
||
import { render, screen } from '@testing-library/react'; | ||
import React from 'react'; | ||
import { mockVersionTableProps } from '../../mocks/VersionTable.mock'; | ||
import VersionTable from './VersionTable.component'; | ||
|
||
jest.mock( | ||
'../../components/common/ErrorWithPlaceholder/FilterTablePlaceHolder', | ||
() => jest.fn().mockImplementation(() => <div>FilterTablePlaceHolder</div>) | ||
); | ||
|
||
jest.mock('../common/SearchBarComponent/SearchBar.component', () => | ||
jest.fn().mockImplementation(() => <div>SearchBar</div>) | ||
); | ||
|
||
jest.mock('../Tag/TagsViewer/TagsViewer', () => | ||
jest.fn().mockImplementation(() => <div>TagsViewer</div>) | ||
); | ||
|
||
jest.mock('../common/RichTextEditor/RichTextEditorPreviewer', () => | ||
jest | ||
.fn() | ||
.mockImplementation(({ markdown }) => ( | ||
<div data-testid="rich-text-editor-previewer">{markdown}</div> | ||
)) | ||
); | ||
|
||
describe('VersionTable component', () => { | ||
it('VersionTable should show column display names along with name if present', () => { | ||
render(<VersionTable {...mockVersionTableProps} />); | ||
|
||
// Check Names | ||
expect(screen.getByText('address_id')).toBeInTheDocument(); | ||
expect(screen.getByText('shop_id')).toBeInTheDocument(); | ||
expect(screen.getByText('first_name')).toBeInTheDocument(); | ||
|
||
// Check Display Name | ||
expect(screen.getByText('Address Id')).toBeInTheDocument(); | ||
}); | ||
}); |
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
Oops, something went wrong.