This repository was archived by the owner on May 13, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 2 files changed +15
-1
lines changed
Expand file tree Collapse file tree 2 files changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,12 @@ import React from 'react';
22import { Header } from '..' ;
33import { render , screen } from '@testing-library/react' ;
44
5+ beforeAll ( ( ) => {
6+ const script_tag = document . createElement ( 'div' ) ;
7+ script_tag . setAttribute ( 'id' , '__docusaurus' ) ;
8+ document . body . appendChild ( script_tag ) ;
9+ } ) ;
10+
511describe ( 'Header' , ( ) => {
612 it ( 'should be able to render the header with links' , ( ) => {
713 render ( < Header /> ) ;
Original file line number Diff line number Diff line change 1- import React from 'react' ;
1+ import React , { useEffect } from 'react' ;
22import styles from './Header.module.scss' ;
33import Link from '@docusaurus/Link' ;
44export const Header = ( ) => {
5+ useEffect ( ( ) => {
6+ const s = document . createElement ( 'script' ) ;
7+ s . src =
8+ 'https://survey.survicate.com/workspaces/83b651f6b3eca1ab4551d95760fe5deb/web_surveys.js' ;
9+ s . async = true ;
10+ const e = document . getElementById ( '__docusaurus' ) ;
11+ e . parentNode . insertBefore ( s , e ) ;
12+ } , [ ] ) ;
513 return (
614 < div className = { styles . Navtop } >
715 < div className = { styles . NavtopContainer } >
You can’t perform that action at this time.
0 commit comments