File tree Expand file tree Collapse file tree
packages/library/src/modules/Tags Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11import * as gitContext from 'context/GitContext'
22import { commit , gitContextBag , graphData } from 'test/stubs'
33import { Tags } from './Tags'
4- import { render , screen } from '@testing-library/react'
4+ import { render } from '@testing-library/react'
55import { CommitNodeLocation } from 'data'
6+ import { tag } from 'test/elements/Tag'
67
78describe ( 'Tags' , ( ) => {
89 it ( 'should render a tag for the row that has the selected commit' , ( ) => {
@@ -24,7 +25,7 @@ describe('Tags', () => {
2425
2526 render ( < Tags /> )
2627
27- expect ( screen . getByTestId ( 'tag-selected' ) ) . toBeInTheDocument ( )
28+ expect ( tag . atRow ( { row : 0 } ) ) . toBeInTheDocument ( )
2829 } )
2930
3031 it ( 'should render a tag for the row that has the previewed commit' , ( ) => {
@@ -46,6 +47,6 @@ describe('Tags', () => {
4647
4748 render ( < Tags /> )
4849
49- expect ( screen . getByTestId ( 'tag-previewed' ) ) . toBeInTheDocument ( )
50+ expect ( tag . atRow ( { row : 0 } ) ) . toBeInTheDocument ( )
5051 } )
5152} )
Original file line number Diff line number Diff line change @@ -83,7 +83,7 @@ export const Tags = () => {
8383 return (
8484 < BranchTag
8585 commit = { commit }
86- id = { commit . hash }
86+ id = { i . toString ( ) }
8787 key = { `tag_${ commit . hash } ` }
8888 height = { ROW_HEIGHT + rowSpacing }
8989 lineWidth = { tagLineWidth ( commit ) }
You can’t perform that action at this time.
0 commit comments