mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-29 06:15:29 -04:00
added e2e tests (#298)
- added e2e tests for - banner - history - intro - language - link - added e2e workflow - added cypress badge to README
This commit is contained in:
parent
1a5d4f6db8
commit
f0fe7f5ac2
26 changed files with 1332 additions and 77 deletions
|
@ -3,11 +3,12 @@ import { ForkAwesomeIcon, IconName } from '../fork-awesome/fork-awesome-icon'
|
|||
import { ShowIf } from '../show-if/show-if'
|
||||
import { LinkWithTextProps } from './types'
|
||||
|
||||
export const ExternalLink: React.FC<LinkWithTextProps> = ({ href, text, icon, className = 'text-light' }) => {
|
||||
export const ExternalLink: React.FC<LinkWithTextProps> = ({ href, text, icon, id, className = 'text-light' }) => {
|
||||
return (
|
||||
<a href={href}
|
||||
target="_blank"
|
||||
rel="noopener noreferrer"
|
||||
id={id}
|
||||
className={className}
|
||||
dir='auto'
|
||||
>
|
||||
|
|
|
@ -4,10 +4,12 @@ import { ForkAwesomeIcon, IconName } from '../fork-awesome/fork-awesome-icon'
|
|||
import { ShowIf } from '../show-if/show-if'
|
||||
import { LinkWithTextProps } from './types'
|
||||
|
||||
export const InternalLink: React.FC<LinkWithTextProps> = ({ href, text, icon, className = 'text-light' }) => {
|
||||
export const InternalLink: React.FC<LinkWithTextProps> = ({ href, text, icon, id, className = 'text-light' }) => {
|
||||
return (
|
||||
<Link to={href}
|
||||
className={className}>
|
||||
className={className}
|
||||
id={id}
|
||||
>
|
||||
<ShowIf condition={!!icon}>
|
||||
<ForkAwesomeIcon icon={icon as IconName} fixedWidth={true}/>
|
||||
</ShowIf>
|
||||
|
|
|
@ -2,16 +2,17 @@ import { StringMap, TOptionsBase } from 'i18next'
|
|||
import { IconName } from '../fork-awesome/fork-awesome-icon'
|
||||
|
||||
export interface GeneralLinkProp {
|
||||
href: string;
|
||||
icon?: IconName;
|
||||
href: string
|
||||
icon?: IconName
|
||||
id?: string
|
||||
className?: string
|
||||
}
|
||||
|
||||
export interface LinkWithTextProps extends GeneralLinkProp {
|
||||
text: string;
|
||||
text: string
|
||||
}
|
||||
|
||||
export interface TranslatedLinkProps extends GeneralLinkProp{
|
||||
i18nKey: string;
|
||||
i18nKey: string
|
||||
i18nOption?: (TOptionsBase & StringMap) | string
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue