Skip to content

Commit cb6468c

Browse files
committed
Update README.
1 parent e588f48 commit cb6468c

File tree

1 file changed

+56
-30
lines changed

1 file changed

+56
-30
lines changed

README.md

Lines changed: 56 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ In this project you are given a web-based application that reads RSS feeds. The
55

66
## Why this Project?
77

8-
Testing is an important part of the development process and many organizations practice a standard of development known as "test-driven development". This is when developers write tests first, before they ever start developing their application. All the tests initially fail and then they start writing application code to make these tests pass.
8+
Testing is an important part of the development process and many organizations practice a standard of development known as "test-driven development." This is when developers write tests first, before they ever start developing their application. All the tests initially fail and then they start writing application code to make these tests pass.
99

1010
Whether you work in an organization that uses test-driven development or in an organization that uses tests to make sure future feature development doesn't break existing features, it's an important skill to have!
1111

@@ -17,32 +17,58 @@ You will learn how to use Jasmine to write a number of tests against a pre-exist
1717

1818
## How will this help my career?
1919

20-
* Writing effective tests requires analyzing multiple aspects of an application including the HTML, CSS and JavaScript - an extremely important skill when changing teams or joining a new company.
21-
* Good tests give you the ability to quickly analyze whether new code breaks an existing feature within your codebase, without having to manually test all of the functionality.
22-
23-
24-
# How will I complete this project?
25-
26-
Review the Feed Reader Testing [Project Rubric](https://review.udacity.com/#!/projects/3442558598/rubric)
27-
28-
1. Take the JavaScript Testing [course](https://www.udacity.com/course/ud549)
29-
2. Download the [required project assets](http://github.com/udacity/frontend-nanodegree-feedreader).
30-
3. Review the functionality of the application within your browser.
31-
4. Explore the application's HTML (**./index.html**), CSS (**./css/style.css**) and JavaScript (**./js/app.js**) to gain an understanding of how it works.
32-
5. Explore the Jasmine spec file in **./jasmine/spec/feedreader.js** and review the [Jasmine documentation](http://jasmine.github.io).
33-
6. Edit the `allFeeds` variable in **./js/app.js** to make the provided test fail and see how Jasmine visualizes this failure in your application.
34-
7. Return the `allFeeds` variable to a passing state.
35-
8. Write a test that loops through each feed in the `allFeeds` object and ensures it has a URL defined and that the URL is not empty.
36-
9. Write a test that loops through each feed in the `allFeeds` object and ensures it has a name defined and that the name is not empty.
37-
10. Write a new test suite named `"The menu"`.
38-
11. Write a test that ensures the menu element is hidden by default. You'll have to analyze the HTML and the CSS to determine how we're performing the hiding/showing of the menu element.
39-
12. Write a test that ensures the menu changes visibility when the menu icon is clicked. This test should have two expectations: does the menu display when clicked and does it hide when clicked again.
40-
13. Write a test suite named `"Initial Entries"`.
41-
14. Write a test that ensures when the `loadFeed` function is called and completes its work, there is at least a single `.entry` element within the `.feed` container.
42-
15. Write a test suite named `"New Feed Selection"`.
43-
16. Write a test that ensures when a new feed is loaded by the `loadFeed` function that the content actually changes.
44-
17. No test should be dependent on the results of another.
45-
18. Callbacks should be used to ensure that feeds are loaded before they are tested.
46-
19. Implement error handling for undefined variables and out-of-bound array access.
47-
20. When complete - all of your tests should pass.
48-
21. Write a README file detailing all steps required to successfully run the application. If you have added additional tests (for Udacious Test Coverage), provide documentation for what these future features are and what the tests are checking for.
20+
Writing effective tests requires analyzing multiple aspects of an application including the HTML, CSS and JavaScript - an extremely important skill when changing teams or joining a new company.
21+
22+
Good tests give you the ability to quickly analyze whether new code breaks an existing feature within your codebase, without having to manually test all of the functionality.
23+
24+
25+
# Development Strategy
26+
27+
For a refresher (or reference) before you begin writing code, we recommend reviewing the content from [JavaScript Testing](https://www.udacity.com/course/javascript-testing--ud549). Your project will be evaluated by a Udacity code reviewer according to the [Feed Reader Testing project rubric](https://review.udacity.com/#!/rubrics/18/view). Please review for detailed project requirements.
28+
29+
1. Familiarize yourself with the starter code
30+
* Open up `index.html` and review the functionality of the application within your browser
31+
* What is all the code in `app.js` doing? Be sure to read all code comments
32+
* Check out `style.css`. How is styling applied to the application?
33+
2. Explore the Jasmine spec file in `feedreader.js`
34+
* This is the file in which you'll be writing your tests
35+
* Make sure to read all code comments here as well
36+
* Review the [Jasmine documentation](http://jasmine.github.io) if needed
37+
3. Edit the `allFeeds` variable in `app.js` to make the provided test fail
38+
* See how Jasmine visualizes this failure in your application
39+
* Return the `allFeeds` variable to a passing state after reviewing the failed test
40+
4. Write a test that loops through each feed in the `allFeeds` object and ensures it has a URL defined _and_ that the URL is not empty
41+
* For example, how would you use a `for...of` loop in this test?
42+
5. Write a test that loops through each feed in the `allFeeds` object and ensures it has a name defined and that the name is not empty
43+
* Think about how you wrote the previous test. What are you testing for this time?
44+
6. Write a new test suite named `"The menu"`
45+
* What are you `describe`-ing in this test suite?
46+
7. Write a test that ensures the menu element is hidden by default
47+
* You'll have to analyze the HTML and the CSS to determine how the hiding/showing of the menu element is implemented
48+
* What code in `app.js` is directly involved with toggling the menu on and off?
49+
8. Write a test that ensures the menu changes visibility when the menu icon is clicked. This test should have two expectations: does the menu display itself when clicked, and does it hide when clicked again?
50+
* Think about how you wrote the previous test. What is different this time around?
51+
* Which clickable element are you checking for?
52+
* How do you "simulate" a mouse click that element without actually clicking it?
53+
9. Write a test suite named `"Initial Entries"`
54+
* What are you `describe`-ing in this test suite?
55+
10. Write a test that ensures when the `loadFeed` function is called and completes its work, there is at least a single `.entry` element within the `.feed` container
56+
* How does Jasmine's `beforeEach()`function work?
57+
* How does the `loadFeed()` function in `app.js` work? Is it synchronous or asynchronous?
58+
11. Write a test suite named `"New Feed Selection"`
59+
* What are you `describe`-ing in this test suite?
60+
12. Write a test that ensures when a new feed is loaded by the `loadFeed` function that the content actually changes
61+
* How is this test different from the previous test?
62+
63+
Additionally, note that:
64+
65+
* No test should be dependent on the results of another
66+
* Callbacks should be used to ensure that feeds are loaded before they are tested
67+
* Error handling should be implemented for undefined variables and out-of-bound array access
68+
* When complete, all of your tests should pass
69+
70+
When you're all finished, write a `README` file detailing all steps required to successfully run the application. If you have added additional tests, provide documentation for what these future features are and what the tests are checking for.
71+
72+
# Contributing
73+
74+
This repository is the starter code for _all_ Udacity students. Therefore, we most likely will not accept pull requests.

0 commit comments

Comments
 (0)