MINOR: added beta tag for png and pdf export (#20761)

* added beta tag for png and pdf export

* fix playwright changes

* fix the playwright test
This commit is contained in:
Ashish Gupta 2025-04-11 14:49:30 +05:30 committed by GitHub
parent e9545324c1
commit 503ffc1986
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 27 additions and 6 deletions

View File

@ -660,7 +660,7 @@ export const verifyExportLineagePNG = async (
}
await expect(
page.getByTestId('export-type-select').getByTitle('PNG')
page.getByTestId('export-type-select').getByText('PNGBeta')
).toBeVisible();
const [download] = await Promise.all([

View File

@ -10,7 +10,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { Form, Input, Modal, Select } from 'antd';
import { Badge, Form, Input, Modal, Select } from 'antd';
import { AxiosError } from 'axios';
import classNames from 'classnames';
import { isString, lowerCase } from 'lodash';
@ -24,7 +24,10 @@ import React, {
} from 'react';
import { useTranslation } from 'react-i18next';
import { useLocation } from 'react-router-dom';
import { ExportTypes } from '../../../constants/Export.constants';
import {
BETA_EXPORT_TYPES,
ExportTypes,
} from '../../../constants/Export.constants';
import { getCurrentISODate } from '../../../utils/date-time/DateTimeUtils';
import { isBulkEditRoute } from '../../../utils/EntityBulkEdit/EntityBulkEditUtils';
import exportUtilClassBase from '../../../utils/ExportUtilClassBase';
@ -274,9 +277,25 @@ export const EntityExportModalProvider = ({
<Form.Item label={`${t('label.export-type')}:`} name="exportType">
<Select
data-testid="export-type-select"
disabled={exportData.exportTypes.length === 1}
options={exportTypesOptions}
/>
disabled={exportData.exportTypes.length === 1}>
{exportTypesOptions.map((type) => (
<Select.Option
key={type.value}
title={type.value}
value={type.value}>
<div className="d-flex items-center">
{type.label}
{BETA_EXPORT_TYPES.includes(type.value) && (
<Badge
className="m-l-xs service-beta-tag"
count={t('label.beta')}
size="small"
/>
)}
</div>
</Select.Option>
))}
</Select>
</Form.Item>
<Form.Item

View File

@ -16,5 +16,7 @@ export enum ExportTypes {
PDF = 'PDF',
}
export const BETA_EXPORT_TYPES = [ExportTypes.PNG, ExportTypes.PDF];
export const LINEAGE_EXPORT_SELECTOR =
'#lineage-container .react-flow__viewport';