Beispiel #1
0
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)
Beispiel #2
0
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)
Beispiel #3
0
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)
Beispiel #4
0
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
Beispiel #5
0
def test_leave_purchases(root_manager, screen):
    control.enter(screen)
    control.leave(screen)
    assert not screen.container.current_screen.promo_carousel.is_running
Beispiel #6
0
def test_internet_problems(billing_no_connection, screen):
    from screens.purchases.content import InternetProblemsScreen

    control.enter(screen)
    assert isinstance(screen.container.children[0], InternetProblemsScreen)
Beispiel #7
0
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
Beispiel #8
0
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')