mirror of
https://github.com/open-metadata/OpenMetadata.git
synced 2025-11-08 06:53:11 +00:00
Fix Cypress tests (#7091)
* Fix Glossary Cypress tests * Fix dashboard permission error * Fix description permission on glossary * Change addNewTagToEntity selector * Fix policy cypress test
This commit is contained in:
parent
ef41382cb1
commit
1b685fe1ca
@ -352,9 +352,7 @@ export const addNewTagToEntity = (entity, term) => {
|
|||||||
searchEntity(entity);
|
searchEntity(entity);
|
||||||
cy.wait(500);
|
cy.wait(500);
|
||||||
cy.get('[data-testid="table-link"]').first().contains(entity).click();
|
cy.get('[data-testid="table-link"]').first().contains(entity).click();
|
||||||
cy.get(
|
cy.get('[data-testid="tags"] > [data-testid="add-tag"]').eq(0)
|
||||||
'[data-testid="tags-wrapper"] > [data-testid="tag-container"] > div > :nth-child(1) > [data-testid="tags"] > .tw-no-underline'
|
|
||||||
)
|
|
||||||
.should('be.visible')
|
.should('be.visible')
|
||||||
.scrollIntoView()
|
.scrollIntoView()
|
||||||
.click();
|
.click();
|
||||||
|
|||||||
@ -177,7 +177,9 @@ const DashboardDetails = ({
|
|||||||
);
|
);
|
||||||
|
|
||||||
useEffect(() => {
|
useEffect(() => {
|
||||||
|
if (dashboardDetails.id) {
|
||||||
fetchResourcePermission();
|
fetchResourcePermission();
|
||||||
|
}
|
||||||
}, [dashboardDetails.id]);
|
}, [dashboardDetails.id]);
|
||||||
|
|
||||||
const onEntityFieldSelect = (value: string) => {
|
const onEntityFieldSelect = (value: string) => {
|
||||||
|
|||||||
@ -285,9 +285,6 @@ const GlossaryTermsV1 = ({
|
|||||||
const handleValidation = (
|
const handleValidation = (
|
||||||
event: React.ChangeEvent<HTMLInputElement | HTMLSelectElement>
|
event: React.ChangeEvent<HTMLInputElement | HTMLSelectElement>
|
||||||
) => {
|
) => {
|
||||||
if (permissions.EditAll) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
const value = event.target.value;
|
const value = event.target.value;
|
||||||
const eleName = event.target.name;
|
const eleName = event.target.name;
|
||||||
|
|
||||||
@ -418,6 +415,7 @@ const GlossaryTermsV1 = ({
|
|||||||
removeBlur
|
removeBlur
|
||||||
description={glossaryTerm.description || ''}
|
description={glossaryTerm.description || ''}
|
||||||
entityName={glossaryTerm?.displayName ?? glossaryTerm?.name}
|
entityName={glossaryTerm?.displayName ?? glossaryTerm?.name}
|
||||||
|
hasEditAccess={permissions.EditDescription}
|
||||||
isEdit={isDescriptionEditable}
|
isEdit={isDescriptionEditable}
|
||||||
onCancel={onCancel}
|
onCancel={onCancel}
|
||||||
onDescriptionEdit={onDescriptionEdit}
|
onDescriptionEdit={onDescriptionEdit}
|
||||||
|
|||||||
@ -498,14 +498,13 @@ const PoliciesDetailPage = () => {
|
|||||||
</Typography.Text>
|
</Typography.Text>
|
||||||
</Space>
|
</Space>
|
||||||
{rule.condition && (
|
{rule.condition && (
|
||||||
<Space
|
<Space direction="vertical" size={4}>
|
||||||
data-testid="condition"
|
|
||||||
direction="vertical"
|
|
||||||
size={4}>
|
|
||||||
<Typography.Text className="tw-text-grey-muted">
|
<Typography.Text className="tw-text-grey-muted">
|
||||||
Condition:
|
Condition:
|
||||||
</Typography.Text>
|
</Typography.Text>
|
||||||
<code>{rule.condition}</code>
|
<code data-testid="condition">
|
||||||
|
{rule.condition}
|
||||||
|
</code>
|
||||||
</Space>
|
</Space>
|
||||||
)}
|
)}
|
||||||
</Space>
|
</Space>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user