import pytest import allure @pytest.mark.usefixtures("app") class TestAudiencePanel: @allure.title("[Discovery Params Artist] - Audience - TikTok - Panel behaviour") @allure.description("As user I want to search artists by audience TikTok parameters") @allure.testcase("https://data-analytics.atlassian.net/browse/DNAD-262") @pytest.mark.regression def test_audience_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_audience_block() self.discovery_page.audience_tiktok_followers_min.slide(direction='Right', times=1) self.discovery_page.audience_tiktok_followers_min.has_value('1k') self.discovery_page.collapse_audience_block() self.discovery_page.audience_block_title.has_icon('tiktok') self.discovery_page.audience_block_title.contain_text('Followers1k–10M+') self.discovery_page.dsp_tiktok_on(False) # DSP - TIKTOK - OFF self.discovery_page.audience_block_title.has_no_icon('tiktok') self.discovery_page.audience_block_title.not_contain_text('Followers1k–10M+') self.discovery_page.dsp_tiktok_on(True) # DSP - TIKTOK - ON self.discovery_page.audience_block_title.has_icon('tiktok') self.discovery_page.audience_block_title.contain_text('Followers1k–10M+') self.discovery_page.expand_audience_block() self.discovery_page.audience_tiktok_followers_min.slide(direction='Left', times=1) self.discovery_page.collapse_audience_block() self.discovery_page.audience_block_title.has_no_icon('tiktok') self.discovery_page.audience_block_title.not_contain_text('Followers1k–10M+') @allure.title("[Discovery Params Artist] - Audience - YouTube - Panel behaviour") @allure.description("As user I want to search artists by audience YouTube parameters") @allure.testcase("https://data-analytics.atlassian.net/browse/DNAD-263") @pytest.mark.regression def test_audience_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_audience_block() self.discovery_page.audience_youtube_subscribers_min.slide(direction='Right', times=1) self.discovery_page.audience_youtube_subscribers_min.has_value('1k') self.discovery_page.collapse_audience_block() self.discovery_page.audience_block_title.has_icon('youtube') self.discovery_page.audience_block_title.contain_text('Subscribers1k–10M+') self.discovery_page.dsp_youtube_on(False) # DSP - YouTube - OFF self.discovery_page.audience_block_title.has_no_icon('youtube') self.discovery_page.audience_block_title.not_contain_text('Subscribers1k–10M+') self.discovery_page.dsp_youtube_on(True) # DSP - YouTube - ON self.discovery_page.audience_block_title.has_icon('youtube') self.discovery_page.audience_block_title.contain_text('Subscribers1k–10M+') self.discovery_page.expand_audience_block() self.discovery_page.audience_youtube_subscribers_min.slide(direction='Left', times=1) self.discovery_page.audience_youtube_subscribers_min.has_value('0') self.discovery_page.collapse_audience_block() self.discovery_page.audience_block_title.has_no_icon('youtube') self.discovery_page.audience_block_title.not_contain_text('Subscribers1k–10M+') @allure.title("[Discovery Params Artist] - Audience - Spotify - Panel behaviour") @allure.description("As user I want to search artists by audience Spotify parameters") @allure.testcase("https://data-analytics.atlassian.net/browse/DNAD-265") @pytest.mark.regression def test_audience_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_audience_block() self.discovery_page.audience_spotify_followers_min.slide(direction='Right', times=4) self.discovery_page.audience_spotify_followers_max.slide(direction='Left', times=3) self.discovery_page.audience_spotify_followers_min.has_value('25k') self.discovery_page.audience_spotify_followers_max.has_value('500k') self.discovery_page.collapse_audience_block() self.discovery_page.audience_block_title.has_icon('spotify') self.discovery_page.audience_block_title.contain_text('Followers25k–500k') self.discovery_page.dsp_spotify_on(False) # DSP - Spotify - OFF self.discovery_page.audience_block_title.not_contain_text('Followers25k–500k') self.discovery_page.audience_block_title.has_no_icon('youtube') self.discovery_page.dsp_spotify_on(True) # DSP - Spotify - ON self.discovery_page.audience_block_title.has_icon('spotify') self.discovery_page.audience_block_title.contain_text('Followers25k–500k') self.discovery_page.expand_audience_block() self.discovery_page.audience_spotify_followers_min.slide(direction='Left', times=4) self.discovery_page.audience_spotify_followers_max.slide(direction='Right', times=3) self.discovery_page.audience_spotify_followers_min.has_value('0') self.discovery_page.audience_spotify_followers_max.has_value('10M+') self.discovery_page.collapse_audience_block() self.discovery_page.audience_block_title.has_no_icon('spotify') self.discovery_page.audience_block_title.not_contain_text('Followers25k–500k') @allure.title("[Discovery Params Artist] - Audience - SoundCloud - Panel behaviour") @allure.description("As user I want to search artists by audience SoundCloud parameters") @allure.testcase("https://data-analytics.atlassian.net/browse/DNAD-266") @pytest.mark.regression def test_audience_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_audience_block() self.discovery_page.audience_soundcloud_followers_min.slide(direction='Right', times=2) self.discovery_page.audience_soundcloud_followers_max.slide(direction='Left', times=2) self.discovery_page.audience_soundcloud_followers_min.has_value('5k') self.discovery_page.audience_soundcloud_followers_max.has_value('1M') self.discovery_page.collapse_audience_block() self.discovery_page.audience_block_title.has_icon('sndcld') self.discovery_page.audience_block_title.contain_text('Followers5k–1M') self.discovery_page.dsp_soundcloud_on(False) # DSP - SoundCloud - OFF self.discovery_page.audience_block_title.has_no_icon('sndcld') self.discovery_page.audience_block_title.not_contain_text('Followers5k–1M') self.discovery_page.dsp_soundcloud_on(True) # DSP - SoundCloud - ON self.discovery_page.audience_block_title.has_icon('sndcld') self.discovery_page.audience_block_title.contain_text('Followers5k–1M') self.discovery_page.expand_audience_block() self.discovery_page.audience_soundcloud_followers_min.slide(direction='Left', times=2) self.discovery_page.audience_soundcloud_followers_max.slide(direction='Right', times=2) self.discovery_page.audience_soundcloud_followers_min.has_value('0') self.discovery_page.audience_soundcloud_followers_max.has_value('10M+') self.discovery_page.collapse_audience_block() self.discovery_page.audience_block_title.has_no_icon('sndcld') self.discovery_page.audience_block_title.not_contain_text('Followers5k–1M')