import pytest import allure @pytest.mark.usefixtures("app") class TestFreshestReleasePanel: @allure.title("[Discovery Params Artist] - Freshest Release - TikTok Latest Release - Panel behaviour") @allure.description("As user I want to search artists by freshest release TikTok parameters") @allure.testcase("https://data-analytics.atlassian.net/browse/DNAD-340") @pytest.mark.regression def test_freshest_release_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() # Panel behaviour self.discovery_page.dsp_tiktok_on(True) # DSP - TIKTOK - ON self.discovery_page.expand_freshest_release_block() self.discovery_page.freshest_release_tiktok.select_option('1 Week') self.discovery_page.collapse_freshest_release_block() self.discovery_page.freshest_release_block_title.has_icon('tiktok') self.discovery_page.freshest_release_block_title.contain_text('Latest Release1 Week') self.discovery_page.dsp_tiktok_on(False) # DSP - TIKTOK - OFF self.discovery_page.freshest_release_block_title.has_no_icon('tiktok') self.discovery_page.freshest_release_block_title.not_contain_text('Latest Release1 Week') self.discovery_page.dsp_tiktok_on(True) # DSP - TIKTOK - ON self.discovery_page.freshest_release_block_title.has_icon('tiktok') self.discovery_page.freshest_release_block_title.contain_text('Latest Release1 Week') self.discovery_page.expand_freshest_release_block() self.discovery_page.freshest_release_tiktok.select_option('12+ Weeks') self.discovery_page.collapse_freshest_release_block() self.discovery_page.freshest_release_block_title.has_no_icon('tiktok') self.discovery_page.freshest_release_block_title.not_contain_text('Latest Release1 Week') @allure.title("[Discovery Params Artist] - Freshest Release - YouTube Latest Release - Panel behaviour") @allure.description("As user I want to search artists by freshest release YouTube parameters") @allure.testcase("https://data-analytics.atlassian.net/browse/DNAD-731") @pytest.mark.regression def test_freshest_release_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() # Panel behaviour self.discovery_page.dsp_youtube_on(True) # DSP - YOUTUBE - ON self.discovery_page.expand_freshest_release_block() self.discovery_page.freshest_release_youtube.select_option('4 Weeks') self.discovery_page.collapse_freshest_release_block() self.discovery_page.freshest_release_block_title.has_icon('youtube') self.discovery_page.freshest_release_block_title.contain_text('Latest Release4 Weeks') self.discovery_page.dsp_youtube_on(False) # DSP - YOUTUBE - OFF self.discovery_page.freshest_release_block_title.has_no_icon('tiktok') self.discovery_page.freshest_release_block_title.not_contain_text('Latest Release4 Weeks') self.discovery_page.dsp_youtube_on(True) # DSP - YOUTUBE - ON self.discovery_page.freshest_release_block_title.has_icon('youtube') self.discovery_page.freshest_release_block_title.contain_text('Latest Release4 Weeks') self.discovery_page.expand_freshest_release_block() self.discovery_page.freshest_release_youtube.select_option('12+ Weeks') self.discovery_page.collapse_freshest_release_block() self.discovery_page.freshest_release_block_title.has_no_icon('youtube') self.discovery_page.freshest_release_block_title.not_contain_text('Latest Release4 Weeks') @allure.title("[Discovery Params Artist] - Freshest Release - Spotify Latest Release - Panel behaviour") @allure.description("As user I want to search artists by freshest release Spotify parameters") @allure.testcase("https://data-analytics.atlassian.net/browse/DNAD-732") @pytest.mark.regression def test_freshest_release_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() # Panel behaviour self.discovery_page.dsp_spotify_on(True) # DSP - SPOTIFY - ON self.discovery_page.expand_freshest_release_block() self.discovery_page.freshest_release_spotify.select_option('8 Weeks') self.discovery_page.collapse_freshest_release_block() self.discovery_page.freshest_release_block_title.has_icon('spotify') self.discovery_page.freshest_release_block_title.contain_text('Latest Release8 Weeks') self.discovery_page.dsp_spotify_on(False) # DSP - SPOTIFY - OFF self.discovery_page.freshest_release_block_title.has_no_icon('spotify') self.discovery_page.freshest_release_block_title.not_contain_text('Latest Release8 Weeks') self.discovery_page.dsp_spotify_on(True) # DSP - SPOTIFY - ON self.discovery_page.freshest_release_block_title.has_icon('spotify') self.discovery_page.freshest_release_block_title.contain_text('Latest Release8 Weeks') self.discovery_page.expand_freshest_release_block() self.discovery_page.freshest_release_spotify.select_option('12+ Weeks') self.discovery_page.collapse_freshest_release_block() self.discovery_page.freshest_release_block_title.has_no_icon('spotify') self.discovery_page.freshest_release_block_title.not_contain_text('Latest Release8 Weeks') @allure.title("[Discovery Params Artist] - Freshest Release - SoundCloud Latest Release - Panel behaviour") @allure.description("As user I want to search artists by freshest release SoundCloud parameters") @allure.testcase("https://data-analytics.atlassian.net/browse/DNAD-736") @pytest.mark.regression def test_freshest_release_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() # Panel behaviour self.discovery_page.dsp_soundcloud_on(True) # DSP - SOUNDCLOUD - ON self.discovery_page.expand_freshest_release_block() self.discovery_page.freshest_release_soundcloud.select_option('12 Weeks') self.discovery_page.collapse_freshest_release_block() self.discovery_page.freshest_release_block_title.has_icon('sndcld') self.discovery_page.freshest_release_block_title.contain_text('Latest Release12 Weeks') self.discovery_page.dsp_soundcloud_on(False) # DSP - SOUNDCLOUD - OFF self.discovery_page.freshest_release_block_title.has_no_icon('sndcld') self.discovery_page.freshest_release_block_title.not_contain_text('Latest Release12 Weeks') self.discovery_page.dsp_soundcloud_on(True) # DSP - SOUNDCLOUD - ON self.discovery_page.freshest_release_block_title.has_icon('sndcld') self.discovery_page.freshest_release_block_title.contain_text('Latest Release12 Weeks') self.discovery_page.expand_freshest_release_block() self.discovery_page.freshest_release_soundcloud.select_option('12+ Weeks') self.discovery_page.collapse_freshest_release_block() self.discovery_page.freshest_release_block_title.has_no_icon('sndcld') self.discovery_page.freshest_release_block_title.not_contain_text('Latest Release12 Weeks')