We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c40c5ab commit d200917Copy full SHA for d200917
src/components/common/UUIDTag.cy.js
@@ -0,0 +1,24 @@
1
+import UUIDTag from './UUIDTag';
2
+
3
+describe('UUIDTag', () => {
4
+ beforeEach(() => {
5
+ cy.viewport(500, 500);
6
+ });
7
8
+ it('renders correctly with a valid UUID string', () => {
9
+ const testId = '12345678';
10
+ cy.mount(<UUIDTag uuid={testId} />);
11
+ cy.contains('1234...5678').should('exist');
12
13
14
+ it('handles non-string UUID values gracefully', () => {
15
+ const testIdNonString = 12345678;
16
+ cy.mount(<UUIDTag uuid={testIdNonString} />);
17
18
19
20
+ it('displays a fallback for undefined UUID', () => {
21
+ cy.mount(<UUIDTag uuid={undefined} />);
22
+ cy.contains('...').should('exist');
23
24
+});
0 commit comments