def test_like_popup(monkeypatch, not_empty_data, root_manager, screen, running_app): monkeypatch.setattr('screens.activity.activity.ActivityScreen._to_show_rate_popup', lambda *args: False) monkeypatch.setattr('screens.activity.activity.ActivityScreen._to_show_like_popup', lambda *args: True) control.enter(screen) control.enter(screen) from screens.activity.content import LikePopup assertions.assert_modal_view_shown(running_app, LikePopup)
def test_enter_purchases(root_manager, screen): control.enter(screen) assert not root_manager.has_screen('menu') assert not root_manager.has_screen('tasks') assert not root_manager.has_screen('activity') assert screen._container is not None from library_widgets import LoadingWidget assert not any(isinstance(child, LoadingWidget) for child in screen.children)
def test_enter_activity(not_empty_data, root_manager, screen): control.enter(screen) assert not root_manager.has_screen('menu') assert not root_manager.has_screen('tasks') assert not root_manager.has_screen('purchases') assert screen._panel is not None from library_widgets import LoadingWidget assert not any(isinstance(child, LoadingWidget) for child in screen.children)
def test_purchase_detail_screen_enter(detail_screen): assert not detail_screen.promo_carousel.is_running control.enter(detail_screen) assert detail_screen.promo_carousel.is_running control.leave(detail_screen) assert not detail_screen.promo_carousel.is_running
def test_leave_purchases(root_manager, screen): control.enter(screen) control.leave(screen) assert not screen.container.current_screen.promo_carousel.is_running
def test_internet_problems(billing_no_connection, screen): from screens.purchases.content import InternetProblemsScreen control.enter(screen) assert isinstance(screen.container.children[0], InternetProblemsScreen)
def test_filter_panel_select_button(not_empty_data, root_manager, screen): filter_panel = screen.panel.filter_panel assert root_manager.get_screen('activity') is screen control.enter(screen) screen.check_tutorial() assert screen.family is None
def test_faithful_comrade_achievement(not_empty_data, google_client, screen, storage, running_app): control.enter(screen) storage['starts'] = {"count": 5} control.leave(screen) assertions.assert_achievement_unlocked(google_client, 'faithful_comrade')