Testing - Nimisha94/cs5200_db_project GitHub Wiki
Clone the repository. Open it on WebStorm or any IDE. In the terminal, enter the project directory. Run the command 'npm install' to get the dependencies. Start mongo database in another terminal tab. Run the project by the command 'node server.js' In the browser, navigate to 'http://localhost:4000/#!/'
Users and their roles
- admin/admin - user with admin role
- alice/alice - user with production house role (regular logged in user)
- bob/bob - user with dealer role
- charlie/charlie - user with user role
Registering users
charlie/charlie
- Click on Register link in the upper right corner of the navbar
- Username-charlie Password-charlie Type of user - choose ‘User’ radio button Firstname - Charlie Lastname - Brown Address - LA
- Click on Register button
bob/bob
- Click on Register link in the upper right corner of the navbar
- Username-bob Password-bob Type of user - choose ‘Dealer’ radio button Dealer Name - Bob Marley Dealer Location - Malden, MA
- Click on Register button
alice/alice
- Click on Register link in the upper right corner of the navbar
- Username-alice Password-alice Type of user - choose ‘Production House’ radio button Production House Name - Alice Wonderland Address - LA
- Click on Register button
admin/admin
-
Click on Register link in the upper right corner of the navbar
-
Username-admin Password-admin Type of user - choose ‘Admin’ radio button
-
Click on Register button
-
A user related to a domain object
-
Login using alice/alice Choose ‘Production House’ radio button while logging in
-
Type the name ‘Harry Potter’ in the search box and click on ‘Search’ button
-
Click on the first search result displayed, which is ’Harry Potter and the Philosopher’s Stone’
-
Type 500 in Quantity text box and 10 in Cost per unit text box
-
Click on Add to Stock button (user added movie to stock - user to domain relation)
-
Click on logout
-
Login using bob/bob Choose ‘Dealer’ radio button while logging in
-
Type the name ‘Harry Potter’ in the search box and click on ‘Search’ button
-
Click on the first search result displayed, which is ’Harry Potter and the Philosopher’s Stone’
-
In the Available Production houses, you will see Charlie Brown listed.
-
Enter 50 in the text box and click Order now button
-
Click on the Cart link in the nav bar
-
The movie will be displayed in the cart page (user added movie to cart - user to domain relation)
-
Click on logout
-
-
A user related to another user
- Login using bob/bob Choose ‘Dealer’ radio button while logging in
- Click on Cart link in the nav bar. The movie which was added in Step 2 will be displayed on the cart page
- Click on Place Order button.
- An order confirmation page will be displayed.
- Click on Orders link on the nav bar. Order will be displayed with the status on its top saying ‘Order Placed’.
- Click on logout
- Login using alice/alice Choose ‘Production House’ while logging in
- Click on My Sold Items link on the nav bar
- An order will be displayed. Click on Approve Order button
- Click on Logout
- Login using bob/bob Choose ‘Dealer’ radio button while logging in
- Click on Orders link on the nav bar. Order will be displayed with the status on its top updated to ‘Delivered’.
- Click on logout
-
A user searches for a list of domain objects that match a criteria
- Login using charlie/charlie Choose ‘User’ radio button while logging in
- Type the name ‘Harry Potter’ in the search box and click on ‘Search’ button
- A list of search results appear that match the typed text
- Click on logout
-
A user views details of a particular domain object listed in the search results
- Login using charlie/charlie Choose ‘User’ radio button while logging in
- Type the name ‘Harry Potter’ in the search box and click on ‘Search’ button
- A list of search results appear that match the typed text
- Click on the first search result. A page with the details about the movie is shown.
- Click on logout
-
A user views all domain objects related to the user
- Login using bob/bob Choose ‘Dealer’ radio button while logging in
- Click on Orders link on the nav bar
- A page showing the previous order is shown. The status on top of it is Delivered
- Click logout
-
A user views all other users related to the user
- Login using alice/alice Choose ‘Production House’ radio button while logging in
- Click on Sold Items on the nav bar
- A list showing the orders from dealers is shown. (Production house sees a list of dealers who ordered their movies - user related to user)
- Click on logout
-
A domain object related to another domain object
- Login using charlie/charlie Choose ‘User’ radio button while logging in
- Type the name ‘Harry Potter’ in the search box and click on ‘Search’ button
- Click on the first search result displayed, which is ’Harry Potter and the Philosopher’s Stone’
- In the Available Dealers, you will see Bob Marley listed with 50 left (which were bought from Charlie Brown Production House) and Cost is 20% more than the price for which alice bought from charlie.($12)
- Enter 1 in the text box and click Add to Cart button
- Click on the Cart link in the nav bar
- The movie will be displayed in the cart page (movie is added to cart- domain to domain relation)
- Click on Place Order button
- An order confirmation page will be displayed.
- Click on Orders link on the nav bar. Order will be displayed with the status on its top saying ‘Order Placed’.
- Click on logout
- Login using bob/bob Choose ‘Dealer’ while logging in
- Click on My Sold Items link on the nav bar
- An order will be displayed. Click once on Approve Order button
- Click on Logout
- Login using charlie/charlie Choose ‘User’ radio button while logging in
- Click on Orders link on the nav bar. Order will be displayed with the status on its top updated to ‘Delivered’.
- Click on logout
-
An admin lists all users
- Login using admin/admin Choose ‘Admin’ radio button while logging in
- Choose ‘User’ radio button
- A table displaying users - admin and alice are displayed
- Choose ‘Dealer’ radio button
- A table displaying bob is displayed
- Choose ‘Production House’ radio button
- A table displaying charlie is displayed
- Click on logout
-
An admin edits/updates a particular user
- Login using admin/admin Choose ‘Admin’ radio button while logging in
- Choose ‘User’ radio button
- A table displaying users - admin and alice are displayed
- Click on the cog next to alice
- The details are copied onto the text boxes in the first row of the table.
- Change Alice’s last name to Wonder
- Click on the check on the first row
- Choose ‘User’ radio button
- In the table listed, Alice’s last name is updated to Wonder
- Click on logout
-
An admin creates a user
- Login using admin/admin Choose ‘Admin’ radio button while logging in
- Choose ‘User’ radio button
- A table displaying users - admin and alice are displayed
- Fill in the text boxes on the first row with these details- username - dan First name - Dan Last name - Wilson Password - dan Address - CA
- Click on the ‘plus’ sign in the first row.
- Choose ‘User’ radio button
- A table displaying users - admin, alice and dan is displayed. dan is the newly created user.
- Click on logout.
- Login using dan/dan Choose ‘User’ radio button while logging in
- Successfully logged in and shown the search page.
- Click on logout
-
An admin removes a user
- Login using admin/admin Choose ‘Admin’ radio button while logging in
- Choose ‘User’ radio button
- A table displaying users - admin, alice and dan is displayed.
- Click on the ‘delete’ icon present in dan’s row.
- Choose ‘User’ radio button
- A table displaying users - admin and alice are displayed. Dan has been removed.
- Click on logout