Skip to content

Commit bdacc66

Browse files
committed
chore: using matcher to ensure entity object is passed to tracking event []
1 parent be35aed commit bdacc66

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

cypress/component/rich-text/RichTextEditor.Tracking.spec.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -703,7 +703,10 @@ describe('Rich Text Editor - Tracking', { viewportHeight: 2000, viewportWidth: 1
703703
);
704704
cy.get('@onAction').should(
705705
'be.calledWithMatch',
706-
...insert(origin, { nodeType: BLOCKS.EMBEDDED_ENTRY }),
706+
...insert(origin, {
707+
nodeType: BLOCKS.EMBEDDED_ENTRY,
708+
entity: Cypress.sinon.match.object,
709+
}),
707710
);
708711
cy.get('@onAction').should('be.calledWithExactly', ...linkRendered());
709712

@@ -763,7 +766,10 @@ describe('Rich Text Editor - Tracking', { viewportHeight: 2000, viewportWidth: 1
763766
);
764767
cy.get('@onAction').should(
765768
'be.calledWithMatch',
766-
...insert(origin, { nodeType: BLOCKS.EMBEDDED_ASSET }),
769+
...insert(origin, {
770+
nodeType: BLOCKS.EMBEDDED_ASSET,
771+
entity: Cypress.sinon.match.object,
772+
}),
767773
);
768774
cy.get('@onAction').should('be.calledWithExactly', ...linkRendered());
769775

@@ -879,7 +885,10 @@ describe('Rich Text Editor - Tracking', { viewportHeight: 2000, viewportWidth: 1
879885
);
880886
cy.get('@onAction').should(
881887
'be.calledWithMatch',
882-
...insert(origin, { nodeType: INLINES.EMBEDDED_ENTRY }),
888+
...insert(origin, {
889+
nodeType: INLINES.EMBEDDED_ENTRY,
890+
entity: Cypress.sinon.match.object,
891+
}),
883892
);
884893
cy.get('@onAction').should('be.calledWithExactly', ...linkRendered());
885894

0 commit comments

Comments
 (0)