-
Notifications
You must be signed in to change notification settings - Fork 78
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
Test/simple tx #7984
Test/simple tx #7984
Conversation
Jenkins BuildsClick to see older builds (162)
|
be983d4
to
e661cd0
Compare
123ad2f
to
1c1d9e4
Compare
test/ui-test/testSuites/global_shared/scripts/settings_names.py
Outdated
Show resolved
Hide resolved
ee131bf
to
03f59bb
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job. I left some questions hoping to help.
@@ -174,6 +174,8 @@ def check_tenor_gif_preview_is_enabled(self): | |||
verify(tenorSwitch.enabled, "Tenor GIFs preview is enabled") | |||
|
|||
def toggle_test_networks(self): | |||
# needed cause if we do it immmediately the toggle doesn't work | |||
time.sleep(2) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@noeliaSD is this hardcoded sleep
instead of waiting for the toggle to become active a instability point that you mentioned in your presentation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, it could cause inestability in tests. We should try to avoid using sleeps
and use waitFor
instead whenever possible
click_obj_by_name(MainWalletScreen.SEND_BUTTON_FOOTER.value) | ||
|
||
squish.waitFor("float(str(wait_and_get_obj(MainWalletScreen.TOTAL_CURRENCY_BALANCE.value).text).split(' ')[0]) > 0", 60*1000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Khushboo-dev-cpp wondering how is this working.
I understand that squish will run this script for one minute or until the specific value is above 0. Is this right?
If yes, can't the same also be accomplished in Python by getting the object by the real name MainWalletScreen.TOTAL_CURRENCY_BALANCE
and accessing the text property?
The only improvement, I see, over the scripting technique is that it might provide more meaningful errors and better debugging opportunities.
194bc1a
to
e30a940
Compare
1c1f07c
to
d66eddc
Compare
@@ -350,7 +347,9 @@ def verify_saved_address_doesnt_exist(self, name: str): | |||
verify_failure(f'FAIL: saved address {name} exists') | |||
|
|||
def verify_transaction(self): | |||
print("TODO: fix notification and ensure there is one") | |||
ephemeral_notification_list = get_obj(MainWalletScreen.EPHEMERAL_NOTIFICATION_LIST.value) | |||
squish.waitFor("ephemeral_notification_list.count > 0", 60*1000) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could we use the driver instead of doing a direct call to squish here?
print("TODO: fix notification and ensure there is one") | ||
ephemeral_notification_list = get_obj(MainWalletScreen.EPHEMERAL_NOTIFICATION_LIST.value) | ||
squish.waitFor("ephemeral_notification_list.count > 0", 60*1000) | ||
verify(str(ephemeral_notification_list.itemAtIndex(0).primaryText ) == "Transaction pending...", "Tx was not sent!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What will happen with this comparison if we want to run the tests in another language? :P
Could we use instead the enabled
property??
5618a43
to
eb22c7a
Compare
eb22c7a
to
855c44b
Compare
Fixes #7983
What does the PR do
Enable test case for simple transaction
Squish wallet tests
StatusQ checklist
Screenshot of functionality (including design for comparison)