import allure import pytest from assertpy import assert_that from src.helpers.test_data_loader import DataLoader @pytest.mark.usefixtures("one_time_set_up") class TestVideos: artist_name = DataLoader.get_artist() @allure.title("View All Videos") @allure.description("User should be able to view All Videos") @allure.testcase("https://data-analytics.atlassian.net/browse/AMA-1896") @pytest.mark.smoke @pytest.mark.artist def test_view_all_videos(self): self.login_page.login_as_super_user() self.welcome_page.click_skip_btn() self.artist_selector_page.select_an_artist_by_name(self.artist_name) self.library_page.view_all_videos() assert_that(self.videos_page.all_videos_page_visible(), "All videos aren't shown").is_true() # Go to video screen and back self.videos_page.select_track_by_position(1) self.navigation_page.click_back() assert_that(self.videos_page.all_videos_page_visible(), "All videos aren't shown").is_true() self.navigation_page.click_back() assert_that(self.library_page.bn_switch_artist.is_visible, "User are not on Library page").is_true() @allure.title("Latest Uploads Videos") @allure.description("User should be able to view Latest Uploads Videos") @allure.testcase("https://data-analytics.atlassian.net/browse/AMA-1897") @pytest.mark.smoke def test_latest_uploads_videos(self): self.login_page.login_as_super_user() self.welcome_page.click_skip_btn() self.artist_selector_page.select_an_artist_by_name(self.artist_name) self.library_page.view_latest_uploads_videos() assert_that(self.videos_page.latest_uploads_videos_page_visible(), "All videos aren't shown").is_true() # Go to video screen and back self.videos_page.select_track_by_position(1) self.navigation_page.click_back() assert_that(self.videos_page.latest_uploads_videos_page_visible(), "All videos aren't shown").is_true() self.navigation_page.click_back() assert_that(self.library_page.bn_switch_artist.is_visible, "User are not on Library page").is_true()