diff --git a/source/CreatePage.html b/source/CreatePage.html index bc37e7a..1fbd60c 100644 --- a/source/CreatePage.html +++ b/source/CreatePage.html @@ -47,11 +47,11 @@
Rating: - - - - - + + + + +
@@ -66,7 +66,7 @@
- +
diff --git a/source/ReviewDetails.html b/source/ReviewDetails.html index c790b4e..8c457aa 100644 --- a/source/ReviewDetails.html +++ b/source/ReviewDetails.html @@ -49,11 +49,11 @@
Rating: - - - - - + + + + +
diff --git a/source/assets/scripts/CreatePage.js b/source/assets/scripts/CreatePage.js index c5c641f..af666c7 100644 --- a/source/assets/scripts/CreatePage.js +++ b/source/assets/scripts/CreatePage.js @@ -46,7 +46,7 @@ function initFormHandler() { }); - let tagAddBtn = document.getElementById("tagAdd"); + let tagAddBtn = document.getElementById("tag-add-btn"); tagAddBtn.addEventListener("click", ()=> { let tagField = document.getElementById("tag-form"); if (tagField.value.length > 0) { diff --git a/source/assets/scripts/main.e2e.test.js b/source/assets/scripts/main.e2e.test.js index acbe038..482f67c 100644 --- a/source/assets/scripts/main.e2e.test.js +++ b/source/assets/scripts/main.e2e.test.js @@ -55,14 +55,14 @@ describe("test App end to end", async () => { await page.$eval("#tag-form", (el, value) => el.value = `tag ${value}`, i); await tag_btn.click(); } - + // Select a new rating of 1 star - let rating_select = await page.$("#s1"); - rating_select.click(); + let rating_select = await page.$("#s1-select"); + await rating_select.click({delay: 100}); // Click the save button to save updates let save_btn = await page.$("#save-btn"); - save_btn.click(); + await save_btn.click(); await page.waitForNavigation(); }); @@ -260,7 +260,7 @@ describe("test App end to end", async () => { // Get all tag elements and click them to delete them let tag_items = await page.$$(".tag"); for(let i = 0; i < tag_items.length; i++){ - await tag_items.click(); + await tag_items[i].click(); } // Get the button needed to add new tags @@ -271,12 +271,12 @@ describe("test App end to end", async () => { } // Select a new rating of 5 stars - let rating_select = await page.$("#s5"); - rating_select.click(); + let rating_select = await page.$("#s5-select"); + await rating_selects.click(); // Click the save button to save updates let save_btn = await page.$("#save-btn"); - save_btn.click(); + await save_btn.click(); await page.waitForNavigation(); });