Skip to content
This repository has been archived by the owner on Aug 9, 2022. It is now read-only.

Commit

Permalink
fix: fixes the link to the github version tag
Browse files Browse the repository at this point in the history
  • Loading branch information
jurajpiar committed Mar 4, 2021
1 parent 87fd472 commit 18179e6
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ jobs:
# command: npx tasegir dep-check -- --unused --no-dev
- run:
name: "Code linting"
command: npm run lint -- --quiet
command: npm run lint -- --quiet --fix
node-tests:
parameters:
version:
Expand Down
2 changes: 1 addition & 1 deletion src/components/organisms/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ const Footer: FC = () => {
links: [
{
title: `Version ${appVersion}`,
to: `https://github.com/rsksmart/rif-marketplace-ui/releases/tag/v${appVersion}`,
to: `https://github.com/rsksmart/rif-marketplace-ui/releases/tag/${appVersion}`,
target: '_blank',
isExternal: true,
},
Expand Down
26 changes: 26 additions & 0 deletions src/components/organisms/__tests__/Footer.test.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import React from 'react'
import { render } from '@testing-library/react'
import { appVersion } from 'config'
import Footer from '../Footer'

describe('Footer organism', () => {
describe('section Developer: links', () => {
describe('Version', () => {
const versionTitle = `Version ${appVersion}`
const versionLink = `https://github.com/rsksmart/rif-marketplace-ui/releases/tag/${appVersion}`

test(`should have title ${versionTitle}`, () => {
const { getByText } = render(<Footer />)
expect(getByText(versionTitle)).toBeTruthy()
})

test(`should link to "${versionLink}"`, () => {
const { getByText } = render(<Footer />)
const linkTag: HTMLAnchorElement = getByText(versionTitle) as HTMLAnchorElement

expect(linkTag?.href).toBeTruthy()
expect(linkTag?.href).toBe(versionLink)
})
})
})
})

0 comments on commit 18179e6

Please sign in to comment.