Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps-dev): bump @testing-library/react-native from 9.1.0 to 11.0.0 #605

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
"@react-native-community/eslint-config": "^3.0.3",
"@testing-library/jest-native": "^4.0.5",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/react-native": "^9.1.0",
"@testing-library/react-native": "^11.0.0",
"@types/aes-js": "^3.1.1",
"@types/jest": "^27.5.0",
"@types/node": "^18.6.3",
Expand Down
4 changes: 2 additions & 2 deletions src/Main.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ describe('Main', () => {
handleLogout: jest.fn(),
})

const { getByText, getByA11yLabel } = renderWithTheme(<Main />)
const { getByText, getByLabelText } = renderWithTheme(<Main />)

getByText('Optic')
getByText('Grant your favorite automated tools an OTP when they need it!')
const login = getByA11yLabel('login')
const login = getByLabelText('login')

fireEvent.press(login)
expect(handleLoginStub).toHaveBeenCalledTimes(1)
Expand Down
4 changes: 2 additions & 2 deletions src/screens/CreateTokenScreen.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,9 +89,9 @@ describe('CreateTokenScreen', () => {
})

it('generates a token when description inputted', () => {
const { getByA11yLabel, getByText } = setup()
const { getByLabelText, getByText } = setup()

const descriptionInput = getByA11yLabel('Description')
const descriptionInput = getByLabelText('Description')
fireEvent.changeText(descriptionInput, 'A description')
fireEvent.press(getByText('Create Token'))
expect(apiGenerateTokenStub).toBeCalledTimes(1)
Expand Down
8 changes: 4 additions & 4 deletions src/screens/TokenScreen.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -90,15 +90,15 @@ describe('TokenScreen', () => {
// Using fake timer as description saving is debounced
jest.useFakeTimers()
updateSecretStub.mockReset()
const { getByA11yLabel } = setup()
const { getByLabelText } = setup()

await waitFor(() => {
expect(registerSubscriptionStub).toBeCalled()
})

const inputtedDescriptionText = 'An updated description'

const descriptionInput = getByA11yLabel('Description')
const descriptionInput = getByLabelText('Description')
fireEvent.changeText(descriptionInput, inputtedDescriptionText)
jest.runOnlyPendingTimers()

Expand All @@ -114,9 +114,9 @@ describe('TokenScreen', () => {
jest.useFakeTimers()
registerSubscriptionStub.mockReset()
updateSecretStub.mockReset()
const { getByA11yLabel } = setup()
const { getByLabelText } = setup()

const descriptionInput = getByA11yLabel('Description')
const descriptionInput = getByLabelText('Description')
fireEvent.changeText(descriptionInput, '')

jest.runOnlyPendingTimers()
Expand Down
8 changes: 4 additions & 4 deletions src/screens/TokensListScreen.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ describe('TokensListScreen', () => {
],
}))

const { queryByText, getByA11yLabel } = setup()
const { queryByText, getByLabelText } = setup()

const input = getByA11yLabel('Search')
const input = getByLabelText('Search')
fireEvent.changeText(input, 'github')
expect(queryByText('My github token')).toBeTruthy()
expect(queryByText('My NPM token')).toBeFalsy()
Expand All @@ -98,9 +98,9 @@ describe('TokensListScreen', () => {
],
}))

const { queryByText, getByA11yLabel } = setup()
const { queryByText, getByLabelText } = setup()

const input = getByA11yLabel('Search')
const input = getByLabelText('Search')
fireEvent.changeText(input, 'hkkdoeuagk')
expect(queryByText('My github token')).toBeTruthy()
expect(queryByText('My NPM token')).toBeFalsy()
Expand Down
14 changes: 7 additions & 7 deletions src/screens/TypeScreen.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,9 @@ describe('TypeScreen', () => {
add: addStub,
})

const { getByA11yLabel } = setup()
const { getByLabelText } = setup()

fireEvent.press(getByA11yLabel('Add secret'))
fireEvent.press(getByLabelText('Add secret'))

expect(addStub).toHaveBeenCalledTimes(0)
})
Expand All @@ -43,13 +43,13 @@ describe('TypeScreen', () => {
add: addStub,
})

