mirror of
				https://github.com/open-metadata/OpenMetadata.git
				synced 2025-11-03 20:19:31 +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);
 | 
			
		||||
  cy.wait(500);
 | 
			
		||||
  cy.get('[data-testid="table-link"]').first().contains(entity).click();
 | 
			
		||||
  cy.get(
 | 
			
		||||
    '[data-testid="tags-wrapper"] > [data-testid="tag-container"] > div > :nth-child(1) > [data-testid="tags"] > .tw-no-underline'
 | 
			
		||||
  )
 | 
			
		||||
  cy.get('[data-testid="tags"] > [data-testid="add-tag"]').eq(0)
 | 
			
		||||
    .should('be.visible')
 | 
			
		||||
    .scrollIntoView()
 | 
			
		||||
    .click();
 | 
			
		||||
 | 
			
		||||
@ -177,7 +177,9 @@ const DashboardDetails = ({
 | 
			
		||||
  );
 | 
			
		||||
 | 
			
		||||
  useEffect(() => {
 | 
			
		||||
    if (dashboardDetails.id) {
 | 
			
		||||
      fetchResourcePermission();
 | 
			
		||||
    }
 | 
			
		||||
  }, [dashboardDetails.id]);
 | 
			
		||||
 | 
			
		||||
  const onEntityFieldSelect = (value: string) => {
 | 
			
		||||
 | 
			
		||||
@ -285,9 +285,6 @@ const GlossaryTermsV1 = ({
 | 
			
		||||
  const handleValidation = (
 | 
			
		||||
    event: React.ChangeEvent<HTMLInputElement | HTMLSelectElement>
 | 
			
		||||
  ) => {
 | 
			
		||||
    if (permissions.EditAll) {
 | 
			
		||||
      return;
 | 
			
		||||
    }
 | 
			
		||||
    const value = event.target.value;
 | 
			
		||||
    const eleName = event.target.name;
 | 
			
		||||
 | 
			
		||||
@ -418,6 +415,7 @@ const GlossaryTermsV1 = ({
 | 
			
		||||
              removeBlur
 | 
			
		||||
              description={glossaryTerm.description || ''}
 | 
			
		||||
              entityName={glossaryTerm?.displayName ?? glossaryTerm?.name}
 | 
			
		||||
              hasEditAccess={permissions.EditDescription}
 | 
			
		||||
              isEdit={isDescriptionEditable}
 | 
			
		||||
              onCancel={onCancel}
 | 
			
		||||
              onDescriptionEdit={onDescriptionEdit}
 | 
			
		||||
 | 
			
		||||
@ -498,14 +498,13 @@ const PoliciesDetailPage = () => {
 | 
			
		||||
                              </Typography.Text>
 | 
			
		||||
                            </Space>
 | 
			
		||||
                            {rule.condition && (
 | 
			
		||||
                              <Space
 | 
			
		||||
                                data-testid="condition"
 | 
			
		||||
                                direction="vertical"
 | 
			
		||||
                                size={4}>
 | 
			
		||||
                              <Space direction="vertical" size={4}>
 | 
			
		||||
                                <Typography.Text className="tw-text-grey-muted">
 | 
			
		||||
                                  Condition:
 | 
			
		||||
                                </Typography.Text>
 | 
			
		||||
                                <code>{rule.condition}</code>
 | 
			
		||||
                                <code data-testid="condition">
 | 
			
		||||
                                  {rule.condition}
 | 
			
		||||
                                </code>
 | 
			
		||||
                              </Space>
 | 
			
		||||
                            )}
 | 
			
		||||
                          </Space>
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user