Skip to content

Commit c74a396

Browse files
Add test for infomessage in LocationDetailsCRR tests
1 parent 5f0e631 commit c74a396

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

src/react/locations/LocationDetails/__tests__/LocationDetailsCRR.test.tsx

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -476,6 +476,19 @@ describe('LocationDetailsCRR', () => {
476476
);
477477
// This is implementation-specific and might need adjustment based on actual DOM structure
478478
});
479+
it('should show endpoint info message for HTTPS endpoint after endpoint Field', async () => {
480+
const component = mountCRRComponent();
481+
const { endpointInput } = getFormInputs(component);
482+
await userEvent.type(endpointInput, 'https://s3.example.com');
483+
expect(component.container.textContent).toContain(
484+
"When using an HTTPS endpoint, you must add the endpoint's SSL/TLS certificate to the truststore for secure communication. You can check the certificates already present by opening the truststore, and import the endpoint's certificate if it is missing.",
485+
);
486+
await userEvent.clear(endpointInput);
487+
await userEvent.type(endpointInput, 'http://s3.example.com');
488+
expect(component.container.textContent).not.toContain(
489+
"When using an HTTPS endpoint, you must add the endpoint's SSL/TLS certificate to the truststore for secure communication. You can check the certificates already present by opening the truststore, and import the endpoint's certificate if it is missing.",
490+
);
491+
});
479492
});
480493

481494
describe('Placeholder Text', () => {

0 commit comments

Comments
 (0)