chore: remove verifications for toast messages

This commit is contained in:
Anastasiya Semenkevich 2024-02-28 16:29:49 +03:00 committed by Anastasiya
parent 99716937f4
commit 872ddf45dd
1 changed files with 18 additions and 15 deletions

View File

@ -33,7 +33,7 @@ pytestmark = marks
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.mark.xfail(reason='https://github.com/status-im/status-desktop/issues/13621')
# TODO: (reason='https://github.com/status-im/status-desktop/issues/13621')
def test_add_edit_and_remove_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):
@ -55,12 +55,13 @@ def test_add_edit_and_remove_permissions(main_screen: MainWindow, params, checkb
permissions_settings.set_in(in_channel)
permissions_settings.create_permission()
with step('Check toast message for permission creation'):
assert len(ToastMessage().get_toast_messages) == 1, \
f"Multiple toast messages appeared"
message = ToastMessage().get_toast_messages[0]
assert message == ToastMessages.CREATE_PERMISSION_TOAST.value, \
f"Toast message is incorrect, current message is {message}"
# TODO: https://github.com/status-im/desktop-qa-automation/issues/547
# with step('Check toast message for permission creation'):
# assert len(ToastMessage().get_toast_messages) == 1, \
# f"Multiple toast messages appeared"
# message = ToastMessage().get_toast_messages[0]
# assert message == ToastMessages.CREATE_PERMISSION_TOAST.value, \
# f"Toast message is incorrect, current message is {message}"
with step('Created permission is displayed on permission page'):
if asset_title is not False:
@ -108,10 +109,11 @@ def test_add_edit_and_remove_permissions(main_screen: MainWindow, params, checkb
assert driver.waitFor(lambda: permissions_intro_view.is_hide_icon_visible,
configs.timeouts.UI_LOAD_TIMEOUT_MSEC)
with step('Check toast message for edited permission'):
messages = ToastMessage().get_toast_messages
assert ToastMessages.UPDATE_PERMISSION_TOAST.value in messages, \
f"Toast message is incorrect, current message is {message}"
# TODO: https://github.com/status-im/desktop-qa-automation/issues/547
# with step('Check toast message for edited permission'):
# messages = ToastMessage().get_toast_messages
# assert ToastMessages.UPDATE_PERMISSION_TOAST.value in messages, \
# f"Toast message is incorrect, current message is {message}"
with step('Delete permission'):
permissions_intro_view.click_delete_permission()
@ -120,7 +122,8 @@ def test_add_edit_and_remove_permissions(main_screen: MainWindow, params, checkb
with step('Verify that permission was deleted'):
assert driver.waitFor(lambda: PermissionsIntroView().is_visible)
with step('Check toast message for deleted permission'):
messages = ToastMessage().get_toast_messages
assert ToastMessages.DELETE_PERMISSION_TOAST.value in messages, \
f"Toast message is incorrect, current message is {message}"
# TODO: https://github.com/status-im/desktop-qa-automation/issues/547
# with step('Check toast message for deleted permission'):
# messages = ToastMessage().get_toast_messages
# assert ToastMessages.DELETE_PERMISSION_TOAST.value in messages, \
# f"Toast message is incorrect, current message is {message}"