import logging import unittest import allure import pytest from ui_automation_framework.core import TestStatus from ui_automation_framework.utils import AppConfig from ui_automation_framework.utils import logger as cl from app.api_client import ApiClient from app.src.pages.album_page import AlbumPage from app.src.pages.comparison_page import TrackComparisonPage from app.src.pages.login_page import LoginPage from app.src.pages.track_page import TrackPage @pytest.mark.usefixtures("set_up", "one_time_set_up") class DeepLinkingTrackPageTest(unittest.TestCase): log = cl.Logger(logging.DEBUG) @pytest.fixture(autouse=True) def classSetup(self): self.loginPage = LoginPage(self.driver) self.tp = TrackPage(self.driver) self.cp = TrackComparisonPage(self.driver) self.ap = AlbumPage(self.driver) self.api_client = ApiClient() self.ts = TestStatus(self.driver) @allure.story("AP-6318") @allure.severity(allure.severity_level.NORMAL) @allure.title("[AP-5776][YT>Trending>Details] Export verification.") @allure.description("Export on Details tab in Trending section.") def test_youtube_nvp_trending_details_export_verification(self): self.loginPage.login_with_worker() self.tp.open_youtube_video_page(isrc=AppConfig.get("track6")["isrc"], market=AppConfig.get("market")["us"]["url"]) # step 1 self.tp.nvp_youtube_check_videos_with_trending() self.tp.verify_youtube_trending_export_button(present=False) # step 3-4 self.tp.nvp_youtube_trending_switch_tab(self.tp.YT_TRENDING_DETAILS_TAB) self.tp.verify_youtube_trending_export_button() # step 5-9 self.tp.nvp_trending_details_verify_export() # step 10-11 self.tp.change_param_in_url_new(self.tp.trending_date, "2019-11-07") self.tp.nvp_youtube_trending_switch_tab(self.tp.YT_TRENDING_DETAILS_TAB) self.tp.nvp_trending_details_verify_export() # CAN NOT BE AUTOMATED - STEPS - 2