Skip to content

Commit

Permalink
Jennifer-oop edits for EventRecommender (Techtonica#949)
Browse files Browse the repository at this point in the history
* Seperate class(es) from jQuery functions

* Reiterate that classes and jQuery are seperate pages

* Run jasmine and debug the failing tests, then run again

* Gave great README.md example

* Update Techtonica#1 in instructions for adding tests.

* Change NEW to new in bold
  • Loading branch information
JnnnLe authored and alodahl committed Sep 24, 2019
1 parent ece44f8 commit ef9ba22
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 7 additions & 4 deletions javascript/event-recommender-part2.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ Now that you've finished Part 1 and your Event Recommender class is complete, yo

4. You are required to *deploy* your completed project using Netlify or GitHub Pages. Send the links to your *GitHub repo* and *live site url*.

5. You are required to have a top-notch README.md with screenshots of your project in your GitHub project repo.
5. You are required to have a top-notch README.md with screenshots of your project in your Github project repo. (Here is an example of a great README.md: https://gist.github.com/PurpleBooth/109311bb0361f32d87a2)


### UI Instructions

1. Create HTML and CSS files. In your HTML file, add a script tag that includes your existing JavaScript file that defines your EventRecommender and other classes. Then create a new file, `jQuery-scripts.js`, and add it via a script tag after your other script tag.
1. Create HTML and CSS files. In your HTML file, add a script tag that includes your existing JavaScript file that defines your EventRecommender and other classes. Then create a **new** file, `jQuery-scripts.js`, and add it via a script tag after your other script tag. (It is important that your classes and jQuery are seperate Javascript files, because you will only run Jasmine test on your classes, not your jQuery code.)

2. In this new `jQuery-scripts` file, create a user interface with *jQuery* for *each* of the following methods:

Expand All @@ -43,10 +44,12 @@ Now that you've finished Part 1 and your Event Recommender class is complete, yo

### Instructions for adding tests

1. Go back to your original JavaScript file where you defined your EventRecommender, Event, and User classes. Refamiliarize yourself with what you did here. We will be adding *Jasmine tests* for each function defined in your EventRecommender. In the bottom of this file, add the line: `module.exports = EventRecommender;`
1. Go back to your EventRecommender file where User, Event, and EventRecommnder classes are defined, refamiliarize yourself with what you did here. We will be adding *Jasmine tests* for each function defined in your EventRecommender. In the bottom of this file, add the line: `module.exports = EventRecommender;`
2. Run `npm install jasmine -g` (it will install Jasmine globally)
3. In your project root, run `jasmine init` (it will initialize Jasmine in your project, creates `jasmine.json` with Jasmine settings)
4. In the new `spec` folder created after you ran `jasmine init`, make a new file called `EventRecommenderSpec.js` and copy the code from https://github.com/Techtonica/curriculum/blob/master/javascript/starter-code.js into it. The only JavaScript file Jasmine should look at is your original JavaScript file. (You don't have to test your jQuery scripts in this exercise.)
4. In the new `spec` folder created after you ran `jasmine init`, make a new file called `EventRecommenderSpec.js` and copy the code from https://gist.github.com/vvscode/bafbddadf455ac52e8149bc36b8c7c48 into it. The only JavaScript file Jasmine should look at is your original JavaScript file. (You don't have to test your jQuery scripts in this exercise.)
5. In your project root, run `jasmine` (it will start your tests).
6. You will fail a lot of them, but it is your responsiblitiy to fix them. Every time you fail one, debug it and run `jasmine` again to check your tests.

### Tips

Expand Down
2 changes: 2 additions & 0 deletions javascript/event-recommender.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ In this project, you'll build an EventRecommender System that will help you prac

### How to get Started
#### User Requirements
Create a JavaScript file for your class(es); it highly encouraged to make a User and Event class above and outside of your EventRecommender class.

When you instantiate an EventRecommender object, you should be able to do the following:

* Users:
Expand Down

0 comments on commit ef9ba22

Please sign in to comment.