From d71da2413685ffc212b6f12fdc7474f42c632dd1 Mon Sep 17 00:00:00 2001 From: ThetaDev Date: Tue, 13 Feb 2024 17:53:38 +0100 Subject: [PATCH] tests: channel shorts: dont fetch more pages In some cases YouTube does not return a continuation response when fetching the *Shorts* channel tab. There should be more research done about this issue, for the moment this part of the test is disabled. --- codegen/src/abtest.rs | 6 +----- tests/youtube.rs | 15 +++++++++------ 2 files changed, 10 insertions(+), 11 deletions(-) diff --git a/codegen/src/abtest.rs b/codegen/src/abtest.rs index aff36cf..8b2c9f0 100644 --- a/codegen/src/abtest.rs +++ b/codegen/src/abtest.rs @@ -32,11 +32,7 @@ pub enum ABTest { ChannelPageHeader = 12, } -const TESTS_TO_RUN: [ABTest; 3] = [ - ABTest::TrendsVideoTab, - ABTest::TrendsPageHeaderRenderer, - ABTest::DiscographyPage, -]; +const TESTS_TO_RUN: [ABTest; 1] = [ABTest::ChannelPageHeader]; #[derive(Debug, Serialize, Deserialize)] pub struct ABTestRes { diff --git a/tests/youtube.rs b/tests/youtube.rs index 91abae6..6cc69bc 100644 --- a/tests/youtube.rs +++ b/tests/youtube.rs @@ -809,7 +809,6 @@ fn channel_videos(rp: RustyPipe) { } #[rstest] -#[ignore] fn channel_shorts(rp: RustyPipe) { let channel = tokio_test::block_on( rp.query() @@ -837,7 +836,7 @@ fn channel_shorts(rp: RustyPipe) { "got no shorts" ); - assert_next(channel.content, rp.query(), 15, 1, true); + // assert_next(channel.content, rp.query(), 15, 1, true); } #[rstest] @@ -985,7 +984,6 @@ fn channel_more( #[rstest] #[case::videos("UCcdwLMPsaU2ezNSJU1nFoBQ", ChannelVideoTab::Videos)] #[case::live("UCvqRdlKsE5Q8mf8YXbdIJLw", ChannelVideoTab::Live)] -#[ignore] #[case::shorts("UCcdwLMPsaU2ezNSJU1nFoBQ", ChannelVideoTab::Shorts)] fn channel_order_latest(#[case] id: &str, #[case] tab: ChannelVideoTab, rp: RustyPipe) { let latest = tokio_test::block_on(rp.query().channel_videos_tab_order( @@ -1007,13 +1005,15 @@ fn channel_order_latest(#[case] id: &str, #[case] tab: ChannelVideoTab, rp: Rust } } } - assert_next(latest, rp.query(), 15, 1, true); + + if tab != ChannelVideoTab::Shorts { + assert_next(latest, rp.query(), 15, 1, true); + } } #[rstest] #[case::videos("UCcdwLMPsaU2ezNSJU1nFoBQ", ChannelVideoTab::Videos, "XqZsoesa55w")] #[case::live("UCvqRdlKsE5Q8mf8YXbdIJLw", ChannelVideoTab::Live, "ojes5ULOqhc")] -#[ignore] #[case::shorts("UCcdwLMPsaU2ezNSJU1nFoBQ", ChannelVideoTab::Shorts, "k91vRvXGwHs")] fn channel_order_popular( #[case] id: &str, @@ -1045,7 +1045,10 @@ fn channel_order_popular( ); } } - assert_next(popular, rp.query(), 15, 1, true); + + if tab != ChannelVideoTab::Shorts { + assert_next(popular, rp.query(), 15, 1, true); + } } #[rstest]