def test_play_on_separately(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()) ConesPage.unlink_cones_by_unlink_group(first_cone.get_name()) ConesPage.choose_by_name(first_cone.get_name()) PlayListPage.play() ConesPage.choose_by_name(second_cone.get_name()) PlayListPage.play() assert first_cone_tuned.is_playing(), "First cone is not playing" assert second_cone_tuned.is_playing(), "Second cone is not playing" assert first_cone_tuned.get_json_status_track( ) is not second_cone_tuned.get_json_status_track( ), "Cones play the same track"
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_play(first_cone_tuned): PlayListPage.play() assert PlayListPage.is_playing(), "Wrong app playing status" assert first_cone_tuned.is_playing(), "Wrong cone playing status"