def test_play_on_cluster(first_cone, second_cone, first_cone_tuned, second_cone_tuned): if not first_cone.comms_remote.is_clustered( ) and not second_cone.comms_remote.is_clustered(): ConesPage.link_cones(first_cone.get_name(), second_cone.get_name()) assert ConesPage.is_master() and ConesPage.is_slave( ), "Cones are not clustered in UI" ConesPage.choose_by_name(first_cone.get_name()) PlayListPage.play() assert first_cone.comms_remote.is_clustered( ) and second_cone.comms_remote.is_clustered(), "Cones are not clustered" assert first_cone_tuned.is_playing(), "First cone is not playing" assert second_cone_tuned.is_paused(), "Second cone is not paused" ConesPage.choose_by_name(second_cone.get_name()) PlayListPage.pause() assert not PlayListPage.is_playing(), "Paused" assert first_cone_tuned.is_paused(), "First cone is playing" PlayListPage.play() assert PlayListPage.is_playing(), "Playing" assert first_cone_tuned.is_playing(), "First cone is not playing" assert second_cone_tuned.is_paused(), "Second cone is not paused"
def test_pause(first_cone_tuned): PlayListPage.pause() assert not PlayListPage.is_playing(), "Wrong app playing status" assert first_cone_tuned.is_paused(), "Wrong cone playing status"