You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This is a super straightforward PR, but the bug interrupted me for a while trying to figure out why sometimes an integration test was throwing TypeError: Cannot read properties of null (reading 'call').
I identified that the original code wasn't respecting Clojure's nil punning good practices. In Clojure, it's often recommended to not use dynamic data as functions, because if they're nil, in CLJS we'll get an exception and as usual in CLJS, the stacktrace won't be very readable.
We should prefer contains? or get, which will work just fine with nil values, and only use data as a function if it's static, e.g. a map defined in a def.
Device 1: Find `Text` by `xpath`: `//*[@content-desc="pending-contact-requests-count"]/android.widget.TextView`
activity_center/test_activity_center.py:73: in test_activity_center_contact_request_decline
if self.home_1.pending_contact_request_text.text != '1':
../views/base_element.py:416: in text
text = self.find_element().text
../views/base_element.py:79: in find_element
raise NoSuchElementException(
Device 1: Text by xpath: `//*[@content-desc="pending-contact-requests-count"]/android.widget.TextView` is not found on the screen; For documentation on this error, please visit: https://www.selenium.dev/documentation/webdriver/troubleshooting/errors#no-such-element-exception
# STEP: Change device time so chat will be unmuted by timer
Device 2: Long press on ChatElement
critical/chats/test_group_chat.py:464: in test_group_chat_mute_chat
self.errors.verify_no_errors()
base_test_case.py:190: in verify_no_errors
pytest.fail('\n '.join([self.errors.pop(0) for _ in range(len(self.errors))]))
Chat is still muted after timeout
[[Chat is not unmuted after expected time: https://github.com//issues/19627]]
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
This is a super straightforward PR, but the bug interrupted me for a while trying to figure out why sometimes an integration test was throwing
TypeError: Cannot read properties of null (reading 'call')
.I identified that the original code wasn't respecting Clojure's nil punning good practices. In Clojure, it's often recommended to not use dynamic data as functions, because if they're nil, in CLJS we'll get an exception and as usual in CLJS, the stacktrace won't be very readable.
We should prefer
contains?
orget
, which will work just fine with nil values, and only use data as a function if it's static, e.g. a map defined in adef
.Areas that may be impacted
PR is safe to be merged without manual testing.
status: ready