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

fix: find by timeout with detached screen #1576

Merged
merged 5 commits into from
Mar 28, 2024

Conversation

mdjastrzebski
Copy link
Member

Summary

Fixes error on access to detached screen object in findBy calls.

Resolves #1572

Test plan

@@ -14,6 +14,6 @@ test('findByTestId detects screen being detached', async () => {
await expect(promise).rejects.toThrowErrorMatchingInlineSnapshot(`
"Unable to find an element with testID: not-exists

Screen is no longer attached."
Screen is no longer attached. Check your test for "findBy*" or "waitFor" calls that have not been awaited."
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great idea! I wonder if it could be the right place to advice using the eslint plugin as well, maybe as a second paragraph? wdyt?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check out the updated text

@mdjastrzebski mdjastrzebski changed the title fix:" find by timeout with detached screen fix: find by timeout with detached screen Mar 27, 2024
@mdjastrzebski mdjastrzebski force-pushed the fix/find-by-timeout-with-detached-screen branch from ecb0005 to 4c20bfb Compare March 28, 2024 14:53
@mdjastrzebski mdjastrzebski merged commit b2a29b1 into main Mar 28, 2024
5 checks passed
@mdjastrzebski mdjastrzebski deleted the fix/find-by-timeout-with-detached-screen branch March 28, 2024 17:14
github-merge-queue bot referenced this pull request in valora-inc/wallet Apr 1, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
….5 (#5196)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@testing-library/react-native](https://callstack.github.io/react-native-testing-library)
([source](https://togithub.com/callstack/react-native-testing-library))
| [`^12.4.3` ->
`^12.4.5`](https://renovatebot.com/diffs/npm/@testing-library%2freact-native/12.4.3/12.4.5)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@testing-library%2freact-native/12.4.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@testing-library%2freact-native/12.4.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@testing-library%2freact-native/12.4.3/12.4.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@testing-library%2freact-native/12.4.3/12.4.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>callstack/react-native-testing-library
(@&#8203;testing-library/react-native)</summary>

###
[`v12.4.5`](https://togithub.com/callstack/react-native-testing-library/releases/tag/v12.4.5)

[Compare
Source](https://togithub.com/callstack/react-native-testing-library/compare/v12.4.4...v12.4.5)

#### RNTL 12.4.5 (2024-03-28)

##### Bugfixes

- `findBy*` timeout with detached screen by
[@&#8203;mdjastrzebski](https://togithub.com/mdjastrzebski) in
[https://github.com/callstack/react-native-testing-library/pull/1576](https://togithub.com/callstack/react-native-testing-library/pull/1576)

##### Other

- docs: update docs about eslint rule by
[@&#8203;mdjastrzebski](https://togithub.com/mdjastrzebski) in
[https://github.com/callstack/react-native-testing-library/pull/1578](https://togithub.com/callstack/react-native-testing-library/pull/1578)

**Full Changelog**:
callstack/react-native-testing-library@v12.4.4...v12.4.5

###
[`v12.4.4`](https://togithub.com/callstack/react-native-testing-library/releases/tag/v12.4.4)

[Compare
Source](https://togithub.com/callstack/react-native-testing-library/compare/v12.4.3...v12.4.4)

#### RNTL 12.4.4 (2024-03-18)

##### Bug Fixes

- **user-event**: Decouple press events from Jest dependency by
[@&#8203;JoseLion](https://togithub.com/JoseLion) in
[https://github.com/callstack/react-native-testing-library/pull/1571](https://togithub.com/callstack/react-native-testing-library/pull/1571)

#### New Contributors

- [@&#8203;retyui](https://togithub.com/retyui) made their first
contribution in
[https://github.com/callstack/react-native-testing-library/pull/1567](https://togithub.com/callstack/react-native-testing-library/pull/1567)
- [@&#8203;donysukardi](https://togithub.com/donysukardi) made their
first contribution in
[https://github.com/callstack/react-native-testing-library/pull/1569](https://togithub.com/callstack/react-native-testing-library/pull/1569)
- [@&#8203;JoseLion](https://togithub.com/JoseLion) made their first
contribution in
[https://github.com/callstack/react-native-testing-library/pull/1571](https://togithub.com/callstack/react-native-testing-library/pull/1571)

**Full Changelog**:
callstack/react-native-testing-library@v12.4.3...v12.4.4

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" in timezone
America/Los_Angeles, Automerge - "after 5pm,every weekend" in timezone
America/Los_Angeles.

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/valora-inc/wallet).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
github-merge-queue bot referenced this pull request in valora-inc/wallet Apr 1, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
….5 (#5196)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@testing-library/react-native](https://callstack.github.io/react-native-testing-library)
([source](https://togithub.com/callstack/react-native-testing-library))
| [`^12.4.3` ->
`^12.4.5`](https://renovatebot.com/diffs/npm/@testing-library%2freact-native/12.4.3/12.4.5)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@testing-library%2freact-native/12.4.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@testing-library%2freact-native/12.4.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@testing-library%2freact-native/12.4.3/12.4.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@testing-library%2freact-native/12.4.3/12.4.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>callstack/react-native-testing-library
(@&#8203;testing-library/react-native)</summary>

###
[`v12.4.5`](https://togithub.com/callstack/react-native-testing-library/releases/tag/v12.4.5)

[Compare
Source](https://togithub.com/callstack/react-native-testing-library/compare/v12.4.4...v12.4.5)

#### RNTL 12.4.5 (2024-03-28)

##### Bugfixes

- `findBy*` timeout with detached screen by
[@&#8203;mdjastrzebski](https://togithub.com/mdjastrzebski) in
[https://github.com/callstack/react-native-testing-library/pull/1576](https://togithub.com/callstack/react-native-testing-library/pull/1576)

##### Other

- docs: update docs about eslint rule by
[@&#8203;mdjastrzebski](https://togithub.com/mdjastrzebski) in
[https://github.com/callstack/react-native-testing-library/pull/1578](https://togithub.com/callstack/react-native-testing-library/pull/1578)

**Full Changelog**:
callstack/react-native-testing-library@v12.4.4...v12.4.5

###
[`v12.4.4`](https://togithub.com/callstack/react-native-testing-library/releases/tag/v12.4.4)

[Compare
Source](https://togithub.com/callstack/react-native-testing-library/compare/v12.4.3...v12.4.4)

#### RNTL 12.4.4 (2024-03-18)

##### Bug Fixes

- **user-event**: Decouple press events from Jest dependency by
[@&#8203;JoseLion](https://togithub.com/JoseLion) in
[https://github.com/callstack/react-native-testing-library/pull/1571](https://togithub.com/callstack/react-native-testing-library/pull/1571)

#### New Contributors

- [@&#8203;retyui](https://togithub.com/retyui) made their first
contribution in
[https://github.com/callstack/react-native-testing-library/pull/1567](https://togithub.com/callstack/react-native-testing-library/pull/1567)
- [@&#8203;donysukardi](https://togithub.com/donysukardi) made their
first contribution in
[https://github.com/callstack/react-native-testing-library/pull/1569](https://togithub.com/callstack/react-native-testing-library/pull/1569)
- [@&#8203;JoseLion](https://togithub.com/JoseLion) made their first
contribution in
[https://github.com/callstack/react-native-testing-library/pull/1571](https://togithub.com/callstack/react-native-testing-library/pull/1571)

**Full Changelog**:
callstack/react-native-testing-library@v12.4.3...v12.4.4

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" in timezone
America/Los_Angeles, Automerge - "after 5pm,every weekend" in timezone
America/Los_Angeles.

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/valora-inc/wallet).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
shottah referenced this pull request in zed-io/kolektivo May 15, 2024

Unverified

This commit is not signed, but one or more authors requires that any commit attributed to them is signed.
….5 (valora-inc#5196)

[![Mend
Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com)

This PR contains the following updates:

| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
|
[@testing-library/react-native](https://callstack.github.io/react-native-testing-library)
([source](https://togithub.com/callstack/react-native-testing-library))
| [`^12.4.3` ->
`^12.4.5`](https://renovatebot.com/diffs/npm/@testing-library%2freact-native/12.4.3/12.4.5)
|
[![age](https://developer.mend.io/api/mc/badges/age/npm/@testing-library%2freact-native/12.4.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/@testing-library%2freact-native/12.4.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/@testing-library%2freact-native/12.4.3/12.4.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|
[![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/@testing-library%2freact-native/12.4.3/12.4.5?slim=true)](https://docs.renovatebot.com/merge-confidence/)
|

---

### Release Notes

<details>
<summary>callstack/react-native-testing-library
(@&#8203;testing-library/react-native)</summary>

###
[`v12.4.5`](https://togithub.com/callstack/react-native-testing-library/releases/tag/v12.4.5)

[Compare
Source](https://togithub.com/callstack/react-native-testing-library/compare/v12.4.4...v12.4.5)

#### RNTL 12.4.5 (2024-03-28)

##### Bugfixes

- `findBy*` timeout with detached screen by
[@&#8203;mdjastrzebski](https://togithub.com/mdjastrzebski) in
[https://github.com/callstack/react-native-testing-library/pull/1576](https://togithub.com/callstack/react-native-testing-library/pull/1576)

##### Other

- docs: update docs about eslint rule by
[@&#8203;mdjastrzebski](https://togithub.com/mdjastrzebski) in
[https://github.com/callstack/react-native-testing-library/pull/1578](https://togithub.com/callstack/react-native-testing-library/pull/1578)

**Full Changelog**:
callstack/react-native-testing-library@v12.4.4...v12.4.5

###
[`v12.4.4`](https://togithub.com/callstack/react-native-testing-library/releases/tag/v12.4.4)

[Compare
Source](https://togithub.com/callstack/react-native-testing-library/compare/v12.4.3...v12.4.4)

#### RNTL 12.4.4 (2024-03-18)

##### Bug Fixes

- **user-event**: Decouple press events from Jest dependency by
[@&#8203;JoseLion](https://togithub.com/JoseLion) in
[https://github.com/callstack/react-native-testing-library/pull/1571](https://togithub.com/callstack/react-native-testing-library/pull/1571)

#### New Contributors

- [@&#8203;retyui](https://togithub.com/retyui) made their first
contribution in
[https://github.com/callstack/react-native-testing-library/pull/1567](https://togithub.com/callstack/react-native-testing-library/pull/1567)
- [@&#8203;donysukardi](https://togithub.com/donysukardi) made their
first contribution in
[https://github.com/callstack/react-native-testing-library/pull/1569](https://togithub.com/callstack/react-native-testing-library/pull/1569)
- [@&#8203;JoseLion](https://togithub.com/JoseLion) made their first
contribution in
[https://github.com/callstack/react-native-testing-library/pull/1571](https://togithub.com/callstack/react-native-testing-library/pull/1571)

**Full Changelog**:
callstack/react-native-testing-library@v12.4.3...v12.4.4

</details>

---

### Configuration

📅 **Schedule**: Branch creation - "before 4am on Monday" in timezone
America/Los_Angeles, Automerge - "after 5pm,every weekend" in timezone
America/Los_Angeles.

🚦 **Automerge**: Enabled.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the
rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update
again.

---

- [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check
this box

---

This PR has been generated by [Mend
Renovate](https://www.mend.io/free-developer-tools/renovate/). View
repository job log
[here](https://developer.mend.io/github/valora-inc/wallet).

<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4yNjkuMiIsInVwZGF0ZWRJblZlciI6IjM3LjI2OS4yIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9-->

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

I am having non deterministic error after migrate to v12.4.0
2 participants