fix: A/B test 16 (pageHeaderRenderer on playlist pages)

This commit is contained in:
ThetaDev 2024-10-12 05:47:47 +02:00
parent f3f2e1d3ca
commit e65f14556f
No known key found for this signature in database
GPG key ID: E319D3C5148D65B6
17 changed files with 6435 additions and 182 deletions

View file

@ -35,6 +35,7 @@ pub enum ABTest {
MusicPlaylistTwoColumn = 13,
CommentsFrameworkUpdate = 14,
ChannelShortsLockup = 15,
PlaylistPageHeader = 16,
}
/// List of active A/B tests that are run when none is manually specified
@ -112,6 +113,7 @@ pub async fn run_test(
ABTest::MusicPlaylistTwoColumn => music_playlist_two_column(&query).await,
ABTest::CommentsFrameworkUpdate => comments_framework_update(&query).await,
ABTest::ChannelShortsLockup => channel_shorts_lockup(&query).await,
ABTest::PlaylistPageHeader => playlist_page_header_renderer(&query).await,
}
.unwrap();
pb.inc(1);
@ -382,3 +384,20 @@ pub async fn channel_shorts_lockup(rp: &RustyPipeQuery) -> Result<bool> {
.unwrap();
Ok(res.contains("\"shortsLockupViewModel\""))
}
pub async fn playlist_page_header_renderer(rp: &RustyPipeQuery) -> Result<bool> {
let id = "VLPLZN_exA7d4RVmCQrG5VlWIjMOkMFZVVOc";
let res = rp
.raw(
ClientType::Desktop,
"browse",
&QBrowse {
context: rp.get_context(ClientType::Desktop, true, None).await,
browse_id: id,
params: None,
},
)
.await
.unwrap();
Ok(res.contains("\"pageHeaderRenderer\""))
}