mirror of
https://github.com/datahub-project/datahub.git
synced 2025-08-23 08:38:02 +00:00
fix(test): increase siblings.js test stability (#8542)
This commit is contained in:
parent
e380f7d317
commit
4f9fc671dc
@ -132,6 +132,10 @@ export default function LineageEntityNode({
|
|||||||
areColumnsCollapsed,
|
areColumnsCollapsed,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
const entityName =
|
||||||
|
capitalizeFirstLetterOnly(node.data.subtype) ||
|
||||||
|
(node.data.type && entityRegistry.getEntityName(node.data.type));
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<PointerGroup data-testid={`node-${node.data.urn}-${direction}`} top={node.x} left={node.y}>
|
<PointerGroup data-testid={`node-${node.data.urn}-${direction}`} top={node.x} left={node.y}>
|
||||||
{unexploredHiddenChildren && (isHovered || isSelected) ? (
|
{unexploredHiddenChildren && (isHovered || isSelected) ? (
|
||||||
@ -335,9 +339,8 @@ export default function LineageEntityNode({
|
|||||||
{' '}
|
{' '}
|
||||||
|{' '}
|
|{' '}
|
||||||
</tspan>
|
</tspan>
|
||||||
<tspan dx=".25em" dy="-2px">
|
<tspan dx=".25em" dy="-2px" data-testid={entityName}>
|
||||||
{capitalizeFirstLetterOnly(node.data.subtype) ||
|
{entityName}
|
||||||
(node.data.type && entityRegistry.getEntityName(node.data.type))}
|
|
||||||
</tspan>
|
</tspan>
|
||||||
</UnselectableText>
|
</UnselectableText>
|
||||||
{expandTitles ? (
|
{expandTitles ? (
|
||||||
|
@ -113,9 +113,11 @@ describe('siblings', () => {
|
|||||||
cy.clickOptionWithTestId('compress-lineage-toggle');
|
cy.clickOptionWithTestId('compress-lineage-toggle');
|
||||||
|
|
||||||
// check the subtypes
|
// check the subtypes
|
||||||
cy.get('text:contains(View)').should('have.length', 2);
|
cy.get('[data-testid="Seed"]').should('have.length', 1);
|
||||||
cy.get('text:contains(Table)').should('have.length', 0);
|
// center counts twice since we secretely render two center nodes, plus the downstream bigquery
|
||||||
cy.get('text:contains(Seed)').should('have.length', 1);
|
cy.get('[data-testid="View"]').should('have.length', 3);
|
||||||
|
cy.get('[data-testid="Table"]').should('have.length', 0);
|
||||||
|
|
||||||
|
|
||||||
// check the names
|
// check the names
|
||||||
cy.get('text:contains(raw_orders)').should('have.length', 1);
|
cy.get('text:contains(raw_orders)').should('have.length', 1);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user