import pytest import allure @pytest.mark.usefixtures("app") class TestEngagementPanel: @allure.title("[Discovery Params Artist] - Engagement - TikTok Likes - Panel behaviour") @allure.description("As user I want to search artists by engagement TikTok parameters") @allure.testcase("https://data-analytics.atlassian.net/browse/DNAD-302") @pytest.mark.regression def test_engagement_panel_tiktok_likes(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_engagement_block() self.discovery_page.engagement_tiktok_likes_min.slide(direction='Right', times=1) self.discovery_page.engagement_tiktok_likes_min.has_value('5k') expected_text = 'Likes5k–100M+ ' self.discovery_page.collapse_engagement_block() self.discovery_page.engagement_block_title.contain_text(expected_text) self.discovery_page.engagement_block_title.has_icon('tiktok') self.discovery_page.engagement_block_title.contain_text(expected_text) self.discovery_page.dsp_tiktok_on(False) # DSP - TIKTOK - OFF self.discovery_page.engagement_block_title.not_contain_text(expected_text) self.discovery_page.engagement_block_title.has_no_icon('tiktok') self.discovery_page.dsp_tiktok_on(True) # DSP - TIKTOK - ON self.discovery_page.engagement_block_title.contain_text(expected_text) self.discovery_page.engagement_block_title.has_icon('tiktok') self.discovery_page.expand_engagement_block() self.discovery_page.engagement_tiktok_likes_min.slide(direction='Left', times=1) self.discovery_page.collapse_engagement_block() self.discovery_page.engagement_block_title.not_contain_text(expected_text) self.discovery_page.engagement_block_title.has_no_icon('tiktok') @allure.title("[Discovery Params Artist] - Engagement - Spotify Listeners - Panel behaviour") @allure.description("As user I want to search artists by engagement Spotify parameters") @allure.testcase("https://data-analytics.atlassian.net/browse/DNAD-724") @pytest.mark.regression def test_engagement_panel_spotify_listeners(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_engagement_block() self.discovery_page.engagement_spotify_listeners_min.slide(direction='Right', times=1) self.discovery_page.engagement_spotify_listeners_min.has_value('100') expected_text = 'Listeners/Mth100–10M+ ' self.discovery_page.collapse_engagement_block() self.discovery_page.engagement_block_title.contain_text(expected_text) self.discovery_page.engagement_block_title.has_icon('spotify') self.discovery_page.dsp_spotify_on(False) # DSP - SPOTIFY - OFF self.discovery_page.engagement_block_title.not_contain_text(expected_text) self.discovery_page.engagement_block_title.has_no_icon('spotify') self.discovery_page.dsp_spotify_on(True) # DSP - SPOTIFY - ON self.discovery_page.engagement_block_title.contain_text(expected_text) self.discovery_page.engagement_block_title.has_icon('spotify') self.discovery_page.expand_engagement_block() self.discovery_page.engagement_spotify_listeners_min.slide(direction='Left', times=1) self.discovery_page.collapse_engagement_block() self.discovery_page.engagement_block_title.not_contain_text(expected_text) self.discovery_page.engagement_block_title.has_no_icon('spotify') @allure.title("[Discovery Params Artist] - Engagement - Spotify Popularity - Panel behaviour") @allure.description("As user I want to search artists by engagement Spotify parameters") @allure.testcase("https://data-analytics.atlassian.net/browse/DNAD-725") @pytest.mark.regression def test_engagement_panel_spotify_popularity(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_engagement_block() self.discovery_page.engagement_spotify_popularity_min.slide(direction='Right', times=1) self.discovery_page.engagement_spotify_popularity_min.has_value('10') expected_text = 'Popularity10–100 ' self.discovery_page.collapse_engagement_block() self.discovery_page.engagement_block_title.contain_text(expected_text) self.discovery_page.engagement_block_title.has_icon('spotify') self.discovery_page.dsp_spotify_on(False) # DSP - SPOTIFY - OFF self.discovery_page.engagement_block_title.not_contain_text(expected_text) self.discovery_page.engagement_block_title.has_no_icon('spotify') self.discovery_page.dsp_spotify_on(True) # DSP - SPOTIFY - ON self.discovery_page.engagement_block_title.contain_text(expected_text) self.discovery_page.engagement_block_title.has_icon('spotify') self.discovery_page.expand_engagement_block() self.discovery_page.engagement_spotify_popularity_min.slide(direction='Left', times=1) self.discovery_page.collapse_engagement_block() self.discovery_page.engagement_block_title.not_contain_text(expected_text) self.discovery_page.engagement_block_title.has_no_icon('spotify') @allure.title("[Discovery Params Artist] - Engagement - SoundCloud Likes - Panel behaviour") @allure.description("As user I want to search artists by engagement SoundCloud parameters") @allure.testcase("https://data-analytics.atlassian.net/browse/DNAD-727") @pytest.mark.regression def test_engagement_panel_soundcloud_likes(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_engagement_block() self.discovery_page.engagement_soundcloud_likes_min.slide(direction='Right', times=2) self.discovery_page.engagement_soundcloud_likes_min.has_value('50') expected_text = 'Likes50–100k+ ' self.discovery_page.collapse_engagement_block() self.discovery_page.engagement_block_title.contain_text(expected_text) self.discovery_page.engagement_block_title.has_icon('sndcld') self.discovery_page.dsp_soundcloud_on(False) # DSP - SOUNDCLOUD - OFF self.discovery_page.engagement_block_title.not_contain_text(expected_text) self.discovery_page.engagement_block_title.has_no_icon('spotify') self.discovery_page.dsp_soundcloud_on(True) # DSP - SOUNDCLOUD - ON self.discovery_page.engagement_block_title.contain_text(expected_text) self.discovery_page.engagement_block_title.has_icon('sndcld') self.discovery_page.expand_engagement_block() self.discovery_page.engagement_soundcloud_likes_min.slide(direction='Left', times=2) self.discovery_page.collapse_engagement_block() self.discovery_page.engagement_block_title.not_contain_text(expected_text) self.discovery_page.engagement_block_title.has_no_icon('sndcld') @allure.title("[Discovery Params Artist] - Engagement - SoundCloud Comments - Panel behaviour") @allure.description("As user I want to search artists by engagement SoundCloud parameters") @allure.testcase("https://data-analytics.atlassian.net/browse/DNAD-726") @pytest.mark.regression def test_engagement_panel_soundcloud_comments(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_engagement_block() self.discovery_page.engagement_soundcloud_comments_min.slide(direction='Right', times=3) self.discovery_page.engagement_soundcloud_comments_min.has_value('100') expected_text = 'Comments100–100k+ ' self.discovery_page.collapse_engagement_block() self.discovery_page.engagement_block_title.contain_text(expected_text) self.discovery_page.engagement_block_title.has_icon('sndcld') self.discovery_page.dsp_soundcloud_on(False) # DSP - SOUNDCLOUD - OFF self.discovery_page.engagement_block_title.not_contain_text(expected_text) self.discovery_page.engagement_block_title.has_no_icon('spotify') self.discovery_page.dsp_soundcloud_on(True) # DSP - SOUNDCLOUD - ON self.discovery_page.engagement_block_title.contain_text(expected_text) self.discovery_page.engagement_block_title.has_icon('sndcld') self.discovery_page.expand_engagement_block() self.discovery_page.engagement_soundcloud_comments_min.slide(direction='Left', times=3) self.discovery_page.collapse_engagement_block() self.discovery_page.engagement_block_title.not_contain_text(expected_text) self.discovery_page.engagement_block_title.has_no_icon('sndcld')