diff --git a/source/ReviewDetails.html b/source/ReviewDetails.html index 4f50e59..6a061c3 100644 --- a/source/ReviewDetails.html +++ b/source/ReviewDetails.html @@ -27,14 +27,13 @@
-

Salad (default name)

-

Salad Inc. (default name)

+

+

- Meal Photo Corrupted +
@@ -42,8 +41,8 @@
- -

Default comment

+ +

diff --git a/source/assets/scripts/ReviewCard.js b/source/assets/scripts/ReviewCard.js index 0279fef..f571a1a 100644 --- a/source/assets/scripts/ReviewCard.js +++ b/source/assets/scripts/ReviewCard.js @@ -87,7 +87,7 @@ class ReviewCard extends HTMLElement { flex-flow: row wrap; } - .tag { + .a-tag { background-color:#94da97; border-radius: 7px; color: #94da97; @@ -195,7 +195,7 @@ class ReviewCard extends HTMLElement { if(data["tags"]){ for (let i = 0; i < data["tags"].length; i++) { let newTag = document.createElement("label"); - newTag.setAttribute("class","tag"); + newTag.setAttribute("class","a-tag"); newTag.innerHTML = data["tags"][i]; tagContainer.append(newTag); } diff --git a/source/assets/scripts/ReviewDetails.js b/source/assets/scripts/ReviewDetails.js index d957561..3251189 100644 --- a/source/assets/scripts/ReviewDetails.js +++ b/source/assets/scripts/ReviewDetails.js @@ -44,7 +44,7 @@ function setupInfo(){ if(currReview["tags"]){ for (let i = 0; i < currReview["tags"].length; i++) { let newTag = document.createElement("label"); - newTag.setAttribute("class","tag"); + newTag.setAttribute("class","d-tag"); newTag.innerHTML = currReview["tags"][i]; tagContainer.append(newTag); } @@ -67,7 +67,7 @@ function setupUpdate(){ let updateBtn = document.getElementById("update-btn"); let currID = JSON.parse(sessionStorage.getItem("currID")); let currReview = getReviewFromStorage(currID); - let form = document.getElementById("update-food-entry"); + let form = document.getElementById("new-food-entry"); let updateDiv = document.getElementById("update-form"); updateBtn.addEventListener("click", function(){ //update function @@ -171,7 +171,7 @@ function setupUpdate(){ updateReviewToStorage(currID, newData); - form.style.display = "none"; + updateDiv.classList.add("hidden"); }); diff --git a/source/assets/scripts/appTestHelpers.js b/source/assets/scripts/appTestHelpers.js index 92e0888..37e7cb4 100644 --- a/source/assets/scripts/appTestHelpers.js +++ b/source/assets/scripts/appTestHelpers.js @@ -59,7 +59,7 @@ export async function checkCorrectness(root, prefix, expected){ assert.strictEqual(await restaurant_text.jsonValue(), expected.restaurant); // Check tags - let tags = await root.$$(".tag"); + let tags = await root.$$(`.${prefix}-tag`); assert.strictEqual(await tags.length, expected.tags.length); for(let i = 0; i < expected.tags.length; i++){ let tag_text = await tags[i].getProperty("innerText");