import pytest import allure @pytest.mark.usefixtures("app") class TestStartNewDiscovery: @allure.title("Start New Discovery - [Create new discovery] Discovery Parameters screen view") @allure.description("As user I want to discover new artists, so that I can find new talent.") @allure.testcase("https://data-analytics.atlassian.net/browse/DNAD-138") @pytest.mark.smoke def test_discovery_parameters_default_view(self): self.app.go_to('') # Proceed to search from Home page self.home_page.is_page_loaded() self.home_page.bn_discover.click() self.discovery_page.is_page_loaded() # Proceed to search via menu self.menu_page.goto_menu_discoveries() self.saved_discoveries_page.bn_start_new_discovery.click() self.discovery_page.is_page_loaded() self.discovery_page.check_search_scope_is_artists() self.discovery_page.dsp_tiktok.is_selected(False) self.discovery_page.dsp_youtube.is_selected(False) self.discovery_page.dsp_spotify.is_selected(False) self.discovery_page.dsp_soundcloud.is_selected(False) self.discovery_page.audience_block_collapse.is_hidden(True) self.discovery_page.releases_block_collapse.is_hidden(True) self.discovery_page.performance_block_collapse.is_hidden(True) self.discovery_page.engagement_block_collapse.is_hidden(True) self.discovery_page.freshest_release_block_collapse.is_hidden(True) self.discovery_page.sparkline_block_collapse.is_hidden(True) self.discovery_page.audience_block_title.contain_text("Manage min and max number of Subscribers and Followers") self.discovery_page.releases_block_title.contain_text("Manage minimum number of Releases and Videos") self.discovery_page.performance_block_title.contain_text("Manage minimum number of Streams, Views, and Mentions") self.discovery_page.engagement_block_title.contain_text("Manage minimum and maximum number of Likes, Comments, Listeners, and Popularity") self.discovery_page.freshest_release_block_title.contain_text("Manage how recent the latest artist release must be") self.discovery_page.sparkline_block_title.contain_text("Manage the metric to be displayed in the discovery results as a Graph") self.discovery_page.switch_scope_to_tracks() self.discovery_page.audience_block_title.contain_text("Manage the minimum and maximum number of Views, Followers and Listeners") self.discovery_page.releases_block_title.contain_text("Manage minimum number of Releases and Videos") self.discovery_page.performance_block_title.contain_text("Manage the minimum number of Views, Likes, Streams, and Playlists") self.discovery_page.engagement_block_title.contain_text("Manage the minimum and maximum number of Views, Comments, Mentions, Likes, and Popularity") self.discovery_page.freshest_release_block_title.contain_text("Manage how recent the latest artist release must be") self.discovery_page.sparkline_block_title.contain_text("Manage the metric to be displayed in the discovery results as a Graph") @allure.title("Start New Discovery - DSP change states - TikTok") @allure.description("As user I want to have ability to switch on/off DSPs.") @allure.testcase("https://data-analytics.atlassian.net/browse/DNAD-803") @pytest.mark.smoke def test_discovery_dsp_change_states_tiktok(self): self.app.go_to(self.discovery_page.url) self.discovery_page.is_page_loaded() # Expand all blocks self.discovery_page.expand_audience_block() self.discovery_page.expand_releases_block() self.discovery_page.expand_performance_block() self.discovery_page.expand_freshest_release_block() self.discovery_page.expand_sparkline_block() self.discovery_page.dsp_tiktok_on(True) # DSP - TIKTOK - ON # # Check Audience self.discovery_page.audience_tiktok_followers_min.is_enabled(True) self.discovery_page.audience_youtube_subscribers_min.is_enabled(False) self.discovery_page.audience_spotify_followers_min.is_enabled(False) self.discovery_page.audience_soundcloud_followers_min.is_enabled(False) # # Check Releases self.discovery_page.releases_tiktok_min_creations.is_enabled(True) self.discovery_page.releases_tiktok_creation_duration_min.is_enabled(True) self.discovery_page.releases_youtube_min_videos.is_enabled(False) self.discovery_page.releases_spotify_min_tracks.is_enabled(False) self.discovery_page.releases_soundcloud_min_tracks.is_enabled(False) # # Check Performance self.discovery_page.performance_tiktok_mentions_min.is_enabled(True) self.discovery_page.performance_youtube_views_min.is_enabled(False) self.discovery_page.performance_soundcloud_plays_min.is_enabled(False) # # Check Engagement self.discovery_page.engagement_tiktok_likes_min.is_enabled(True) self.discovery_page.engagement_spotify_listeners_min.is_enabled(False) self.discovery_page.engagement_spotify_popularity_min.is_enabled(False) self.discovery_page.engagement_soundcloud_comments_min.is_enabled(False) self.discovery_page.engagement_soundcloud_likes_min.is_enabled(False) # # Check Freshest Release self.discovery_page.freshest_release_tiktok.is_enabled(True) self.discovery_page.freshest_release_youtube.is_enabled(False) self.discovery_page.freshest_release_spotify.is_enabled(False) self.discovery_page.freshest_release_soundcloud.is_enabled(False) # # Check Sparkline self.discovery_page.sparkline_tiktok.is_enabled(True) self.discovery_page.sparkline_youtube.is_enabled(False) self.discovery_page.sparkline_spotify.is_enabled(False) self.discovery_page.sparkline_soundcloud.is_enabled(False) self.discovery_page.dsp_tiktok_on(False) # DSP - TIKTOK - OFF # # Check Audience self.discovery_page.audience_tiktok_followers_min.is_enabled(False) self.discovery_page.audience_youtube_subscribers_min.is_enabled(False) self.discovery_page.audience_spotify_followers_min.is_enabled(False) self.discovery_page.audience_soundcloud_followers_min.is_enabled(False) # # Check Releases self.discovery_page.releases_tiktok_min_creations.is_enabled(False) self.discovery_page.releases_tiktok_creation_duration_min.is_enabled(False) self.discovery_page.releases_youtube_min_videos.is_enabled(False) self.discovery_page.releases_spotify_min_tracks.is_enabled(False) self.discovery_page.releases_soundcloud_min_tracks.is_enabled(False) # # Check Performance self.discovery_page.performance_tiktok_mentions_min.is_enabled(False) self.discovery_page.performance_youtube_views_min.is_enabled(False) self.discovery_page.performance_soundcloud_plays_min.is_enabled(False) # # Check Engagement self.discovery_page.engagement_tiktok_likes_min.is_enabled(False) self.discovery_page.engagement_spotify_listeners_min.is_enabled(False) self.discovery_page.engagement_spotify_popularity_min.is_enabled(False) self.discovery_page.engagement_soundcloud_comments_min.is_enabled(False) self.discovery_page.engagement_soundcloud_likes_min.is_enabled(False) # # Check Freshest Release self.discovery_page.freshest_release_tiktok.is_enabled(False) self.discovery_page.freshest_release_youtube.is_enabled(False) self.discovery_page.freshest_release_spotify.is_enabled(False) self.discovery_page.freshest_release_soundcloud.is_enabled(False) # # Check Sparkline self.discovery_page.sparkline_tiktok.is_enabled(False) self.discovery_page.sparkline_youtube.is_enabled(False) self.discovery_page.sparkline_spotify.is_enabled(False) self.discovery_page.sparkline_soundcloud.is_enabled(False) @allure.title("Start New Discovery - DSP change states - YouTube") @allure.description("As user I want to have ability to switch on/off DSPs.") @allure.testcase("https://data-analytics.atlassian.net/browse/DNAD-803") @pytest.mark.smoke def test_discovery_dsp_change_states_youtube(self): self.app.go_to(self.discovery_page.url) self.discovery_page.is_page_loaded() # Expand all blocks self.discovery_page.expand_audience_block() self.discovery_page.expand_releases_block() self.discovery_page.expand_performance_block() self.discovery_page.expand_freshest_release_block() self.discovery_page.expand_sparkline_block() self.discovery_page.dsp_youtube_on(True) # DSP - YOUTUBE - ON # # Check Audience self.discovery_page.audience_tiktok_followers_min.is_enabled(False) self.discovery_page.audience_youtube_subscribers_min.is_enabled(True) self.discovery_page.audience_spotify_followers_min.is_enabled(False) self.discovery_page.audience_soundcloud_followers_min.is_enabled(False) # # Check Releases self.discovery_page.releases_tiktok_min_creations.is_enabled(False) self.discovery_page.releases_tiktok_creation_duration_min.is_enabled(False) self.discovery_page.releases_youtube_min_videos.is_enabled(True) self.discovery_page.releases_spotify_min_tracks.is_enabled(False) self.discovery_page.releases_soundcloud_min_tracks.is_enabled(False) # # Check Performance self.discovery_page.performance_tiktok_mentions_min.is_enabled(False) self.discovery_page.performance_youtube_views_min.is_enabled(True) self.discovery_page.performance_soundcloud_plays_min.is_enabled(False) # # Check Engagement self.discovery_page.engagement_tiktok_likes_min.is_enabled(False) self.discovery_page.engagement_spotify_listeners_min.is_enabled(False) self.discovery_page.engagement_spotify_popularity_min.is_enabled(False) self.discovery_page.engagement_soundcloud_comments_min.is_enabled(False) self.discovery_page.engagement_soundcloud_likes_min.is_enabled(False) # # Check Freshest Release self.discovery_page.freshest_release_tiktok.is_enabled(False) self.discovery_page.freshest_release_youtube.is_enabled(True) self.discovery_page.freshest_release_spotify.is_enabled(False) self.discovery_page.freshest_release_soundcloud.is_enabled(False) # # Check Sparkline self.discovery_page.sparkline_tiktok.is_enabled(False) self.discovery_page.sparkline_youtube.is_enabled(True) self.discovery_page.sparkline_spotify.is_enabled(False) self.discovery_page.sparkline_soundcloud.is_enabled(False) self.discovery_page.dsp_youtube_on(False) # DSP - YOUTUBE - OFF # # Check Audience self.discovery_page.audience_tiktok_followers_min.is_enabled(False) self.discovery_page.audience_youtube_subscribers_min.is_enabled(False) self.discovery_page.audience_spotify_followers_min.is_enabled(False) self.discovery_page.audience_soundcloud_followers_min.is_enabled(False) # # Check Releases self.discovery_page.releases_tiktok_min_creations.is_enabled(False) self.discovery_page.releases_tiktok_creation_duration_min.is_enabled(False) self.discovery_page.releases_youtube_min_videos.is_enabled(False) self.discovery_page.releases_spotify_min_tracks.is_enabled(False) self.discovery_page.releases_soundcloud_min_tracks.is_enabled(False) # # Check Performance self.discovery_page.performance_tiktok_mentions_min.is_enabled(False) self.discovery_page.performance_youtube_views_min.is_enabled(False) self.discovery_page.performance_soundcloud_plays_min.is_enabled(False) # # Check Engagement self.discovery_page.engagement_tiktok_likes_min.is_enabled(False) self.discovery_page.engagement_spotify_listeners_min.is_enabled(False) self.discovery_page.engagement_spotify_popularity_min.is_enabled(False) self.discovery_page.engagement_soundcloud_comments_min.is_enabled(False) self.discovery_page.engagement_soundcloud_likes_min.is_enabled(False) # # Check Freshest Release self.discovery_page.freshest_release_tiktok.is_enabled(False) self.discovery_page.freshest_release_youtube.is_enabled(False) self.discovery_page.freshest_release_spotify.is_enabled(False) self.discovery_page.freshest_release_soundcloud.is_enabled(False) # # Check Sparkline self.discovery_page.sparkline_tiktok.is_enabled(False) self.discovery_page.sparkline_youtube.is_enabled(False) self.discovery_page.sparkline_spotify.is_enabled(False) self.discovery_page.sparkline_soundcloud.is_enabled(False) @allure.title("Start New Discovery - DSP change states - Spotify") @allure.description("As user I want to have ability to switch on/off DSPs.") @allure.testcase("https://data-analytics.atlassian.net/browse/DNAD-803") @pytest.mark.smoke def test_discovery_dsp_change_states_spotify(self): self.app.go_to(self.discovery_page.url) self.discovery_page.is_page_loaded() # Expand all blocks self.discovery_page.expand_audience_block() self.discovery_page.expand_releases_block() self.discovery_page.expand_performance_block() self.discovery_page.expand_freshest_release_block() self.discovery_page.expand_sparkline_block() self.discovery_page.dsp_spotify_on(True) # DSP - SPOTIFY - ON # # Check Audience self.discovery_page.audience_tiktok_followers_min.is_enabled(False) self.discovery_page.audience_youtube_subscribers_min.is_enabled(False) self.discovery_page.audience_spotify_followers_min.is_enabled(True) self.discovery_page.audience_soundcloud_followers_min.is_enabled(False) # # Check Releases self.discovery_page.releases_tiktok_min_creations.is_enabled(False) self.discovery_page.releases_tiktok_creation_duration_min.is_enabled(False) self.discovery_page.releases_youtube_min_videos.is_enabled(False) self.discovery_page.releases_spotify_min_tracks.is_enabled(True) self.discovery_page.releases_soundcloud_min_tracks.is_enabled(False) # # Check Performance self.discovery_page.performance_tiktok_mentions_min.is_enabled(False) self.discovery_page.performance_youtube_views_min.is_enabled(False) self.discovery_page.performance_soundcloud_plays_min.is_enabled(False) # # Check Engagement self.discovery_page.engagement_tiktok_likes_min.is_enabled(False) self.discovery_page.engagement_spotify_listeners_min.is_enabled(True) self.discovery_page.engagement_spotify_popularity_min.is_enabled(True) self.discovery_page.engagement_soundcloud_comments_min.is_enabled(False) self.discovery_page.engagement_soundcloud_likes_min.is_enabled(False) # # Check Freshest Release self.discovery_page.freshest_release_tiktok.is_enabled(False) self.discovery_page.freshest_release_youtube.is_enabled(False) self.discovery_page.freshest_release_spotify.is_enabled(True) self.discovery_page.freshest_release_soundcloud.is_enabled(False) # # Check Sparkline self.discovery_page.sparkline_tiktok.is_enabled(False) self.discovery_page.sparkline_youtube.is_enabled(False) self.discovery_page.sparkline_spotify.is_enabled(True) self.discovery_page.sparkline_soundcloud.is_enabled(False) self.discovery_page.dsp_spotify_on(False) # DSP - SPOTIFY - OFF # # Check Audience self.discovery_page.audience_tiktok_followers_min.is_enabled(False) self.discovery_page.audience_youtube_subscribers_min.is_enabled(False) self.discovery_page.audience_spotify_followers_min.is_enabled(False) self.discovery_page.audience_soundcloud_followers_min.is_enabled(False) # # Check Releases self.discovery_page.releases_tiktok_min_creations.is_enabled(False) self.discovery_page.releases_tiktok_creation_duration_min.is_enabled(False) self.discovery_page.releases_youtube_min_videos.is_enabled(False) self.discovery_page.releases_spotify_min_tracks.is_enabled(False) self.discovery_page.releases_soundcloud_min_tracks.is_enabled(False) # # Check Performance self.discovery_page.performance_tiktok_mentions_min.is_enabled(False) self.discovery_page.performance_youtube_views_min.is_enabled(False) self.discovery_page.performance_soundcloud_plays_min.is_enabled(False) # # Check Engagement self.discovery_page.engagement_tiktok_likes_min.is_enabled(False) self.discovery_page.engagement_spotify_listeners_min.is_enabled(False) self.discovery_page.engagement_spotify_popularity_min.is_enabled(False) self.discovery_page.engagement_soundcloud_comments_min.is_enabled(False) self.discovery_page.engagement_soundcloud_likes_min.is_enabled(False) # # Check Freshest Release self.discovery_page.freshest_release_tiktok.is_enabled(False) self.discovery_page.freshest_release_youtube.is_enabled(False) self.discovery_page.freshest_release_spotify.is_enabled(False) self.discovery_page.freshest_release_soundcloud.is_enabled(False) # # Check Sparkline self.discovery_page.sparkline_tiktok.is_enabled(False) self.discovery_page.sparkline_youtube.is_enabled(False) self.discovery_page.sparkline_spotify.is_enabled(False) self.discovery_page.sparkline_soundcloud.is_enabled(False) @allure.title("Start New Discovery - DSP change states - SoundCloud") @allure.description("As user I want to have ability to switch on/off DSPs.") @allure.testcase("https://data-analytics.atlassian.net/browse/DNAD-803") @pytest.mark.smoke def test_discovery_dsp_change_states_soundcloud(self): self.app.go_to(self.discovery_page.url) self.discovery_page.is_page_loaded() # Expand all blocks self.discovery_page.expand_audience_block() self.discovery_page.expand_releases_block() self.discovery_page.expand_performance_block() self.discovery_page.expand_freshest_release_block() self.discovery_page.expand_sparkline_block() self.discovery_page.dsp_soundcloud_on(True) # DSP - SOUNDCLOUD - ON # # Check Audience self.discovery_page.audience_tiktok_followers_min.is_enabled(False) self.discovery_page.audience_youtube_subscribers_min.is_enabled(False) self.discovery_page.audience_spotify_followers_min.is_enabled(False) self.discovery_page.audience_soundcloud_followers_min.is_enabled(True) # # Check Releases self.discovery_page.releases_tiktok_min_creations.is_enabled(False) self.discovery_page.releases_tiktok_creation_duration_min.is_enabled(False) self.discovery_page.releases_youtube_min_videos.is_enabled(False) self.discovery_page.releases_spotify_min_tracks.is_enabled(False) self.discovery_page.releases_soundcloud_min_tracks.is_enabled(True) # # Check Performance self.discovery_page.performance_tiktok_mentions_min.is_enabled(False) self.discovery_page.performance_youtube_views_min.is_enabled(False) self.discovery_page.performance_soundcloud_plays_min.is_enabled(True) # # Check Engagement self.discovery_page.engagement_tiktok_likes_min.is_enabled(False) self.discovery_page.engagement_spotify_listeners_min.is_enabled(False) self.discovery_page.engagement_spotify_popularity_min.is_enabled(False) self.discovery_page.engagement_soundcloud_comments_min.is_enabled(True) self.discovery_page.engagement_soundcloud_likes_min.is_enabled(True) # # Check Freshest Release self.discovery_page.freshest_release_tiktok.is_enabled(False) self.discovery_page.freshest_release_youtube.is_enabled(False) self.discovery_page.freshest_release_spotify.is_enabled(False) self.discovery_page.freshest_release_soundcloud.is_enabled(True) # # Check Sparkline self.discovery_page.sparkline_tiktok.is_enabled(False) self.discovery_page.sparkline_youtube.is_enabled(False) self.discovery_page.sparkline_spotify.is_enabled(False) self.discovery_page.sparkline_soundcloud.is_enabled(True) self.discovery_page.dsp_soundcloud_on(False) # DSP - SOUNDCLOUD - OFF # # Check Audience self.discovery_page.audience_tiktok_followers_min.is_enabled(False) self.discovery_page.audience_youtube_subscribers_min.is_enabled(False) self.discovery_page.audience_spotify_followers_min.is_enabled(False) self.discovery_page.audience_soundcloud_followers_min.is_enabled(False) # # Check Releases self.discovery_page.releases_tiktok_min_creations.is_enabled(False) self.discovery_page.releases_tiktok_creation_duration_min.is_enabled(False) self.discovery_page.releases_youtube_min_videos.is_enabled(False) self.discovery_page.releases_spotify_min_tracks.is_enabled(False) self.discovery_page.releases_soundcloud_min_tracks.is_enabled(False) # # Check Performance self.discovery_page.performance_tiktok_mentions_min.is_enabled(False) self.discovery_page.performance_youtube_views_min.is_enabled(False) self.discovery_page.performance_soundcloud_plays_min.is_enabled(False) # # Check Engagement self.discovery_page.engagement_tiktok_likes_min.is_enabled(False) self.discovery_page.engagement_spotify_listeners_min.is_enabled(False) self.discovery_page.engagement_spotify_popularity_min.is_enabled(False) self.discovery_page.engagement_soundcloud_comments_min.is_enabled(False) self.discovery_page.engagement_soundcloud_likes_min.is_enabled(False) # # Check Freshest Release self.discovery_page.freshest_release_tiktok.is_enabled(False) self.discovery_page.freshest_release_youtube.is_enabled(False) self.discovery_page.freshest_release_spotify.is_enabled(False) self.discovery_page.freshest_release_soundcloud.is_enabled(False) # # Check Sparkline self.discovery_page.sparkline_tiktok.is_enabled(False) self.discovery_page.sparkline_youtube.is_enabled(False) self.discovery_page.sparkline_spotify.is_enabled(False) self.discovery_page.sparkline_soundcloud.is_enabled(False)