Skip to content

Commit

Permalink
Added a test to check the add tab button has a role of button
Browse files Browse the repository at this point in the history
  • Loading branch information
m158261 committed Sep 11, 2023
1 parent a9bc1b7 commit 5bf5af0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions packages/widgets/tests/src/tabbar.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1615,6 +1615,12 @@ describe('@lumino/widgets', () => {
expect(bar.addButtonNode.getAttribute('tabindex')).to.equal('-1');
});


it('should have a role attribute of button', () => {
populateBar(bar);
expect(bar.addButtonNode.getAttribute('role')).to.equal('button');
});

it('should focus the second tab on right arrow keydown', () => {
populateBar(bar);
const firstTab = bar.contentNode.firstChild as HTMLElement;
Expand Down

0 comments on commit 5bf5af0

Please sign in to comment.