const { getByA11yLabel } = setup()
const { getByLabelText } = setup()

fireEvent.changeText(getByA11yLabel('Issuer'), 'Issuer A')
fireEvent.changeText(getByA11yLabel('Secret'), 'mysecret')
fireEvent.changeText(getByA11yLabel('Account'), 'My Account')
fireEvent.changeText(getByLabelText('Issuer'), 'Issuer A')
fireEvent.changeText(getByLabelText('Secret'), 'mysecret')
fireEvent.changeText(getByLabelText('Account'), 'My Account')

fireEvent.press(getByA11yLabel('Add secret'))
fireEvent.press(getByLabelText('Add secret'))

expect(addStub).toHaveBeenCalledTimes(1)
expect(addStub).toHaveBeenCalledWith({
Expand Down
25 changes: 20 additions & 5 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2664,12 +2664,12 @@
"@babel/runtime" "^7.12.5"
react-error-boundary "^3.1.0"

"@testing-library/react-native@^9.1.0":
version "9.1.0"
resolved "https://registry.yarnpkg.com/@testing-library/react-native/-/react-native-9.1.0.tgz#500698b4ae5ade98211cdea0ffd97d823c61c3ac"
integrity sha512-YBCSOIMYlh8gI0VG7ExRe80hNpfhC+i7j0cvpwiopUYtbpft8bMJXO35A4zEk7BkiWXEq6bYZ7VDJR3muSLhyQ==
"@testing-library/react-native@^11.0.0":
version "11.0.0"
resolved "https://registry.yarnpkg.com/@testing-library/react-native/-/react-native-11.0.0.tgz#604cd14a42331ce01f2b3695aeb9abf73940183b"
integrity sha512-2WZF8P8YYXO5Ka1yzj3TZUg4x6noKU5RuCpx4oAhKBkxkVbrRl1pMCvRIozdTPSiru4rNBmAi074ZJjm2OED5g==
dependencies:
pretty-format "^27.0.0"
pretty-format "^28.1.3"

"@tootallnate/once@1":
version "1.1.2"
Expand Down Expand Up @@ -8776,6 +8776,16 @@ pretty-format@^27.0.0, pretty-format@^27.3.1, pretty-format@^27.5.1:
ansi-styles "^5.0.0"
react-is "^17.0.1"

pretty-format@^28.1.3:
version "28.1.3"
resolved "https://registry.yarnpkg.com/pretty-format/-/pretty-format-28.1.3.tgz#c9fba8cedf99ce50963a11b27d982a9ae90970d5"
integrity sha512-8gFb/To0OmxHR9+ZTb14Df2vNxdGCX8g1xWGUTqUw5TiZvcQf5sHKObd5UcPyLLyowNwDAMTF3XWOG1B6mxl1Q==
dependencies:
"@jest/schemas" "^28.1.3"
ansi-regex "^5.0.1"
ansi-styles "^5.0.0"
react-is "^18.0.0"

process-nextick-args@~2.0.0:
version "2.0.1"
resolved "https://registry.yarnpkg.com/process-nextick-args/-/process-nextick-args-2.0.1.tgz#7820d9b16120cc55ca9ae7792680ae7dba6d7fe2"
Expand Down Expand Up @@ -8964,6 +8974,11 @@ react-is@^16.13.0, react-is@^16.13.1, react-is@^16.7.0:
resolved "https://registry.yarnpkg.com/react-is/-/react-is-16.13.1.tgz#789729a4dc36de2999dc156dd6c1d9c18cea56a4"
integrity sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==

react-is@^18.0.0:
version "18.2.0"
resolved "https://registry.yarnpkg.com/react-is/-/react-is-18.2.0.tgz#199431eeaaa2e09f86427efbb4f1473edb47609b"
integrity sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==

react-native-codegen@^0.0.6:
version "0.0.6"
resolved "https://registry.yarnpkg.com/react-native-codegen/-/react-native-codegen-0.0.6.tgz#b3173faa879cf71bfade8d030f9c4698388f6909"
Expand Down