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:
Philip Molares 2020-07-16 11:22:53 +02:00 committed by GitHub
parent 1a5d4f6db8
commit f0fe7f5ac2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
26 changed files with 1332 additions and 77 deletions

View file

@ -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'
>

View file

@ -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}/>&nbsp;
</ShowIf>

View file

@ -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
}