@@ -26,23 +26,15 @@ describe('HeroHeader', () => {
26
26
) ;
27
27
expect ( footer_description ) . toBeInTheDocument ( ) ;
28
28
} ) ;
29
- it ( 'should render community link when community button is clicked' , async ( ) => {
30
- window . open = jest . fn ( ) ;
31
-
32
- const communityButton = screen . getByRole ( 'button' , { name : 'Join our community' } ) ;
33
- expect ( communityButton ) . toBeInTheDocument ( ) ;
34
- await userEvent . click ( communityButton ) ;
35
-
36
- expect ( window . open ) . toHaveBeenCalledWith ( 'https://deriv.vanillacommunity.com/' ) ;
37
- } ) ;
38
- it ( 'should render telegram link when telegram button is clicked' , async ( ) => {
39
- window . open = jest . fn ( ) ;
40
-
41
- const telegramButton = screen . getByRole ( 'button' , { name : 'Telegram' } ) ;
42
- expect ( telegramButton ) . toBeInTheDocument ( ) ;
43
- await userEvent . click ( telegramButton ) ;
44
-
45
- expect ( window . open ) . toHaveBeenCalledWith ( 'https://t.me/+g6FV5tFY1u9lZGE1' ) ;
29
+ it ( 'should render community link properly' , ( ) => {
30
+ const community_link = screen . getByRole ( 'link' , { name : 'Join our community' } ) ;
31
+ expect ( community_link ) . toBeInTheDocument ( ) ;
32
+ expect ( community_link ) . toHaveAttribute ( 'href' , 'https://deriv.vanillacommunity.com/' ) ;
33
+ } ) ;
34
+ it ( 'should render telegram link properly' , ( ) => {
35
+ const telegram_link = screen . getByRole ( 'link' , { name : 'Telegram' } ) ;
36
+ expect ( telegram_link ) . toBeInTheDocument ( ) ;
37
+ expect ( telegram_link ) . toHaveAttribute ( 'href' , 'https://t.me/+g6FV5tFY1u9lZGE1' ) ;
46
38
} ) ;
47
39
it ( 'should render footer body texts properly' , ( ) => {
48
40
const help_text = screen . getByText ( / ^ w e ' r e h e r e t o h e l p $ / i) ;
0 commit comments