import pytest import allure @pytest.mark.usefixtures("app") class TestFreshestReleasePanel: @allure.title("[Search Params Tracks] - Freshest Release - YouTube - Panel behaviour") @allure.description("As user I want to search tracks by Freshest Release YouTube parameters") @allure.testcase("https://data-analytics.atlassian.net/browse/DNAD-457") @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.switch_scope_to_tracks() self.discovery_page.dsp_youtube_on(True) # DSP - YOUTUBE - ON # Panel behaviour self.discovery_page.expand_freshest_release_block() self.discovery_page.freshest_release_youtube.select_option('1 Week') self.discovery_page.collapse_freshest_release_block() self.discovery_page.freshest_release_block_title.has_icon('youtube') expected_text = 'Latest Release1 Week' self.discovery_page.freshest_release_block_title.contain_text(expected_text) self.discovery_page.dsp_youtube_on(False) # DSP - YOUTUBE - OFF self.discovery_page.freshest_release_block_title.has_no_icon('youtube') self.discovery_page.freshest_release_block_title.not_contain_text(expected_text) 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(expected_text) 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(expected_text) @allure.title("[Search Params Tracks] - Freshest Release - SoundCloud - Panel behaviour") @allure.description("As user I want to search tracks by Freshest Release SoundCloud parameters") @allure.testcase("https://data-analytics.atlassian.net/browse/DNAD-763") @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.switch_scope_to_tracks() self.discovery_page.dsp_soundcloud_on(True) # DSP - SOUNDCLOUD - ON # Panel behaviour self.discovery_page.expand_freshest_release_block() self.discovery_page.freshest_release_soundcloud.select_option('4 Weeks') self.discovery_page.collapse_freshest_release_block() self.discovery_page.freshest_release_block_title.has_icon('sndcld') expected_text = 'Latest Release4 Weeks' self.discovery_page.freshest_release_block_title.contain_text(expected_text) 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(expected_text) 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(expected_text) 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(expected_text)