Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: tests for icons #97

Merged
merged 2 commits into from
Apr 26, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion applications/launchpad_v2/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,11 @@ module.exports = {
collectCoverage: true,
reporters: ['jest-junit'],
coverageDirectory: 'temp/reports/tests',
collectCoverageFrom: ['src/**/*.{ts,tsx}'],
collectCoverageFrom: [
'src/**/*.{ts,tsx}',
'!src/reportWebVitals.ts',
'!src/custom.d.ts',
'!src/react-app-env.d.ts',
'!src/index.tsx',
],
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ describe('KeyboardKeys', () => {
const rTile = screen.getByText('R')
expect(rTile).toBeInTheDocument()

const winTile = screen.getByTestId('svg-win-key')
const winTile = screen.getByTestId('svg-winkey')
expect(winTile).toBeInTheDocument()
})
})
8 changes: 4 additions & 4 deletions applications/launchpad_v2/src/components/Logo/Logo.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,28 +6,28 @@ describe('Logo', () => {
it('should render the signet variant', () => {
render(<Logo variant='signet' />)

const svgEl = screen.getByTestId('svg-logo-signet')
const svgEl = screen.getByTestId('svg-tarisignet')
expect(svgEl).toBeInTheDocument()
})

it('should render the logo variant', () => {
render(<Logo variant='logo' />)

const svgEl = screen.getByTestId('svg-logo-logo')
const svgEl = screen.getByTestId('svg-tarilogo')
expect(svgEl).toBeInTheDocument()
})

it('should render the full variant', () => {
render(<Logo variant='full' />)

const svgEl = screen.getByTestId('svg-logo-full')
const svgEl = screen.getByTestId('svg-tarilaunchpadlogo')
expect(svgEl).toBeInTheDocument()
})

it('should render the default variant', () => {
render(<Logo />)

const svgEl = screen.getByTestId('svg-logo-logo')
const svgEl = screen.getByTestId('svg-tarilogo')
expect(svgEl).toBeInTheDocument()
})
})
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/Add.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgAdd = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-add'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/ArrowBottom.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgArrowBottom = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-arrowbottom'
{...props}
>
<path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgArrowBottom1 = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-arrowbottom1'
{...props}
>
<path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgArrowBottom2 = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-arrowbottom2'
{...props}
>
<path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgArrowBottom3 = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-arrowbottom3'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/ArrowLeft.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgArrowLeft = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-arrowleft'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/ArrowLeft1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgArrowLeft1 = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-arrowleft1'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/ArrowRight.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgArrowRight = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-arrowright'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/ArrowRight1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgArrowRight1 = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-arrowright1'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/ArrowRight2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgArrowRight2 = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-arrowright2'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/ArrowRight3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgArrowRight3 = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-arrowright3'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/ArrowSwap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgArrowSwap = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-arrowswap'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/ArrowTop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgArrowTop = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-arrowtop'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/ArrowTop1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgArrowTop1 = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-arrowtop1'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/ArrowTop2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgArrowTop2 = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-arrowtop2'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/ArrowTop3.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgArrowTop3 = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-arrowtop3'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/Award.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgAward = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-award'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/Bag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgBag = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-bag'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/Bag2.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgBag2 = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-bag2'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/Battery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgBattery = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-battery'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/Calendar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgCalendar = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-calendar'
{...props}
>
<rect
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/CallCalling.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgCallCalling = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-callcalling'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/CallMuted.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgCallMuted = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-callmuted'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/CallSlash.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgCallSlash = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-callslash'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/Camera.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgCamera = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-camera'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/CameraSlash.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgCameraSlash = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-cameraslash'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/Card.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgCard = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-card'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/Charge.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgCharge = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-charge'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/Chart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgChart = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-chart'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/Check.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgCheck = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-check'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/CheckRound.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgCheckRound = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 17 16'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-checkround'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/Checklist.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgChecklist = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-checklist'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/Clock.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgClock = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-clock'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/Close.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgClose = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-close'
{...props}
>
<path
Expand Down
9 changes: 8 additions & 1 deletion applications/launchpad_v2/src/styles/Icons/CloseCross.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,14 @@ import * as React from 'react'
import { SVGProps } from 'react'

const SvgCloseCross = (props: SVGProps<SVGSVGElement>) => (
<svg width='6' height='6' viewBox='0 0 6 6' fill='none' {...props}>
<svg
width='6'
height='6'
viewBox='0 0 6 6'
fill='none'
data-testid='svg-closecross'
{...props}
>
<path
d='M4.76796 1.23242L1.23242 4.76796M4.76796 4.76796L1.23242 1.23242'
stroke='currentColor'
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/Cloud.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgCloud = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-cloud'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/Cloud1.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgCloud1 = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-cloud1'
{...props}
>
<path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgCloudDrizzle = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-clouddrizzle'
{...props}
>
<path
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgCloudLightning = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-cloudlightning'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/CmdKey.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgCmdKey = (props: SVGProps<SVGSVGElement>) => (
height='10'
viewBox='0 0 10 10'
fill='none'
data-testid='svg-cmdkey'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/Comparison.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgComparison = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-comparison'
{...props}
>
<path
Expand Down
1 change: 1 addition & 0 deletions applications/launchpad_v2/src/styles/Icons/Copy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ const SvgCopy = (props: SVGProps<SVGSVGElement>) => (
viewBox='0 0 24 24'
fill='none'
xmlns='http://www.w3.org/2000/svg'
data-testid='svg-copy'
{...props}
>
<path
Expand Down
Loading