Skip to content

Commit

Permalink
fix(react): update minimum version for @primer/live-region-element (#…
Browse files Browse the repository at this point in the history
…4575)

* fix(react): update minimum version for @primer/live-region-element

* chore(deps): update lockfile and add changeset

* chore: change package versions to use range

* test: update test to run timers

* chore: revert order change when debugging

---------

Co-authored-by: Josh Black <joshblack@users.noreply.github.com>
  • Loading branch information
2 people authored and JelloBagel committed May 16, 2024
1 parent 7644ee0 commit b329ef5
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 87 deletions.
5 changes: 5 additions & 0 deletions .changeset/bright-bees-juggle.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@primer/react': patch
---

Update minimum version for @primer/live-region-element
2 changes: 1 addition & 1 deletion examples/app-router/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"type-check": "tsc --noEmit"
},
"dependencies": {
"@primer/react": "36.13.0",
"@primer/react": "36.x",
"next": "^14.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
4 changes: 2 additions & 2 deletions examples/nextjs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
"type-check": "tsc --noEmit"
},
"dependencies": {
"@primer/octicons-react": "^18.2.0",
"@primer/react": "36.17.0",
"@primer/octicons-react": "19.x",
"@primer/react": "36.x",
"next": "^14.1.0",
"react": "^18.2.0",
"react-dom": "^18.2.0",
Expand Down
95 changes: 12 additions & 83 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/react/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@
"@lit-labs/react": "1.2.1",
"@oddbird/popover-polyfill": "^0.3.1",
"@primer/behaviors": "^1.5.1",
"@primer/live-region-element": "^0.2.0",
"@primer/live-region-element": "^0.6.1",
"@primer/octicons-react": "^19.9.0",
"@primer/primitives": "^7.16.0",
"@styled-system/css": "^5.1.5",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,18 +2,22 @@ import {render} from '@testing-library/react'
import React from 'react'
import {SelectPanel} from '../'

jest.useFakeTimers()

describe('SelectPanel.Loading', () => {
it('should announce children as a polite message', () => {
render(<SelectPanel.Loading>test</SelectPanel.Loading>)

const liveRegion = document.querySelector('live-region')!
jest.runAllTimers()
expect(liveRegion.getMessage('polite')).toBe('test')
})

it('should announce a default message when no children are provided', () => {
render(<SelectPanel.Loading />)

const liveRegion = document.querySelector('live-region')!
jest.runAllTimers()
expect(liveRegion.getMessage('polite')).toBe('Fetching items...')
})
})

0 comments on commit b329ef5

Please sign in to comment.