From 6d74eaacce72c764d68ec200acb066eb86159dfd Mon Sep 17 00:00:00 2001 From: Aditya Singh Date: Tue, 3 Mar 2026 15:23:40 +0530 Subject: [PATCH] fix(curriculum): fix test to avoid incorrect code passing lab bookmark manager app (#65631) --- .../66def5467aee701733aaf8cc.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/curriculum/challenges/english/blocks/lab-bookmark-manager-app/66def5467aee701733aaf8cc.md b/curriculum/challenges/english/blocks/lab-bookmark-manager-app/66def5467aee701733aaf8cc.md index 88e71905eec..0e0e57ef9c0 100644 --- a/curriculum/challenges/english/blocks/lab-bookmark-manager-app/66def5467aee701733aaf8cc.md +++ b/curriculum/challenges/english/blocks/lab-bookmark-manager-app/66def5467aee701733aaf8cc.md @@ -265,11 +265,18 @@ When you click `#view-category-button`, you should add a `p` element with the te try { const viewCategoryButtonTest = document.getElementById("view-category-button"); const categoryDropdownTest = document.getElementById("category-dropdown"); + const categoryListSection = document.getElementById("bookmark-list-section"); + const mainSection = document.getElementById("main-section"); + const categoryList = document.getElementById("category-list"); + mainSection.classList.remove("hidden"); + categoryListSection.classList.add("hidden"); + categoryList.innerHTML = ""; setLocalStorage() categoryDropdownTest.value = "miscellaneous"; viewCategoryButtonTest.dispatchEvent(new Event("click")); - const categoryList = document.getElementById("category-list").innerHTML; - assert.strictEqual(categoryList, "

No Bookmarks Found

") + assert.strictEqual(categoryList.innerHTML,"

No Bookmarks Found

") + assert.isFalse(categoryListSection.classList.contains("hidden")); + assert.isTrue(mainSection.classList.contains("hidden")); } finally { resetLocalStorage() clearCategoryList()