-
Notifications
You must be signed in to change notification settings - Fork 3
End to End Test Plan
The following page outlines the end to end test plan for beLocal. It's important to note that these tests are only to do with UI/UX type scenarios (in other words, they do not include unit testing!) Please feel free to ping me on Slack if you feel any test cases are missing and I'll try to add them ASAP!
To run the current end to end test suite, please complete the following steps:
npm install -g protractor
webdriver-manager update
webdriver-manager start
- Navigate to the
/client/test/protractor
folder and runbash protractor.sh
If you only wish to run certain segments of the test cases, feel free to run these manually using the commands found in protractor.sh
. (For example, to run just farmer tests, use the command protractor facebook-farmer-tests
)
NOTE: This will wipe your database and create new foodies, farmers and superusers that will be used for testing purposes!
For a successful test case run, your output should look something like this: Note the green lines that show each test case has completed successfully. There should be no red blocks of text anywhere in the output of the test cases. If there is, that means one of your tests failed!
- Vendor Setup
- Register as a vendor with Facebook
- Register as a vendor without Facebook
- Check to make sure that clicking the Get Started button redirects to home page
- Check to make sure the Register as a Farmer drop down button redirects back to the welcome screen
- Check that attempting to register with the same Facebook account pops an error message
- Check that attempting to register with the same username causes an error message to be displayed
- Check that attempting to register with the same email causes an error message to be displayed
- Foodie Setup
- Register as a foodie with Facebook
- Register as a foodie without Facebook
- Check to make sure the Register as a Farmer drop down button redirects back to the welcome screen
- Check that attempting to register with the same Facebook account pops an error message
- Check that attempting to register with the same username causes an error message to be displayed
- Check that attempting to register with the same email causes an error message to be displayed
- Superuser Setup
- Register as a superuser without Facebook (the sign up method doesn't really matter here)
- Superuser Tests
- Log in as a superuser
- Activate a vendor
- Delete a vendor
- Farmer Tests
- Test sign in with Facebook
- Test sign in without Facebook
- Test editing of profile photo
- Test editing of user profile (company_name)
- Test editing of website URL
- Test joining/leaving markets
- Test creating one time custom locations
- Test editing one time custom locations (change description and make sure it saves)
- Test deletion of one time custom locations
- Test undoing the deletion of one time custom locations
- Test creating recurring custom locations
- Test editing recurring custom locations (change hours and make sure it saves)
- Test deleting recurring custom locations
- Test undoing the deletion of recurring custom locations
- Test creating a product (including uploading a product image)
- Test editing a product
- Test deleting a product
- Test undoing the deletion of a product
- Check that the My Profile button takes vendors back to their account
- Test that the Vendor Tour button starts the tour
- Test that vendors are able to log out
Before logging out in the above process, some products with different categories and tags should likely be created so that customer functionality can be tested.
- Foodie Tests
- Test sign in with Facebook
- Test sign in without Facebook
- Test filtering by category (including clicking All Products)
- Test filtering by a single tag (including clicking All Products)
- Test filtering by multiple tags
- Test filtering inside a category with a single tag
- Test filtering inside a category with multiple tags
- Test clicking tag in product details modal on Trending page
- Test liking/unliking of products
- Check that clicking vendor name on product card goes to vendor details page
- Check that clicking vendor name on vendor card goes to vendor details page
- Check that clicking product on vendor card opens product details modal
- Test clicking tag in product details modal on Producers page
- Test that clicking vendor name on map goes to vendor details page
- Test that clicking market name on market card goes to market details page
- Test that clicking market name on map goes to market details page
- Test liking of vendors on vendor details page
- Test liking of markets on market details page
- Test liking of markets on market cards
There are honestly so many more things we could test, but I think this is a pretty decent list to start with. Other things that I haven't listed, but are coming to mind include the following:
- Test for empty strings (i.e. "No markets to display!") displaying
- Test for maps displaying depending on ng-show/hide logic
- Test back button behaviour through various workflows