import pytest import allure @pytest.mark.usefixtures("app") class TestSparklinePanel: @allure.title("[Discovery Params Artist] - Sparkline - TikTok - Panel behaviour") @allure.description("As user I want to search artists by Sparkline TikTok parameters") @allure.testcase("https://data-analytics.atlassian.net/browse/DNAD-341") @pytest.mark.regression def test_sparkline_panel_tiktok(self): self.app.go_to(self.discovery_page.url) self.discovery_page.is_page_loaded() self.discovery_page.check_search_scope_is_artists() self.discovery_page.dsp_tiktok_on(True) # DSP - TIKTOK - ON # Panel behaviour self.discovery_page.expand_sparkline_block() self.discovery_page.sparkline_tiktok.select_option('Likes') self.discovery_page.collapse_sparkline_block() self.discovery_page.sparkline_block_title.has_icon('tiktok') self.discovery_page.sparkline_block_title.contain_text('TikTokLikes') self.discovery_page.dsp_tiktok_on(False) # DSP - TIKTOK - OFF self.discovery_page.sparkline_block_title.has_no_icon('tiktok') self.discovery_page.sparkline_block_title.not_contain_text('TikTokLikes') self.discovery_page.dsp_tiktok_on(True) # DSP - TIKTOK - ON self.discovery_page.sparkline_block_title.has_icon('tiktok') self.discovery_page.sparkline_block_title.contain_text('TikTokLikes') self.discovery_page.expand_sparkline_block() self.discovery_page.sparkline_tiktok.select_option('Followers') self.discovery_page.collapse_sparkline_block() self.discovery_page.sparkline_block_title.has_no_icon('tiktok') self.discovery_page.sparkline_block_title.not_contain_text('TikTokLikes') @allure.title("[Discovery Params Artist] - Sparkline - YouTube - Panel behaviour") @allure.description("As user I want to search artists by Sparkline YouTube parameters") @allure.testcase("https://data-analytics.atlassian.net/browse/DNAD-733") @pytest.mark.regression def test_sparkline_panel_youtube(self): self.app.go_to(self.discovery_page.url) self.discovery_page.is_page_loaded() self.discovery_page.check_search_scope_is_artists() self.discovery_page.dsp_youtube_on(True) # DSP - YOUTUBE - ON # Panel behaviour self.discovery_page.expand_sparkline_block() self.discovery_page.sparkline_youtube.select_option('Views') self.discovery_page.collapse_sparkline_block() self.discovery_page.sparkline_block_title.has_icon('youtube') self.discovery_page.sparkline_block_title.contain_text('YouTubeViews') self.discovery_page.dsp_youtube_on(False) # DSP - YOUTUBE - OFF self.discovery_page.sparkline_block_title.has_no_icon('youtube') self.discovery_page.sparkline_block_title.not_contain_text('YouTubeViews') self.discovery_page.dsp_youtube_on(True) # DSP - YOUTUBE - ON self.discovery_page.sparkline_block_title.has_icon('youtube') self.discovery_page.sparkline_block_title.contain_text('YouTubeViews') self.discovery_page.expand_sparkline_block() self.discovery_page.sparkline_youtube.select_option('Subscribers') self.discovery_page.collapse_sparkline_block() self.discovery_page.sparkline_block_title.has_no_icon('youtube') self.discovery_page.sparkline_block_title.not_contain_text('YouTubeViews') @allure.title("[Discovery Params Artist] - Sparkline - Spotify - Panel behaviour") @allure.description("As user I want to search artists by Spotify parameters") @allure.testcase("https://data-analytics.atlassian.net/browse/DNAD-734") @pytest.mark.regression def test_sparkline_panel_spotify(self): self.app.go_to(self.discovery_page.url) self.discovery_page.is_page_loaded() self.discovery_page.check_search_scope_is_artists() self.discovery_page.dsp_spotify_on(True) # DSP - SPOTIFY - ON # Panel behaviour self.discovery_page.expand_sparkline_block() self.discovery_page.sparkline_spotify.select_option('Popularity') self.discovery_page.collapse_sparkline_block() self.discovery_page.sparkline_block_title.has_icon('spotify') self.discovery_page.sparkline_block_title.contain_text('SpotifyPopularity') self.discovery_page.dsp_spotify_on(False) # DSP - SPOTIFY - OFF self.discovery_page.sparkline_block_title.has_no_icon('spotify') self.discovery_page.sparkline_block_title.not_contain_text('SpotifyPopularity') self.discovery_page.dsp_spotify_on(True) # DSP - SPOTIFY - ON self.discovery_page.sparkline_block_title.has_icon('spotify') self.discovery_page.sparkline_block_title.contain_text('SpotifyPopularity') self.discovery_page.expand_sparkline_block() self.discovery_page.sparkline_spotify.select_option('Followers') self.discovery_page.collapse_sparkline_block() self.discovery_page.sparkline_block_title.has_no_icon('spotify') self.discovery_page.sparkline_block_title.not_contain_text('SpotifyPopularity') @allure.title("[Discovery Params Artist] - Sparkline - SoundCloud - Panel behaviour") @allure.description("As user I want to search artists by SoundCloud parameters") @allure.testcase("https://data-analytics.atlassian.net/browse/DNAD-735") @pytest.mark.regression def test_sparkline_panel_soundcloud(self): self.app.go_to(self.discovery_page.url) self.discovery_page.is_page_loaded() self.discovery_page.check_search_scope_is_artists() self.discovery_page.dsp_soundcloud_on(True) # DSP - SOUNDCLOUD - ON # Panel behaviour self.discovery_page.expand_sparkline_block() self.discovery_page.sparkline_soundcloud.select_option('Plays') self.discovery_page.collapse_sparkline_block() self.discovery_page.sparkline_block_title.has_icon('sndcld') self.discovery_page.sparkline_block_title.contain_text('SoundCloudPlays') self.discovery_page.dsp_soundcloud_on(False) # DSP - SOUNDCLOUD - OFF self.discovery_page.sparkline_block_title.has_no_icon('sndcld') self.discovery_page.sparkline_block_title.not_contain_text('SoundCloudPlays') self.discovery_page.dsp_soundcloud_on(True) # DSP - SOUNDCLOUD - ON self.discovery_page.sparkline_block_title.has_icon('sndcld') self.discovery_page.sparkline_block_title.contain_text('SoundCloudPlays') self.discovery_page.expand_sparkline_block() self.discovery_page.sparkline_soundcloud.select_option('Followers') self.discovery_page.collapse_sparkline_block() self.discovery_page.sparkline_block_title.has_no_icon('sndcld') self.discovery_page.sparkline_block_title.not_contain_text('SoundCloudPlays')