-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlab5.page.js
More file actions
29 lines (23 loc) · 1.31 KB
/
lab5.page.js
File metadata and controls
29 lines (23 loc) · 1.31 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
var Lab5 = function() {
var self = this;
//Your submitted/base URL should be of the form: xxx.xxx:3004
self.lab5URL = "/";
//Comments Form:
self.name = $('#name'); //The first input field for the name
self.comment = $('#comment'); //The second input field for their comment
//Buttons:
self.post = $('#postComment'); //Text can be anything, but this ID is for the button that will send the comment to the server
self.get = $('#getComments'); //Text can be anything, but this ID is for the button that will retrieve from the server
self.deleteAll = $('#deleteComments'); //Text can be anything, but this ID is for the button that will delete all the comments
//Output Divs:
self.jsonForm = $('#json'); //Displays something of the form: `{"Name":"Jordan","Comment":"HI"}`
self.statusSpot = $('#done'); //Displays success (or fail if it fails for some reason?)
self.commentsList = $('#comments'); //Displays the comments retrieved in the form: `Name: Jordan -- Comment: Hello There!`
//route URL (when appended to the base one)
self.commentRoute = "/comment"; //MUST work for all (GET, POST, DELETE)
}
module.exports = new Lab5();
/**
* For more information about the test driver used, check out: protractortest.org
* For information about page objects: http://www.protractortest.org/#/page-objects
*/