Skip to content

Commit

Permalink
Move setAttribute before connect
Browse files Browse the repository at this point in the history
  • Loading branch information
m-akinc committed May 20, 2024
1 parent 36a01b8 commit 4a9a0b1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/nimble-components/src/anchor/tests/anchor.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ describe('Anchor', () => {
});

it('should clear tabindex attribute from the internal control when cleared from the host', async () => {
element.setAttribute('tabindex', '-1');
await connect();

element.setAttribute('tabindex', '-1');
element.removeAttribute('tabindex');
await waitForUpdatesAsync();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ describe('MenuButton', () => {

it('should clear tabindex from the toggle button when cleared from the host', async () => {
element.setAttribute('tabindex', '-1');
element.removeAttribute('tabindex');
await connect();
element.removeAttribute('tabindex');
expect(element.toggleButton!.getAttribute('tabindex')).toBeNull();
});

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,9 @@ describe('ToggleButton', () => {
});

it('should set the `tabindex` attribute to 0 on the internal button when removed from host', async () => {
element.setAttribute('tabindex', '-1');
await connect();

element.setAttribute('tabindex', '-1');
element.removeAttribute('tabindex');
await waitForUpdatesAsync();

Expand Down

0 comments on commit 4a9a0b1

Please sign in to comment.