mirror of
https://github.com/status-im/status-react.git
synced 2025-02-02 06:07:33 +00:00
Removed debug command test
Signed-off-by: yevh-berdnyk <ie.berdnyk@gmail.com>
This commit is contained in:
parent
436ac1d798
commit
c80d4bd62c
@ -35,6 +35,12 @@ class TestDAppsAndBrowsing(SingleDeviceTestCase):
|
||||
browsing_view.browser_next_page_button.click()
|
||||
browsing_view.find_text_part('Избранная статья')
|
||||
browsing_view.back_to_home_button.click()
|
||||
expected_title = 'Browser'
|
||||
expected_url = 'https://ru.m.wikipedia.org'
|
||||
|
||||
assert home_view.chat_name_text.text.startswith('Википедия')
|
||||
assert home_view.chat_url_text.text.startswith('https://ru.m.wikipedia.org')
|
||||
if not home_view.chat_name_text.text.startswith(expected_title):
|
||||
self.errors.append("'%s' web page title instead of '%s'", (home_view.chat_name_text.text, expected_title))
|
||||
if not home_view.chat_url_text.text.startswith(expected_url):
|
||||
self.errors.append("'%s' web page URL instead of '%s'", (home_view.chat_url_text.text, expected_url))
|
||||
|
||||
self.verify_no_errors()
|
||||
|
@ -110,7 +110,7 @@ class TestProfileView(SingleDeviceTestCase):
|
||||
assert public_key == public_key_1
|
||||
|
||||
@pytest.mark.testrail_case_id(3411)
|
||||
def test_debug_on_of(self):
|
||||
def test_faucet_console_command(self):
|
||||
sign_in_view = SignInView(self.driver)
|
||||
sign_in_view.create_user()
|
||||
profile_view = sign_in_view.profile_button.click()
|
||||
@ -119,19 +119,17 @@ class TestProfileView(SingleDeviceTestCase):
|
||||
home_view = profile_view.home_button.click()
|
||||
chat_view = home_view.get_chat_with_user('Status Console').click()
|
||||
chat_view.commands_button.click()
|
||||
chat_view.debug_command.click()
|
||||
chat_view.debug_on_command.click()
|
||||
chat_view.faucet_command.click()
|
||||
chat_view.faucet_send_command.click()
|
||||
chat_view.send_message_button.click()
|
||||
chat_view.wait_for_message_in_one_to_one_chat('Debug server has been launched! You can now execute '
|
||||
'status-dev-cli scan to find the server from your computer '
|
||||
'on the same network.', self.errors)
|
||||
chat_view.wait_for_message_in_one_to_one_chat('Debug mode: On', self.errors)
|
||||
chat_view.commands_button.click()
|
||||
chat_view.debug_command.click()
|
||||
chat_view.debug_off_command.click()
|
||||
chat_view.send_message_button.click()
|
||||
chat_view.wait_for_message_in_one_to_one_chat('Debug mode: Off', self.errors)
|
||||
chat_view.wait_for_message_in_one_to_one_chat('Faucet request has been received', self.errors)
|
||||
self.verify_no_errors()
|
||||
chat_view.back_button.click()
|
||||
|
||||
wallet_view = profile_view.wallet_button.click()
|
||||
wallet_view.set_up_wallet()
|
||||
wallet_view.wait_balance_changed_on_wallet_screen()
|
||||
|
||||
|
||||
@pytest.mark.testrail_case_id(3421)
|
||||
def test_switch_users(self):
|
||||
|
@ -42,23 +42,17 @@ class RequestCommand(BaseButton):
|
||||
self.locator = self.Locator.accessibility_id('request-payment-button')
|
||||
|
||||
|
||||
class DebugCommand(BaseButton):
|
||||
class FaucetCommand(BaseButton):
|
||||
def __init__(self, driver):
|
||||
super(DebugCommand, self).__init__(driver)
|
||||
super(FaucetCommand, self).__init__(driver)
|
||||
self.locator = self.Locator.xpath_selector(
|
||||
"//*[contains(@text,'Starts/stops')]/preceding-sibling::*[@text='/debug']")
|
||||
"//*[contains(@text,'Get some ETH')]/preceding-sibling::*[@text='/faucet']")
|
||||
|
||||
|
||||
class DebugOnCommand(BaseButton):
|
||||
class FaucetSendCommand(BaseButton):
|
||||
def __init__(self, driver):
|
||||
super(DebugOnCommand, self).__init__(driver)
|
||||
self.locator = self.Locator.xpath_selector("//*[@text='On']")
|
||||
|
||||
|
||||
class DebugOffCommand(BaseButton):
|
||||
def __init__(self, driver):
|
||||
super(DebugOffCommand, self).__init__(driver)
|
||||
self.locator = self.Locator.xpath_selector("//*[@text='Off']")
|
||||
super(FaucetSendCommand, self).__init__(driver)
|
||||
self.locator = self.Locator.xpath_selector("//*[@text='Status Testnet Faucet']")
|
||||
|
||||
|
||||
class ChatMenuButton(BaseButton):
|
||||
@ -170,9 +164,9 @@ class ChatView(BaseView):
|
||||
self.commands_button = CommandsButton(self.driver)
|
||||
self.send_command = SendCommand(self.driver)
|
||||
self.request_command = RequestCommand(self.driver)
|
||||
self.debug_command = DebugCommand(self.driver)
|
||||
self.debug_on_command = DebugOnCommand(self.driver)
|
||||
self.debug_off_command = DebugOffCommand(self.driver)
|
||||
self.faucet_command = FaucetCommand(self.driver)
|
||||
self.faucet_send_command = FaucetSendCommand(self.driver)
|
||||
|
||||
|
||||
self.chat_options = ChatMenuButton(self.driver)
|
||||
self.members_button = MembersButton(self.driver)
|
||||
|
@ -1,4 +1,6 @@
|
||||
from tests import info
|
||||
import time
|
||||
import pytest
|
||||
from views.base_view import BaseView
|
||||
from views.base_element import BaseButton, BaseText
|
||||
|
||||
@ -156,6 +158,20 @@ class WalletView(BaseView):
|
||||
else:
|
||||
info('Current USD balance %s is ok' % usd)
|
||||
|
||||
def wait_balance_changed_on_wallet_screen(self, initial_balance=0, wait_time=300):
|
||||
counter = 0
|
||||
while True:
|
||||
if counter >= wait_time:
|
||||
pytest.fail('Balance is not changed during %s seconds!' % wait_time)
|
||||
elif self.get_eth_value() == initial_balance:
|
||||
counter += 10
|
||||
time.sleep(10)
|
||||
self.driver.swipe(500, 500, 500, 1000)
|
||||
info('Waiting %s seconds for ETH update' % counter)
|
||||
else:
|
||||
info('Transaction received, balance updated!')
|
||||
return
|
||||
|
||||
def set_up_wallet(self):
|
||||
self.set_up_button.click()
|
||||
self.done_button.click()
|
||||
|
Loading…
x
Reference in New Issue
Block a user