mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-14 15:14:56 -04:00
Add cypress id attribute only in test mode (#1566)
* Add function for test attribute Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de> * Adjust components Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de> * Fix naming of attribute Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de> * Rename method Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de> * Rename method, interface, attribute and use interface Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de> * Lint and format fix Signed-off-by: Tilman Vatteroth <git@tilmanvatteroth.de>
This commit is contained in:
parent
2abe40ef1d
commit
a398660c18
48 changed files with 229 additions and 167 deletions
|
@ -9,6 +9,7 @@ import { Alert } from 'react-bootstrap'
|
|||
import { ShowIf } from '../../../common/show-if/show-if'
|
||||
import { useFrontendBaseUrl } from '../../../../hooks/common/use-frontend-base-url'
|
||||
import { Logger } from '../../../../utils/logger'
|
||||
import { cypressId } from '../../../../utils/cypress-attribute'
|
||||
|
||||
const log = new Logger('GraphvizFrame')
|
||||
|
||||
|
@ -66,7 +67,7 @@ export const GraphvizFrame: React.FC<GraphvizFrameProps> = ({ code }) => {
|
|||
<ShowIf condition={!!error}>
|
||||
<Alert variant={'warning'}>{error}</Alert>
|
||||
</ShowIf>
|
||||
<div className={'svg-container'} data-cy={'graphviz'} ref={container} />
|
||||
<div className={'svg-container'} {...cypressId('graphviz')} ref={container} />
|
||||
</Fragment>
|
||||
)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue