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