From 4780096b00560da113d5d635b065c382a1fe147a Mon Sep 17 00:00:00 2001 From: ThetaDev Date: Wed, 30 Aug 2023 21:57:53 +0200 Subject: [PATCH] tests: fix check for A/B test 6 (discography page) --- codegen/src/abtest.rs | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/codegen/src/abtest.rs b/codegen/src/abtest.rs index b9d7f09..9d6a4ce 100644 --- a/codegen/src/abtest.rs +++ b/codegen/src/abtest.rs @@ -231,9 +231,20 @@ pub async fn trends_page_header_renderer(rp: &RustyPipeQuery) -> Result { } pub async fn discography_page(rp: &RustyPipeQuery) -> Result { - let artist = rp.music_artist("UC7cl4MmM6ZZ2TcFyMk_b4pg", false).await?; - - Ok(artist.albums.len() <= 10) + let id = "UC7cl4MmM6ZZ2TcFyMk_b4pg"; + let res = rp + .raw( + ClientType::DesktopMusic, + "browse", + &QBrowse { + context: rp.get_context(ClientType::DesktopMusic, true, None).await, + browse_id: id, + params: None, + }, + ) + .await + .unwrap(); + Ok(res.contains(&format!("\"MPAD{id}\""))) } pub async fn short_date_format(rp: &RustyPipeQuery) -> Result {