1
1
mirror of https://github.com/theoludwig/theoludwig.git synced 2025-05-29 22:37:44 +02:00

fix: sign release commit and backmerge to develop

This commit is contained in:
Divlo
2021-07-27 21:01:33 +02:00
parent a2ad591d6d
commit 028815a7b6
6 changed files with 45 additions and 22 deletions

View File

@ -11,10 +11,7 @@ export const Footer: React.FC<FooterProps> = (props) => {
const { version } = props
const versionLink = useMemo(() => {
if (version !== '0.0.0-development') {
return `https://github.com/Divlo/Divlo/releases/tag/v${version}`
}
return 'https://github.com/Divlo/Divlo/tree/develop'
return `https://github.com/Divlo/Divlo/releases/tag/v${version}`
}, [version])
return (

View File

@ -3,25 +3,10 @@ import { render } from '@testing-library/react'
import { Footer } from '../Footer'
describe('<Footer />', () => {
it('should render the version link pointing to the GitHub release', async () => {
it('should render', async () => {
const version = '1.0.0'
const { getByText } = render(<Footer version={version} />)
const versionLink = getByText(version) as HTMLAnchorElement
expect(getByText('Divlo')).toBeInTheDocument()
expect(versionLink).toBeInTheDocument()
expect(versionLink.href).toEqual(
`https://github.com/Divlo/Divlo/releases/tag/v${version}`
)
})
it('should render the version link pointing to the `develop` branch', async () => {
const version = '0.0.0-development'
const { getByText } = render(<Footer version={version} />)
const versionLink = getByText(version) as HTMLAnchorElement
expect(getByText('Divlo')).toBeInTheDocument()
expect(versionLink).toBeInTheDocument()
expect(versionLink.href).toEqual(
'https://github.com/Divlo/Divlo/tree/develop'
)
expect(getByText(version)).toBeInTheDocument()
})
})