-
Notifications
You must be signed in to change notification settings - Fork 7
majd_jadalhaq-W1-Browsers #19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
594a179
1befab7
ba1c20d
1292a4f
dca8d49
47b925a
a1d4cd9
a19a70d
ea18f66
f76352a
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| ## Test Summary | ||
|
|
||
| **Mentors**: For more information on how to review homework assignments, please refer to the [Review Guide](https://github.com/HackYourFuture/mentors/blob/main/assignment-support/review-guide.md). | ||
|
|
||
| ### 2-Browsers - Week1 | ||
|
|
||
| | Exercise | Passed | Failed | ESLint | | ||
| |------------------|--------|--------|--------| | ||
| | ex1-bookList | 6 | - | ✓ | | ||
| | ex2-aboutMe | 4 | - | ✓ | | ||
| | ex3-hijackLogo | - | 3 | ✓ | | ||
| | ex4-whatsTheTime | 6 | - | ✓ | | ||
| | ex5-catWalk | 5 | - | ✓ | |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,36 @@ | ||
| /* Write your style here */ | ||
| body { | ||
| font-family: Arial, sans-serif; | ||
| background-color: #f8f9fa; | ||
| text-align: center; | ||
| } | ||
|
|
||
| ul { | ||
| list-style-type: none; | ||
| padding: 0; | ||
| } | ||
|
|
||
| li { | ||
| margin: 20px auto; | ||
| padding: 15px; | ||
| max-width: 400px; | ||
| border-radius: 8px; | ||
| box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2); | ||
| transition: transform 0.2s; | ||
| } | ||
|
|
||
| li:hover { | ||
| transform: scale(1.05); | ||
| } | ||
|
|
||
| p { | ||
| font-weight: bold; | ||
| margin-bottom: 10px; | ||
| } | ||
|
|
||
| img { | ||
| max-width: 100px; | ||
| height: auto; | ||
| display: block; | ||
| margin: 0 auto; | ||
| } | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,6 @@ | ||
| /* 3. Add a css rule for .list-item to make the color red. */ | ||
| /* 3. Add a css rule for .list-item to make the color red */ | ||
| .list-item { | ||
| color: red; | ||
| font-weight: bold; | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. why not 💪 |
||
| } | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm afraid to say I can't really check this exercise, because Google as it shows up on my computer doesn't show an
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I could make it work when it was an i mg ,but it breaks when Google switches to the SVG version ill try to fix it and check |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -7,7 +7,19 @@ Full description at: https://github.com/HackYourFuture/Assignments/tree/main/2-B | |
| HackYourFuture logo instead. | ||
| ------------------------------------------------------------------------------*/ | ||
| function hijackGoogleLogo() { | ||
| // TODO your code goes in here | ||
| // 1. Select the Google logo | ||
| // On the Google homepage, the logo has an id of "hplogo" or class "lnXdpd" | ||
| // We'll try using the most reliable: 'img' inside '#hplogo' or querySelector | ||
| const logo = document.querySelector('img'); | ||
|
|
||
| if (logo) { | ||
| // 2. Replace the src and srcset with HackYourFuture logo | ||
| logo.src = 'assets/hyf-logo-black-bg-small.png'; | ||
| logo.srcset = ''; | ||
| } else { | ||
| console.log('Google logo not found!'); | ||
| } | ||
| } | ||
|
|
||
| // Execute | ||
| hijackGoogleLogo(); | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is now doubled, because this line already exists below :P
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. oh I accidentally left two calls to hijackGoogleLogo() its on me , sorry for that,ill edit it |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| /*------------------------------------------------------------------------------ | ||
| Full description at: https://github.com/HackYourFuture/Assignments/tree/main/2-Browsers/Week1#exercise-3-the-logo-hijack | ||
|
|
||
| 1. Find out how to select the element that contains the Google logo, and store | ||
| it in a variable. | ||
| 2. Modify the `src` and `srcset` of the logo so that it's replaced by the | ||
| HackYourFuture logo instead. | ||
| ------------------------------------------------------------------------------*/ | ||
| function hijackGoogleLogo() { | ||
| // 1. Select the Google logo | ||
| const logo = document.querySelector('img'); | ||
|
|
||
| if (logo) { | ||
| // 2. Replace the src and srcset with HackYourFuture logo | ||
| logo.src = 'assets/hyf-logo-black-bg-small.png'; | ||
| logo.srcset = ''; | ||
| } else { | ||
| console.log('Google logo not found!'); | ||
| } | ||
| } | ||
|
|
||
| // Execute | ||
| hijackGoogleLogo(); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| *** Unit Test Error Report *** | ||
|
|
||
| PASS .dist/2-Browsers/Week1/unit-tests/ex1-bookList.test.js | ||
| br-wk1-ex1-bookList | ||
| ✅ HTML should be syntactically valid (151 ms) | ||
| ✅ should have all TODO comments removed (1 ms) | ||
| ✅ should contain a <ul> that is a child of <div id="bookList"> (1 ms) | ||
| ✅ should contain a <ul> with 3 <li> elements (2 ms) | ||
| ✅ should contain an <li> with title and author for each book of the `myBooks` array (1 ms) | ||
| ✅ should contain an <img> element for each book | ||
|
|
||
| Test Suites: 1 passed, 1 total | ||
| Tests: 6 passed, 6 total | ||
| Snapshots: 0 total | ||
| Time: 3.613 s | ||
| Ran all test suites matching /\/Users\/majdjadalhaq\/Desktop\/Assignments-Cohort54\/.dist\/2-Browsers\/Week1\/unit-tests\/ex1-bookList.test.js/i. | ||
| No linting errors detected. | ||
|
|
||
|
|
||
| *** Spell Checker Report *** | ||
|
|
||
| 2-Browsers/Week1/assignment/ex1-bookList/index.js:36:52 - Unknown word (lightgreen) | ||
| 2-Browsers/Week1/assignment/ex1-bookList/index.js:36:67 - Unknown word (lightcoral) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| *** Unit Test Error Report *** | ||
|
|
||
| PASS .dist/2-Browsers/Week1/unit-tests/ex2-aboutMe.test.js | ||
| br-wk1-ex2-aboutMe | ||
| ✅ should be syntactically valid (148 ms) | ||
| ✅ should have all TODO comments removed (2 ms) | ||
| ✅ each <li> should have the CSS class `list-item` (1 ms) | ||
| ✅ each <li> should rendered red (= rgb(255, 0, 0)) (22 ms) | ||
|
|
||
| Test Suites: 1 passed, 1 total | ||
| Tests: 4 passed, 4 total | ||
| Snapshots: 0 total | ||
| Time: 2.684 s, estimated 3 s | ||
| Ran all test suites matching /\/Users\/majdjadalhaq\/Desktop\/Assignments-Cohort54\/.dist\/2-Browsers\/Week1\/unit-tests\/ex2-aboutMe.test.js/i. | ||
| No linting errors detected. | ||
|
|
||
|
|
||
| *** Spell Checker Report *** | ||
|
|
||
| 2-Browsers/Week1/assignment/ex2-aboutMe/index.js:12:52 - Unknown word (Majd) | ||
| 2-Browsers/Week1/assignment/ex2-aboutMe/index.js:14:52 - Unknown word (Lelystad) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| *** Unit Test Error Report *** | ||
|
|
||
| Command failed: npx jest /Users/majdjadalhaq/Desktop/Assignments-Cohort54/.dist/2-Browsers/Week1/unit-tests/ex3-hijackLogo.test.js --colors --noStackTrace --json | ||
| FAIL .dist/2-Browsers/Week1/unit-tests/ex3-hijackLogo.test.js | ||
| br-wk1-ex3-hijackLogo | ||
| ❌ should have all TODO comments removed | ||
| ❌ should set the `.src` property | ||
| ❌ should set the `.srcset` property | ||
|
|
||
| ● br-wk1-ex3-hijackLogo › should have all TODO comments removed | ||
|
|
||
| ENOENT: no such file or directory, open '/Users/majdjadalhaq/Desktop/Assignments-Cohort54/2-Browsers/Week1/assignment/ex3-hijackLogo/index.js' | ||
|
|
||
| ● br-wk1-ex3-hijackLogo › should set the `.src` property | ||
|
|
||
| ENOENT: no such file or directory, open '/Users/majdjadalhaq/Desktop/Assignments-Cohort54/2-Browsers/Week1/assignment/ex3-hijackLogo/index.js' | ||
|
|
||
| ● br-wk1-ex3-hijackLogo › should set the `.srcset` property | ||
|
|
||
| ENOENT: no such file or directory, open '/Users/majdjadalhaq/Desktop/Assignments-Cohort54/2-Browsers/Week1/assignment/ex3-hijackLogo/index.js' | ||
|
|
||
| Test Suites: 1 failed, 1 total | ||
| Tests: 3 failed, 3 total | ||
| Snapshots: 0 total | ||
| Time: 0.627 s, estimated 1 s | ||
| Ran all test suites matching /\/Users\/majdjadalhaq\/Desktop\/Assignments-Cohort54\/.dist\/2-Browsers\/Week1\/unit-tests\/ex3-hijackLogo.test.js/i. | ||
| No linting errors detected. | ||
| No spelling errors detected. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,18 @@ | ||
| *** Unit Test Error Report *** | ||
|
|
||
| PASS .dist/2-Browsers/Week1/unit-tests/ex4-whatsTheTime.test.js | ||
| br-wk1-ex4-whatsTheTime | ||
| ✅ HTML should be syntactically valid (149 ms) | ||
| ✅ should have all TODO comments removed (1 ms) | ||
| ✅ should use `setInterval()` | ||
| ✅ should not call `setInterval()` more than once (2002 ms) | ||
| ✅ should use `window.onload` or `window.addEventListener()` for the `load` or `DOMContentLoaded` event (1 ms) | ||
| ✅ `window.onload` or `window.addEventListener` should not call its event handler function (1 ms) | ||
|
|
||
| Test Suites: 1 passed, 1 total | ||
| Tests: 6 passed, 6 total | ||
| Snapshots: 0 total | ||
| Time: 4.79 s | ||
| Ran all test suites matching /\/Users\/majdjadalhaq\/Desktop\/Assignments-Cohort54\/.dist\/2-Browsers\/Week1\/unit-tests\/ex4-whatsTheTime.test.js/i. | ||
| No linting errors detected. | ||
| No spelling errors detected. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| *** Unit Test Error Report *** | ||
|
|
||
| PASS .dist/2-Browsers/Week1/unit-tests/ex5-catWalk.test.js | ||
| br-wk1-ex5-catWalk | ||
| ✅ HTML should be syntactically valid (154 ms) | ||
| ✅ should have all TODO comments removed | ||
| ✅ should use `setInterval()` and/or `setTimeout()` | ||
| ✅ should use `window.onload` or `window.addEventListener()` for the `load` or `DOMContentLoaded` event (2 ms) | ||
| ✅ `window.onload` or `window.addEventListener` should not call its event handler function (1 ms) | ||
|
|
||
| Test Suites: 1 passed, 1 total | ||
| Tests: 5 passed, 5 total | ||
| Snapshots: 0 total | ||
| Time: 3.719 s | ||
| Ran all test suites matching /\/Users\/majdjadalhaq\/Desktop\/Assignments-Cohort54\/.dist\/2-Browsers\/Week1\/unit-tests\/ex5-catWalk.test.js/i. | ||
| No linting errors detected. | ||
| No spelling errors detected. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fun !