Skip to content

Commit 34c4d80

Browse files
committed
chore: fix tests and release from next channel
1 parent a7eb786 commit 34c4d80

File tree

3 files changed

+6
-5
lines changed

3 files changed

+6
-5
lines changed

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ on:
33
push:
44
branches:
55
- master
6+
- next
67
jobs:
78
release:
89
name: Release

src/index.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ class DiffViewer extends React.Component<
227227
}
228228

229229
return (
230-
<div className={this.styles.line}>
230+
<div className={this.styles.line} role={'row'}>
231231
{!this.props.hideLineNumbers && (
232232
<div
233233
onClick={
@@ -589,15 +589,15 @@ class DiffViewer extends React.Component<
589589
[this.styles.splitView]: splitView,
590590
})}
591591
>
592-
<div className={this.styles.column}>
592+
<div className={this.styles.column} role={'table'}>
593593
<div
594594
className={cn(this.styles.titleBlock, this.styles.column)}
595595
>
596596
<pre className={this.styles.contentText}>{leftTitle}</pre>
597597
</div>
598598
{nodes.leftLines}
599599
</div>
600-
{nodes.rightLines.length > 0 ? <div className={this.styles.column}>
600+
{nodes.rightLines.length > 0 ? <div className={this.styles.column} role={'table'}>
601601
<div
602602
className={cn(this.styles.titleBlock, this.styles.column)}
603603
>

test/react-diff-viewer.test.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,13 @@ describe('Testing react diff viewer', (): void => {
2727
it('It should render a table', (): void => {
2828
const node = render(<DiffViewer oldValue={oldCode} newValue={newCode} />);
2929

30-
expect(node.getAllByRole('table').length).toEqual(1);
30+
expect(node.getAllByRole('table').length).toEqual(2);
3131
});
3232

3333
it('It should render diff lines in diff view', (): void => {
3434
const node = render(<DiffViewer oldValue={oldCode} newValue={newCode} />);
3535

36-
expect(node.getAllByRole('row').length).toEqual(7);
36+
expect(node.getAllByRole('row').length).toEqual(14);
3737
});
3838

3939
it('It should render diff lines in inline view', (): void => {

0 commit comments

Comments
 (0)