chore: skipped tests and added more asserts

This commit is contained in:
Valentina Novgorodtceva 2024-02-09 16:04:29 +07:00 committed by Anastasiya
parent 2c22faa780
commit b32bed058f
3 changed files with 9 additions and 4 deletions

View File

@ -32,8 +32,11 @@ class SendPopup(BasePopup):
self._send_button = Button('send_StatusFlatButton') self._send_button = Button('send_StatusFlatButton')
def _select_asset(self, asset: str): def _select_asset(self, asset: str):
item = wait_for_template(self._asset_list_item.real_name, asset, 'title') for item in driver.findAllObjects(self._asset_list_item.real_name):
driver.mouseClick(item) if str(getattr(item, 'title', '')) == asset:
driver.mouseClick(item)
else:
raise LookupError(f"Chosen asset didn't appear")
def _open_tab(self, name: str): def _open_tab(self, name: str):
assets_tab = wait_for_template(self._tab_item_template.real_name, name, 'text') assets_tab = wait_for_template(self._tab_item_template.real_name, name, 'text')
@ -44,9 +47,10 @@ class SendPopup(BasePopup):
self._open_tab('Assets') self._open_tab('Assets')
self._search_field.type_text(asset) self._search_field.type_text(asset)
self._select_asset(asset) self._select_asset(asset)
assert driver.waitFor(lambda: self._amount_text_edit.is_visible, timeout_msec=6000)
self._amount_text_edit.text = str(amount) self._amount_text_edit.text = str(amount)
self._ens_address_text_edit.type_text(address) self._ens_address_text_edit.type_text(address)
driver.waitFor(lambda: self._send_button.is_visible, timeout_msec=6000) assert driver.waitFor(lambda: self._send_button.is_visible, timeout_msec=6000)
self.click_send() self.click_send()
@allure.step('Click send button') @allure.step('Click send button')

View File

@ -29,6 +29,7 @@ pytestmark = marks
pytest.param(True, 'Ether', 'Dai Stablecoin', '10', 'viewOnly', '#general', '10 ETH', '10 DAI', 'View only'), pytest.param(True, 'Ether', 'Dai Stablecoin', '10', 'viewOnly', '#general', '10 ETH', '10 DAI', 'View only'),
pytest.param(False, False, False, False, 'becomeAdmin', False, False, False, 'Become an admin') pytest.param(False, False, False, False, 'becomeAdmin', False, False, False, 'Become an admin')
]) ])
@pytest.mark.skip(reason="https://github.com/status-im/desktop-qa-automation/issues/495")
def test_adding_permissions(main_screen: MainWindow, params, checkbox_state: bool, first_asset, second_asset, amount, def test_adding_permissions(main_screen: MainWindow, params, checkbox_state: bool, first_asset, second_asset, amount,
allowed_to: str, in_channel, asset_title, second_asset_title, allowed_to_title: str): allowed_to: str, in_channel, asset_title, second_asset_title, allowed_to_title: str):
main_screen.create_community(params) main_screen.create_community(params)

View File

@ -31,7 +31,7 @@ def keys_screen(main_window) -> KeysView:
@pytest.mark.parametrize('receiver_account_address, amount, asset', [ @pytest.mark.parametrize('receiver_account_address, amount, asset', [
pytest.param(constants.user.user_account_one.status_address, 0, 'Ether') pytest.param(constants.user.user_account_one.status_address, 0, 'Ether')
]) ])
@pytest.mark.xfail(reason="https://github.com/status-im/status-desktop/issues/12987") @pytest.mark.skip(reason="https://github.com/status-im/status-desktop/issues/12987")
def test_wallet_send_0_eth(keys_screen, main_window, user_account, receiver_account_address, amount, asset): def test_wallet_send_0_eth(keys_screen, main_window, user_account, receiver_account_address, amount, asset):
with step('Open import seed phrase view and enter seed phrase'): with step('Open import seed phrase view and enter seed phrase'):
input_view = keys_screen.open_import_seed_phrase_view().open_seed_phrase_input_view() input_view = keys_screen.open_import_seed_phrase_view().open_seed_phrase_input_view()