new e2e and GH report changes

Signed-off-by: Churikova Tetiana <churikova.tm@gmail.com>
This commit is contained in:
Churikova Tetiana 2020-09-02 17:57:19 +02:00
parent eac77f84c2
commit fed52fe309
No known key found for this signature in database
GPG Key ID: 0D4EA7B33B47E6D8
5 changed files with 38 additions and 7 deletions

View File

@ -25,6 +25,13 @@ class GithubHtmlReport(BaseTestReport):
passed_tests_html = str()
if failed_tests:
failed_tests_html = self.build_tests_table_html(failed_tests, run_id, failed_tests=True)
summary_html += "```\n"
ids_failed_test = []
for i, test in enumerate(failed_tests):
if test.testrail_case_id:
ids_failed_test.append(test.testrail_case_id)
summary_html += 'IDs of failed tests: %s \n' % ', '.join(map(str, ids_failed_test))
summary_html += "```\n"
if passed_tests:
passed_tests_html = self.build_tests_table_html(passed_tests, run_id, failed_tests=False)
return title_html + summary_html + failed_tests_html + passed_tests_html
@ -55,7 +62,7 @@ class GithubHtmlReport(BaseTestReport):
def build_test_row_html(self, index, test, run_id):
test_rail_link = TestrailReport().get_test_result_link(run_id, test.testrail_case_id)
if test_rail_link:
html = "<tr><td><b>%s. <a href=\"%s\">%s</a></b></td></tr>" % (index + 1, test_rail_link, test.name)
html = "<tr><td><b>%s. <a href=\"%s\">%s</a>, id: %s </b></td></tr>" % (index + 1, test_rail_link, test.name, test.testrail_case_id)
else:
html = "<tr><td><b>%d. %s</b> (TestRail link is not found)</td></tr>" % (index + 1, test.name)
html += "<tr><td>"

View File

@ -97,7 +97,7 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
@marks.testrail_id(6294)
@marks.medium
def test_keycard_request_and_receive_stt_in_1_1_chat_offline(self):
def test_keycard_request_and_receive_stt_in_1_1_chat_offline_opened_from_push(self):
sender = transaction_senders['D']
self.create_drivers(2)
device_1, device_2 = SignInView(self.drivers[0]), SignInView(self.drivers[1])
@ -112,7 +112,7 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
wallet_1.select_asset('STT')
wallet_1.home_button.click()
home_2 = device_2.recover_access(passphrase=sender['passphrase'], keycard=True)
home_2 = device_2.recover_access(passphrase=sender['passphrase'], keycard=True, enable_notifications=True)
wallet_2 = home_2.wallet_button.click()
wallet_2.set_up_wallet()
wallet_2.home_button.click()
@ -125,6 +125,7 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
profile_2 = wallet_2.profile_button.click()
profile_2.airplane_mode_button.click()
device_2.home_button.click()
device_2.click_system_home_button()
chat_element = home_1.get_chat(sender['username'])
chat_element.wait_for_visibility_of_element(30)
chat_1 = chat_element.click()
@ -144,8 +145,11 @@ class TestCommandsMultipleDevices(MultipleDeviceTestCase):
home_2.just_fyi('Check that transaction message is fetched from offline and sign transaction')
profile_2.airplane_mode_button.click()
home_2.connection_status.wait_for_invisibility_of_element(60)
home_2.get_chat(recipient_username).click()
transaction_request_pn = 'Request transaction'
device_2.open_notification_bar()
if not device_2.element_by_text(transaction_request_pn).is_element_displayed(60):
self.errors.append("Push notification is not received after going back from offline")
device_2.element_by_text(transaction_request_pn).click()
chat_2_sender_message = chat_2.chat_element_by_text('↑ Outgoing transaction')
if not chat_2_sender_message.is_element_displayed():
self.driver.fail('No outgoing transaction in 1-1 chat is shown for sender after requesting STT')

View File

@ -38,6 +38,23 @@ class TestDApps(SingleDeviceTestCase):
if not status_test_dapp.element_by_text(user['public_key']).is_element_displayed():
self.driver.fail('Public key is not returned')
@marks.testrail_id(6323)
@marks.medium
def test_resolve_ipns_name(self):
user = basic_user
ipns_url = 'uniswap.eth'
sign_in_view = SignInView(self.driver)
home_view = sign_in_view.recover_access(passphrase=user['passphrase'])
profile_view = home_view.profile_button.click()
profile_view.switch_network()
self.driver.set_clipboard_text(ipns_url)
dapp_view = home_view.dapp_tab_button.click()
dapp_view.enter_url_editbox.click()
dapp_view.paste_text()
dapp_view.confirm()
if not dapp_view.allow_button.is_element_displayed():
self.driver.fail('No permission is asked for dapp, so IPNS name is not resolved')
@marks.testrail_id(6232)
@marks.medium
def test_switching_accounts_in_dapp(self):

Binary file not shown.

Before

Width:  |  Height:  |  Size: 40 KiB

After

Width:  |  Height:  |  Size: 27 KiB

View File

@ -281,7 +281,7 @@ class SignInView(BaseView):
self.profile_button.wait_for_visibility_of_element(30)
return self.get_home_view()
def recover_access(self, passphrase: str, password: str = common_password, keycard=False):
def recover_access(self, passphrase: str, password: str = common_password, keycard=False, enable_notifications=False):
self.get_started_button.click_until_presence_of_element(self.access_key_button)
recover_access_view = self.access_key_button.click()
recover_access_view.enter_seed_phrase_button.click()
@ -298,7 +298,10 @@ class SignInView(BaseView):
recover_access_view.confirm_your_password_input.set_value(password)
recover_access_view.next_button.click_until_presence_of_element(self.maybe_later_button)
self.maybe_later_button.wait_for_element(30)
self.maybe_later_button.click_until_presence_of_element(self.lets_go_button)
if enable_notifications:
self.enable_notifications_button.click_until_presence_of_element(self.lets_go_button)
else:
self.maybe_later_button.click_until_presence_of_element(self.lets_go_button)
self.lets_go_button.click()
self.profile_button.wait_for_visibility_of_element(30)
return self.get_home_view()