Add e2e tests for diagrams and embeddings (#1025)

This commit is contained in:
Erik Michelson 2021-02-22 22:27:59 +01:00 committed by GitHub
parent c2664b68f0
commit f9809a4edf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
9 changed files with 187 additions and 14 deletions

View file

@ -4,7 +4,7 @@
* SPDX-License-Identifier: AGPL-3.0-only
*/
import React, { Fragment, useEffect, useRef, useState } from 'react'
import React, { useEffect, useRef, useState } from 'react'
import { useTranslation } from 'react-i18next'
import { LockButton } from '../../../common/lock-button/lock-button'
import '../../utils/button-inside.scss'
@ -64,12 +64,12 @@ export const MarkmapFrame: React.FC<MarkmapFrameProps> = ({ code }) => {
}, [code])
return (
<Fragment>
<div data-cy={ 'markmap' }>
<div className={ 'text-center' } ref={ diagramContainer }/>
<div className={ 'text-right button-inside' }>
<LockButton locked={ disablePanAndZoom } onLockedChanged={ (newState => setDisablePanAndZoom(newState)) }
title={ disablePanAndZoom ? t('renderer.markmap.locked') : t('renderer.markmap.unlocked') }/>
</div>
</Fragment>
</div>
)
}