import pytest import allure @pytest.mark.usefixtures("app") class TestPerformancePanel: @allure.title("[Discovery Params Artist] - Performance - TikTok Mentions - Panel behaviour") @allure.description("As user I want to search artists by performance TikTok parameters") @allure.testcase("https://data-analytics.atlassian.net/browse/DNAD-301") @pytest.mark.regression def test_performance_panel_tiktok_mentions(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_performance_block() self.discovery_page.performance_tiktok_mentions_min.slide(direction='Right', times=1) self.discovery_page.performance_tiktok_mentions_min.has_value('5') self.discovery_page.collapse_performance_block() self.discovery_page.performance_block_title.has_icon('tiktok') self.discovery_page.performance_block_title.contain_text('Mentions5–100+ ') self.discovery_page.dsp_tiktok_on(False) # DSP - TIKTOK - OFF self.discovery_page.performance_block_title.has_no_icon('tiktok') self.discovery_page.performance_block_title.not_contain_text('Mentions5-100+ ') self.discovery_page.dsp_tiktok_on(True) # DSP - TIKTOK - ON self.discovery_page.performance_block_title.has_icon('tiktok') self.discovery_page.performance_block_title.contain_text('Mentions5–100+ ') self.discovery_page.expand_performance_block() self.discovery_page.performance_tiktok_mentions_min.slide(direction='Left', times=1) self.discovery_page.collapse_performance_block() self.discovery_page.performance_block_title.has_no_icon('tiktok') self.discovery_page.performance_block_title.not_contain_text('Mentions5-100+ ') @allure.title("[Discovery Params Artist] - Performance - YouTube Views - Panel behaviour") @allure.description("As user I want to search artists by performance YouTube parameters") @allure.testcase("https://data-analytics.atlassian.net/browse/DNAD-721") @pytest.mark.regression def test_performance_panel_youtube_views(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_performance_block() self.discovery_page.performance_youtube_views_min.slide(direction='Right', times=1) self.discovery_page.performance_youtube_views_min.has_value('5k') self.discovery_page.collapse_performance_block() self.discovery_page.performance_block_title.has_icon('youtube') self.discovery_page.performance_block_title.contain_text('Views5k–100M+ ') self.discovery_page.dsp_youtube_on(False) # DSP - YOUTUBE - OFF self.discovery_page.performance_block_title.has_no_icon('youtube') self.discovery_page.performance_block_title.not_contain_text('Views5k–100M+ ') self.discovery_page.dsp_youtube_on(True) # DSP - YOUTUBE - ON self.discovery_page.performance_block_title.has_icon('youtube') self.discovery_page.performance_block_title.contain_text('Views5k–100M+ ') self.discovery_page.expand_performance_block() self.discovery_page.performance_youtube_views_min.slide(direction='Left', times=1) self.discovery_page.collapse_performance_block() self.discovery_page.performance_block_title.has_no_icon('youtube') self.discovery_page.performance_block_title.not_contain_text('Views5k–100M+ ') @allure.title("[Discovery Params Artist] - Performance - SoundCloud Plays - Panel behaviour") @allure.description("As user I want to search artists by performance YouTube parameters") @allure.testcase("https://data-analytics.atlassian.net/browse/DNAD-723") @pytest.mark.regression def test_performance_panel_soundcloud_plays(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_performance_block() self.discovery_page.performance_soundcloud_plays_min.slide(direction='Right', times=2) self.discovery_page.performance_soundcloud_plays_min.has_value('10k') self.discovery_page.collapse_performance_block() self.discovery_page.performance_block_title.has_icon('sndcld') self.discovery_page.performance_block_title.contain_text('Plays10k–100M+ ') self.discovery_page.dsp_soundcloud_on(False) # DSP - SOUNDCLOUD - OFF self.discovery_page.performance_block_title.has_no_icon('sndcld') self.discovery_page.performance_block_title.not_contain_text('Plays10k–100M+ ') self.discovery_page.dsp_soundcloud_on(True) # DSP - SOUNDCLOUD - ON self.discovery_page.performance_block_title.has_icon('sndcld') self.discovery_page.performance_block_title.contain_text('Plays10k–100M+ ') self.discovery_page.expand_performance_block() self.discovery_page.performance_soundcloud_plays_min.slide(direction='Left', times=2) self.discovery_page.collapse_performance_block() self.discovery_page.performance_block_title.has_no_icon('sndcld') self.discovery_page.performance_block_title.not_contain_text('Plays10k–100M+ ')