diff --git a/packages/tradershub/src/components/EUDisclaimerMessage/__tests__/EUDisclaimerMessage.spec.tsx b/packages/tradershub/src/components/EUDisclaimerMessage/__tests__/EUDisclaimerMessage.spec.tsx new file mode 100644 index 000000000000..a17493d80fcf --- /dev/null +++ b/packages/tradershub/src/components/EUDisclaimerMessage/__tests__/EUDisclaimerMessage.spec.tsx @@ -0,0 +1,27 @@ +import React from 'react'; +import { render, screen } from '@testing-library/react'; +import EUDisclaimerMessage from '../EUDisclaimerMessage'; + +describe('EUDisclaimerMessage component', () => { + it('should render the EU disclaimer message correctly', () => { + render(); + + expect(screen.getByText(/EU statutory disclaimer/i)).toBeInTheDocument(); + + expect( + screen.getByText( + /: CFDs are complex instruments and come with a high risk of losing money rapidly due to leverage./i + ) + ).toBeInTheDocument(); + + expect( + screen.getByText(/70.1% of retail investor accounts lose money when trading CFDs with this provider/i) + ).toBeInTheDocument(); + + expect( + screen.getByText( + /. You should consider whether you understand how CFDs work and whether you can afford to take the high risk of losing your money./i + ) + ).toBeInTheDocument(); + }); +});