mirror of
https://github.com/freeCodeCamp/freeCodeCamp.git
synced 2026-03-07 09:01:13 -05:00
fix(curriculum): fix test to avoid incorrect code passing lab bookmark manager app (#65631)
This commit is contained in:
@@ -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, "<p>No Bookmarks Found</p>")
|
||||
assert.strictEqual(categoryList.innerHTML,"<p>No Bookmarks Found</p>")
|
||||
assert.isFalse(categoryListSection.classList.contains("hidden"));
|
||||
assert.isTrue(mainSection.classList.contains("hidden"));
|
||||
} finally {
|
||||
resetLocalStorage()
|
||||
clearCategoryList()
|
||||
|
||||
Reference in New Issue
Block a user