From 467828d388d2d19b99c3efbb60ed8056f5900a39 Mon Sep 17 00:00:00 2001 From: rheabhutada02 <83424582+rheabhutada02@users.noreply.github.com> Date: Wed, 16 Nov 2022 15:48:10 -0800 Subject: [PATCH 01/35] Rename 11822-sprint1day2.md to 110822-sprint1day2.md --- admin/meetings/{11822-sprint1day2.md => 110822-sprint1day2.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename admin/meetings/{11822-sprint1day2.md => 110822-sprint1day2.md} (100%) diff --git a/admin/meetings/11822-sprint1day2.md b/admin/meetings/110822-sprint1day2.md similarity index 100% rename from admin/meetings/11822-sprint1day2.md rename to admin/meetings/110822-sprint1day2.md From 41905a219b40fdd73ef88c7336c067ad9b6ec4f2 Mon Sep 17 00:00:00 2001 From: rheabhutada02 <83424582+rheabhutada02@users.noreply.github.com> Date: Wed, 16 Nov 2022 15:54:50 -0800 Subject: [PATCH 02/35] updated checkin6.md --- admin/meetings/checkin6.md | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 admin/meetings/checkin6.md diff --git a/admin/meetings/checkin6.md b/admin/meetings/checkin6.md new file mode 100644 index 0000000..0c37037 --- /dev/null +++ b/admin/meetings/checkin6.md @@ -0,0 +1,33 @@ +# Meeting Minutes (11/16/2022) +## Team 29: Hackers1995 +## Meeting Topic: Weekly TA Catchup with Gagan +We are meeting with Gagan to discuss Checkpoint 1 and Sprint 2 resolutions. + +## Attendance +1. Rhea Bhutada +2. George Dubinin +3. Gagan Gopalaiah +4. Kara Hoagland + +## Meeting Details +- When: 11/16/2022 at 3:30PM +- Where: Zoom + +## Agenda: + +## Discussion Points by Gagan +- Updated Gagan on Sprint 1 + - looked at Girhub actions + - looked at the published page so far + - discussed retrospective +- Upcoming Assignments + - we have to come up with a video on the status of our app + - ramp up the styling part, so u can brag about the design of the app + - this video is supposed to encourage healthy competition +- Other Concerns + - JSDocs - not primary concern right now + - GitHub Pages vs. Netlify + - Gagan sees Netlify as more professional and not to difficult to implement + +## End Time +- 11/09/2022 at 3:45PM From 56dceb5edb200cfa82bd1df2a05574b67d71abf5 Mon Sep 17 00:00:00 2001 From: rheabhutada02 <83424582+rheabhutada02@users.noreply.github.com> Date: Wed, 16 Nov 2022 15:55:18 -0800 Subject: [PATCH 03/35] Rename checkin6.md to 111622-checkin6.md --- admin/meetings/{checkin6.md => 111622-checkin6.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename admin/meetings/{checkin6.md => 111622-checkin6.md} (100%) diff --git a/admin/meetings/checkin6.md b/admin/meetings/111622-checkin6.md similarity index 100% rename from admin/meetings/checkin6.md rename to admin/meetings/111622-checkin6.md From dd7d876f29bcaa6e9a77d8e2a74ac50f78f5f4ee Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Wed, 16 Nov 2022 16:10:31 -0800 Subject: [PATCH 04/35] add dependencies to package.json, add http-server script to package.json, add simple e2e test in main.e2e.test.js Signed-off-by: Arthur Lu --- package.json | 7 +++-- source/assets/scripts/localStorage.test.js | 9 ++++--- source/assets/scripts/main.e2e.test.js | 31 ++++++++++++++++++++++ 3 files changed, 41 insertions(+), 6 deletions(-) create mode 100644 source/assets/scripts/main.e2e.test.js diff --git a/package.json b/package.json index bd8a69c..9d0267d 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,8 @@ "lint": "eslint '**/*.js'", "fix-style": "eslint --fix **/*.js", "lintHTML": "htmlhint '**/*.html'", - "lintCSS": "stylelint '**/*.css'" + "lintCSS": "stylelint '**/*.css'", + "http-server": "http-server source &" }, "devDependencies": { "eslint": "^8.27.0", @@ -15,6 +16,8 @@ "mocha": "10", "mock-local-storage": "^1.1.23", "stylelint": "14.14.1", - "stylelint-config-standard": "^29.0.0" + "stylelint-config-standard": "^29.0.0", + "puppeteer": "18", + "http-server": "" } } diff --git a/source/assets/scripts/localStorage.test.js b/source/assets/scripts/localStorage.test.js index 65574b8..90ed2b7 100644 --- a/source/assets/scripts/localStorage.test.js +++ b/source/assets/scripts/localStorage.test.js @@ -2,11 +2,12 @@ import {strict as assert} from "node:assert"; import {describe, it, beforeEach} from "mocha"; import {saveReviewsToStorage, getReviewsFromStorage} from "./localStorage.js"; -beforeEach(() => { - localStorage.clear(); -}); - describe("test app localStorage interaction", () => { + + beforeEach(() => { + localStorage.clear(); + }); + it("get after init", () => { assert.deepEqual(getReviewsFromStorage(), []); }); diff --git a/source/assets/scripts/main.e2e.test.js b/source/assets/scripts/main.e2e.test.js new file mode 100644 index 0000000..2a61fc5 --- /dev/null +++ b/source/assets/scripts/main.e2e.test.js @@ -0,0 +1,31 @@ +import {strict as assert} from "node:assert"; +import {describe, it, beforeEach} from "mocha"; +import puppeteer from 'puppeteer-core'; +import { exit } from "node:process"; + +describe("test App end to end", async () => { + + let browser; + let page; + + beforeEach(async () => { + browser = await puppeteer.launch(); + page = await browser.newPage(); + try{ + await page.goto('http://localhost:8080', {timeout: 1000}); + } + catch (error) { + console.log("❌ failed to connect to localhost webserver on port 8080") + exit(1); + } + }); + + it("page should have correct title", async () => { + assert.strictEqual(await page.title(), "Food Journal"); + }); + + afterEach(async () => { + await page.close(); + await browser.close(); + }); +}); \ No newline at end of file From cbe8da609ce33bbd6b4b3231db8dfa5b32bc0786 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Wed, 16 Nov 2022 16:18:35 -0800 Subject: [PATCH 05/35] fix js-unittest.yml to start local server Signed-off-by: Arthur Lu --- .github/workflows/js-unittest.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/js-unittest.yml b/.github/workflows/js-unittest.yml index 4cb1359..5c07e35 100644 --- a/.github/workflows/js-unittest.yml +++ b/.github/workflows/js-unittest.yml @@ -23,5 +23,7 @@ jobs: uses: actions/checkout@v3 - name: Install dependencies run: sudo npm install + - name: Start local http server + run: sudo npm run http-server - name: Run tests run: sudo npm test \ No newline at end of file From 7abc995ffea2c142f59520c94866f07be1e1fd06 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Wed, 16 Nov 2022 16:46:02 -0800 Subject: [PATCH 06/35] fix linting errors Signed-off-by: Arthur Lu --- source/assets/scripts/main.e2e.test.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/assets/scripts/main.e2e.test.js b/source/assets/scripts/main.e2e.test.js index 2a61fc5..a102b53 100644 --- a/source/assets/scripts/main.e2e.test.js +++ b/source/assets/scripts/main.e2e.test.js @@ -1,6 +1,6 @@ import {strict as assert} from "node:assert"; -import {describe, it, beforeEach} from "mocha"; -import puppeteer from 'puppeteer-core'; +import {describe, it, beforeEach, afterEach} from "mocha"; +import puppeteer from "puppeteer-core"; import { exit } from "node:process"; describe("test App end to end", async () => { @@ -12,10 +12,10 @@ describe("test App end to end", async () => { browser = await puppeteer.launch(); page = await browser.newPage(); try{ - await page.goto('http://localhost:8080', {timeout: 1000}); + await page.goto("http://localhost:8080", {timeout: 1000}); } catch (error) { - console.log("❌ failed to connect to localhost webserver on port 8080") + console.log("❌ failed to connect to localhost webserver on port 8080"); exit(1); } }); From d9c28096fd90c6db6c1456d0aa23a712f78e5b50 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Wed, 16 Nov 2022 17:41:45 -0800 Subject: [PATCH 07/35] add e2e framework ADR Signed-off-by: Arthur Lu --- specs/adrs/111622-e2etesting-puppeteer.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 specs/adrs/111622-e2etesting-puppeteer.md diff --git a/specs/adrs/111622-e2etesting-puppeteer.md b/specs/adrs/111622-e2etesting-puppeteer.md new file mode 100644 index 0000000..4a1d3ce --- /dev/null +++ b/specs/adrs/111622-e2etesting-puppeteer.md @@ -0,0 +1,19 @@ +# Use puppeteer for JS unit testing framework + +- Status: accept +- Deciders: Arthur Lu, Marc Reta +- Date: 11 / 16 / 22 + +## Decision Drivers + +- Need end to end testing framework which runs headlessly and quickly +- Framework should integrate well with Mocha, the existing unit testing framework +- Framework should be easy to implement end to end tests with + +## Considered Options +- puppeteer +- selenium-webdriver + +## Decision Outcome + +Chosen Option: Puppeteer for its ease of use with mocha. \ No newline at end of file From 0ebf9f8a20f024c4d6e5cf468c2585562a2dee34 Mon Sep 17 00:00:00 2001 From: Arthur Lu Date: Thu, 17 Nov 2022 11:38:05 -0800 Subject: [PATCH 08/35] fix typo in package.json Signed-off-by: Arthur Lu --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 9d0267d..5da1afa 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "fix-style": "eslint --fix **/*.js", "lintHTML": "htmlhint '**/*.html'", "lintCSS": "stylelint '**/*.css'", - "http-server": "http-server source &" + "http-server": "http-server source" }, "devDependencies": { "eslint": "^8.27.0", From 85dc0544c707333af9ccd789036dab985cb11f23 Mon Sep 17 00:00:00 2001 From: Sanjit Joseph <78522615+sm-joseph@users.noreply.github.com> Date: Thu, 17 Nov 2022 12:19:26 -0800 Subject: [PATCH 09/35] Add star rating system to main page --- source/static/ReviewCard.css | 46 ++++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) diff --git a/source/static/ReviewCard.css b/source/static/ReviewCard.css index 2c69f0b..20feb3a 100644 --- a/source/static/ReviewCard.css +++ b/source/static/ReviewCard.css @@ -81,3 +81,49 @@ main { background-color: rgb(254 171 171); border-color: red; } + +.hidden, +.rating:not(:checked) > input { /* Hide radio circles while star rating */ +display: none; +} + +/* Unchecked stars */ +.rating:not(:checked) > label { + /* Make stars line up sideways and not vertically */ + float:right; + + /* Hide label text */ + width:1em; + overflow:hidden; + white-space:nowrap; + + font-size:200%; + line-height:1.2; + color:#b3b3cc; +} + +.rating:not(:checked) > label:before { + content:'★'; +} + +/* Checked star color */ +.rating > input:checked ~ label { + color: #FFBF00; +} + +.rating:not(:checked) > label:hover, +.rating:not(:checked) > label:hover ~ label { + color: orangered; +} + +.rating > input:checked + label:hover, +.rating > input:checked + label:hover ~ label, +.rating > input:checked ~ label:hover, +.rating > input:checked ~ label:hover ~ label, +.rating > label:hover ~ input:checked ~ label { + color: orangered; +} + +.rating > label:active { + position:relative; +} From cf551f932b1499b2fdfd051db6151d67397e2c27 Mon Sep 17 00:00:00 2001 From: rheabhutada02 <83424582+rheabhutada02@users.noreply.github.com> Date: Thu, 17 Nov 2022 12:25:18 -0800 Subject: [PATCH 10/35] updated name ReviewDetails.html ReviewDetails.js --- source/ReviewDetails.html | 6 +++--- source/assets/scripts/ReviewDetails.js | 6 +++--- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/source/ReviewDetails.html b/source/ReviewDetails.html index 6c1080b..74b6365 100644 --- a/source/ReviewDetails.html +++ b/source/ReviewDetails.html @@ -19,8 +19,8 @@
- - + +