Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Apifix #21

Open
wants to merge 108 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 19 commits
Commits
Show all changes
108 commits
Select commit Hold shift + click to select a range
5bfb675
should be able to do cucumber stuffs
Feb 25, 2020
8c9288b
Merge pull request #1 from Batch-697-Adam-Ranieri/domi
dmrochon Feb 25, 2020
3caa2f7
removed unnecessary documentation per Adam's request
khairston Feb 25, 2020
125b780
Merge pull request #2 from Batch-697-Adam-Ranieri/fix-documentation
khairston Feb 25, 2020
c0d8393
Added 2 feature files
Aaleyah4d Feb 25, 2020
cf3cdb5
Merge pull request #3 from Batch-697-Adam-Ranieri/Aaleyah
dmrochon Feb 25, 2020
8e66707
Added 5 feature files
SarahShinespark Feb 26, 2020
87f2f05
I added Another feature file and edited the ones i did
Aaleyah4d Feb 26, 2020
c9dcec4
Merge pull request #5 from Batch-697-Adam-Ranieri/Sarah
dmrochon Feb 26, 2020
cd4fa0e
Merge pull request #4 from Batch-697-Adam-Ranieri/Aaleyah
Aaleyah4d Feb 26, 2020
e59c70f
Rename and corrected little errors in the files
Aaleyah4d Feb 26, 2020
b3dfb24
added update car information feature and update membership feature
Feb 26, 2020
f10d1e0
Merge pull request #6 from Batch-697-Adam-Ranieri/Aaleyah
Aaleyah4d Feb 26, 2020
f3dab4b
Merge pull request #7 from Batch-697-Adam-Ranieri/dominique
anthonylucasmcarthur Feb 26, 2020
ccd617d
Merge pull request #8 from Batch-697-Adam-Ranieri/dev
WilliamFoltz Feb 26, 2020
1dceee3
Removal of errors
inamjr Feb 26, 2020
214cb55
Merge pull request #9 from Batch-697-Adam-Ranieri/origin/Anthony-ike
inamjr Feb 26, 2020
6eda6a2
commented out user controller test
inamjr Feb 26, 2020
58b5522
Merge pull request #10 from Batch-697-Adam-Ranieri/origin/Anthony-ike
damienfran Feb 26, 2020
31dd5bc
Hopeful temp fix to API issues
Hellorn Feb 26, 2020
041a456
Merge pull request #11 from Batch-697-Adam-Ranieri/apifix
WilliamFoltz Feb 26, 2020
b326383
added steps package and a Login Step Class
Feb 26, 2020
26e123b
Merge pull request #12 from Batch-697-Adam-Ranieri/dominique
dmrochon Feb 26, 2020
c235047
Um i didnt make changes but is said i did
Aaleyah4d Feb 26, 2020
9b46cdb
I started the steps file
Aaleyah4d Feb 27, 2020
f9bb296
Merge branch 'dev' into Aaleyah
SarahDellheim Feb 27, 2020
3b0c96b
Merge pull request #13 from Batch-697-Adam-Ranieri/Aaleyah
SarahDellheim Feb 27, 2020
dc0aa70
Merge pull request #14 from Batch-697-Adam-Ranieri/dev
WilliamFoltz Feb 27, 2020
b1c5bdb
changed yaml
WilliamFoltz Feb 27, 2020
cfd567e
Added 3 step files
SarahShinespark Feb 27, 2020
f7cd75d
Added a step and then some work on the Pages.java
Aaleyah4d Feb 27, 2020
3aab864
changed port in yml
WilliamFoltz Feb 27, 2020
6ed15ed
Merge pull request #18 from Batch-697-Adam-Ranieri/william
inamjr Feb 27, 2020
c6a1812
Merge pull request #17 from Batch-697-Adam-Ranieri/Aaleyah
Aaleyah4d Feb 27, 2020
ab55e08
created outline for riders page steps and 2 others
Feb 27, 2020
886c294
Merge branch 'dev' of https://github.com/Batch-697-Adam-Ranieri/rides…
SarahShinespark Feb 27, 2020
2718d84
Merge pull request #16 from Batch-697-Adam-Ranieri/Sarah
Aaleyah4d Feb 27, 2020
8ed59ab
Merge pull request #20 from Batch-697-Adam-Ranieri/dominique
Aaleyah4d Feb 27, 2020
ee7ef19
Added Documentation for OpenAPI
khairston Feb 27, 2020
2e32612
Merge branch 'dev' into fix-documentation
khairston Feb 27, 2020
4f529b2
Merge pull request #21 from Batch-697-Adam-Ranieri/fix-documentation
khairston Feb 27, 2020
ee8c963
Added annotations to homepage
SarahShinespark Feb 27, 2020
2a28a0e
Merge pull request #22 from Batch-697-Adam-Ranieri/Sarah
Aaleyah4d Feb 27, 2020
dca95f1
Update CarController.java
jmmancuso4 Feb 27, 2020
542ec5c
Added annotations to homepage and step implementation to loginsteps
SarahShinespark Feb 27, 2020
ed09034
Merge pull request #23 from Batch-697-Adam-Ranieri/carControllerFix
dmrochon Feb 27, 2020
cebf84f
Merge pull request #24 from Batch-697-Adam-Ranieri/Sarah
dmrochon Feb 27, 2020
a6bf083
Update DriverRegisterSteps.java
Aaleyah4d Feb 27, 2020
168af11
made local users
anthonylucasmcarthur Feb 27, 2020
a7f13a1
changes
anthonylucasmcarthur Feb 27, 2020
60dc44d
Merge branch 'dev' into making-local-users
anthonylucasmcarthur Feb 27, 2020
6cfa96b
Merge pull request #25 from Batch-697-Adam-Ranieri/Aaleyah
SarahDellheim Feb 27, 2020
e5c198a
finished almost all web elements
Feb 28, 2020
56aef96
Update DriverRegisterSteps.java
Aaleyah4d Feb 28, 2020
3d5b5b6
Merge pull request #27 from Batch-697-Adam-Ranieri/dominique
SarahDellheim Feb 28, 2020
b55ee37
Merge pull request #26 from Batch-697-Adam-Ranieri/making-local-users
WilliamFoltz Feb 28, 2020
5ec4060
Merge pull request #28 from Batch-697-Adam-Ranieri/Aaleyah
WilliamFoltz Feb 28, 2020
8eeb426
updated project
khairston Mar 2, 2020
6f01649
Merge branch 'dev' into import
khairston Mar 2, 2020
8c07175
Merge pull request #29 from Batch-697-Adam-Ranieri/import
khairston Mar 2, 2020
03d20ab
Fixed Service Deletes
khairston Mar 2, 2020
84b2b1d
Merge pull request #30 from Batch-697-Adam-Ranieri/import
rhtydv Mar 2, 2020
e7d00b9
added a simple maven project for test automation
Mar 2, 2020
7d04694
Merge pull request #31 from Batch-697-Adam-Ranieri/dominique
khairston Mar 2, 2020
0269667
relocated Documentation
khairston Mar 2, 2020
4d20f1f
Merge pull request #32 from Batch-697-Adam-Ranieri/import
khairston Mar 2, 2020
f4c35dd
solved login/adduser issue
khairston Mar 2, 2020
21d8de6
postmapping for login
khairston Mar 2, 2020
8dfbb5c
Merge pull request #33 from Batch-697-Adam-Ranieri/import
dmrochon Mar 2, 2020
9fce8b0
2nd attempt for the automation project
Mar 2, 2020
32f15f3
Update README.md
khairston Mar 2, 2020
11f534e
commented out encryption
khairston Mar 2, 2020
88b526d
updated readme
khairston Mar 2, 2020
b985282
readme
khairston Mar 2, 2020
e9194fc
readme
khairston Mar 2, 2020
45a503f
Merge pull request #34 from Batch-697-Adam-Ranieri/khairston-patch-1
rhtydv Mar 2, 2020
14b53c0
correct yaml file
khairston Mar 2, 2020
3ce40e6
Merge pull request #35 from Batch-697-Adam-Ranieri/khairston-patch-1
dmrochon Mar 2, 2020
a0fe9f8
Merge branch 'dev' of https://github.com/Batch-697-Adam-Ranieri/rides…
Mar 2, 2020
ec1f538
Merge pull request #36 from Batch-697-Adam-Ranieri/dominique
khairston Mar 2, 2020
27ca1e5
added more to drivers feature
Mar 2, 2020
e812538
deleted unused files
Mar 2, 2020
8ae0a47
removed useless files
Mar 2, 2020
fe97603
Merge pull request #37 from Batch-697-Adam-Ranieri/dominique
dmrochon Mar 2, 2020
d1f0318
New step within backend project
SarahShinespark Mar 2, 2020
7f156f8
Merge pull request #38 from Batch-697-Adam-Ranieri/Sarah
Aaleyah4d Mar 2, 2020
eb9fdcf
deleted the WebElements not used
Mar 2, 2020
a6ece73
Merge pull request #39 from Batch-697-Adam-Ranieri/dominique
rhtydv Mar 2, 2020
bd93542
Admin and then some stuffs on the homepage
Aaleyah4d Mar 2, 2020
6696e6e
Merge pull request #40 from Batch-697-Adam-Ranieri/Aaleyah
SarahDellheim Mar 2, 2020
8acc67c
deleted and added Web elements
Mar 2, 2020
b913231
added and deleted web elements
Mar 2, 2020
da7849a
added feature and web elements
Mar 2, 2020
ccf0bd6
modified driver feature file and added web elements to hompage class
Mar 3, 2020
d879291
Merge pull request #41 from Batch-697-Adam-Ranieri/dominique
khairston Mar 3, 2020
f295420
Postman test
WaluigiPR Mar 3, 2020
3a1d8ee
Postman at documentation
WaluigiPR Mar 3, 2020
ed02f2a
Merge pull request #42 from Batch-697-Adam-Ranieri/eliezer
rhtydv Mar 3, 2020
b61e965
Added rider steps for now
SarahShinespark Mar 3, 2020
16c2f4f
logging added
rhtydv Mar 3, 2020
25f9a52
Merge pull request #44 from Batch-697-Adam-Ranieri/Logging
anthonylucasmcarthur Mar 3, 2020
52eb7eb
Added Admin steps and changed some of the admin feature file
Aaleyah4d Mar 3, 2020
5fbd22b
Merge pull request #43 from Batch-697-Adam-Ranieri/Sarah
dmrochon Mar 3, 2020
b2dabee
Merge pull request #45 from Batch-697-Adam-Ranieri/Aaleyah
SarahDellheim Mar 3, 2020
a356e57
created steps for driver
Mar 3, 2020
3bd0847
Merge pull request #46 from Batch-697-Adam-Ranieri/dominique
SarahDellheim Mar 3, 2020
27f53a6
Merge pull request #47 from Batch-697-Adam-Ranieri/dev
Hellorn Mar 4, 2020
c9d8f54
Fixed controllers and added GSON dependency to force API key function…
Hellorn Mar 4, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 43 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,49 @@
<scope>runtime</scope>
</dependency>

<!-- add ons that may work -->
<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-java8</artifactId>
<version>4.2.0</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-spring</artifactId>
<version>4.2.0</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>io.cucumber</groupId>
<artifactId>cucumber-junit</artifactId>
<version>4.2.0</version>
<scope>test</scope>
</dependency>

<!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java -->
<dependency>
<groupId>org.seleniumhq.selenium</groupId>
<artifactId>selenium-java</artifactId>
<version>3.141.59</version>
</dependency>

<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-java</artifactId>
<version>1.2.4</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>info.cukes</groupId>
<artifactId>cucumber-junit</artifactId>
<version>1.2.4</version>
<scope>test</scope>
</dependency>


</dependencies>

</project>
7 changes: 7 additions & 0 deletions resources/login.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Feature:
Background: On homepage
Given: The user is on the Rideshare homepage
Scenario: User Logins in
When: The user clicks on Login Button
Then:

35 changes: 1 addition & 34 deletions src/main/java/com/revature/controllers/AdminController.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,67 +41,34 @@ public class AdminController {
@Autowired
private AdminService as;

/**
* HTTP GET method (/users)
*
* @return A list of all the admins.
*/

@ApiOperation(value="Returns all admins", tags= {"Admin"})
@GetMapping
public List<Admin> getAdmins() {

return as.getAdmins();
}

/**
* HTTP GET method (/users/{id})
*
* @param id represents the admin's id.
* @return An admin that matches the id.
*/

@ApiOperation(value="Returns admin by id", tags= {"Admin"})
@GetMapping("/{id}")
public Admin getAdminById(@PathVariable("id")int id) {

return as.getAdminById(id);
}

/**
* HTTP POST method (/users)
*
* @param admin represents the new Admin object being sent.
* @return The newly created object with a 201 code.
*/


@ApiOperation(value="Adds a new admin", tags= {"Admin"})
@PostMapping
public ResponseEntity<Admin> createAdmin(@Valid @RequestBody Admin admin) {

return new ResponseEntity<>(as.createAdmin(admin), HttpStatus.CREATED);
}

/**
* HTTP PUT method (/users)
*
* @param admin represents the updated Admin object being sent.
* @return The newly updated object.
*/

@ApiOperation(value="Updates admin by id", tags= {"Admin"})
@PutMapping("/{id}")
public Admin updateAdmin(@Valid @RequestBody Admin admin) {

return as.updateAdmin(admin);
}

/**
* HTTP DELETE method (/users/{id})
*
* @param id represents the admin's id.
* @return A string that says which admin was deleted.
*/

@ApiOperation(value="Deletes an admin by id", tags= {"Admin"})
@DeleteMapping("/{id}")
Expand Down
35 changes: 0 additions & 35 deletions src/main/java/com/revature/controllers/BatchController.java
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,6 @@ public class BatchController {
@Autowired
private BatchService bs;

/**
* HTTP GET method (/batches)
*
* @param location represents the batch location.
* @return A list of all the batches or batches by the location.
*/

@ApiOperation(value="Returns all batches", tags= {"Batch"}, notes="Can also filter by location")
@GetMapping
public List<Batch> getBatches(@RequestParam(name="location",required=false)String location) {
Expand All @@ -61,55 +54,27 @@ public List<Batch> getBatches(@RequestParam(name="location",required=false)Strin
return bs.getBatches();
}

/**
* HTTP GET method (/batches/{number})
*
* @param number represents the batch number.
* @return A batch that matches the number.
*/

@ApiOperation(value="Returns batch by number", tags= {"Batch"})
@GetMapping("/{number}")
public Batch getBatchByNumber(@PathVariable("number")int number) {

return bs.getBatchByNumber(number);
}

/**
* HTTP POST method (/batches)
*
* @param batch represents the new Batch object being sent.
* @return The newly created object with a 201 code.
*/

@ApiOperation(value="Adds a new batch", tags= {"Batch"})
@PostMapping
public ResponseEntity<Batch> addBatch(@Valid @RequestBody Batch batch) {

return new ResponseEntity<>(bs.addBatch(batch), HttpStatus.CREATED);
}

/**
* HTTP PUT method (/batches)
*
* @param batch represents the updated Batch object being sent.
* @return The newly updated object.
*/

@ApiOperation(value="Updates batch by number", tags= {"Batch"})
@PutMapping("/{number}")
public Batch updateBatch(@Valid @RequestBody Batch batch) {

return bs.updateBatch(batch);
}

/**
* HTTP DELETE method (/batches/{id})
*
* @param number represents the batch number.
* @return A string that says which batch was deleted.
*/

@ApiOperation(value="Deletes batch by number", tags= {"Batch"})
@DeleteMapping("/{number}")
public String deleteBatchByNumber(@PathVariable("number")int number) {
Expand Down
38 changes: 0 additions & 38 deletions src/main/java/com/revature/controllers/CarController.java
Original file line number Diff line number Diff line change
Expand Up @@ -41,39 +41,20 @@ public class CarController {
@Autowired
private CarService cs;

/**
* HTTP GET method (/cars)
*
* @return A list of all the cars.
*/

@ApiOperation(value="Returns all cars", tags= {"Car"})
@GetMapping
public List<Car> getCars() {

return cs.getCars();
}

/**
* HTTP GET method (/cars/{number})
*
* @param id represents the car's id.
* @return A car that matches the id.
*/

@ApiOperation(value="Returns car by id", tags= {"Car"})
@GetMapping("/{id}")
public Car getCarById(@PathVariable("id")int id) {

return cs.getCarById(id);
}

/**
* HTTP GET method (/cars/users/{userId})
*
* @param userId represents the user's id.
* @return A car that matches the user's id.
*/

@ApiOperation(value="Returns car by user id", tags= {"Car"})
@GetMapping("/users/{userId}")
Expand All @@ -82,12 +63,6 @@ public Car getCarByUserId(@PathVariable("userId")int userId) {
return cs.getCarByUserId(userId);
}

/**
* HTTP POST method (/cars)
*
* @param car represents the new Car object being sent.
* @return The newly created object with a 201 code.
*/

@ApiOperation(value="Adds a new car", tags= {"Car"})
@PostMapping
Expand All @@ -96,12 +71,6 @@ public ResponseEntity<Car> addCar(@Valid @RequestBody Car car) {
return new ResponseEntity<>(cs.addCar(car), HttpStatus.CREATED);
}

/**
* HTTP PUT method (/cars)
*
* @param car represents the updated Car object being sent.
* @return The newly updated object.
*/

@ApiOperation(value="Updates car by id", tags= {"Car"})
@PutMapping("/{id}")
Expand All @@ -110,13 +79,6 @@ public Car updateCar(@Valid @RequestBody Car car) {
return cs.updateCar(car);
}

/**
* HTTP DELETE method (/cars/{id})
*
* @param id represents the car's id.
* @return A string that says which car was deleted.
*/

@ApiOperation(value="Deletes car by id", tags= {"Car"})
@DeleteMapping("/{id}")
public String deleteCarById(@PathVariable("id")int id) {
Expand Down
48 changes: 0 additions & 48 deletions src/main/java/com/revature/controllers/UserController.java
Original file line number Diff line number Diff line change
Expand Up @@ -60,15 +60,6 @@ public class UserController {
@Autowired
private DistanceService ds;

/**
* HTTP GET method (/users)
*
* @param isDriver represents if the user is a driver or rider.
* @param username represents the user's username.
* @param location represents the batch's location.
* @return A list of all the users, users by is-driver, user by username and users by is-driver and location.
*/


/*@ApiOperation(value="Returns user drivers", tags= {"User"})
@GetMapping
Expand Down Expand Up @@ -114,15 +105,6 @@ public List <User> getTopFiveDrivers(@PathVariable("address")String address) thr

}

/**
* HTTP GET method (/users)
*
* @param isDriver represents if the user is a driver or rider.
* @param username represents the user's username.
* @param location represents the batch's location.
* @return A list of all the users, users by is-driver, user by username and users by is-driver and location.
*/

@ApiOperation(value="Returns all users", tags= {"User"}, notes="Can also filter by is-driver, location and username")
@GetMapping
public List<User> getUsers(@RequestParam(name="is-driver",required=false)Boolean isDriver,
Expand All @@ -140,29 +122,13 @@ public List<User> getUsers(@RequestParam(name="is-driver",required=false)Boolean
return us.getUsers();
}

/**
* HTTP GET (users/{id})
*
* @param id represents the user's id.
* @return A user that matches the id.
*/

@ApiOperation(value="Returns user by id", tags= {"User"})
@GetMapping("/{id}")
public User getUserById(@PathVariable("id")int id) {

return us.getUserById(id);
}

/**
* HTTP POST method (/users)
*
* @param user represents the new User object being sent.
* @return The newly created object with a 201 code.
*
* Sends custom error messages when incorrect input is used
*/

@ApiOperation(value="Adds a new user", tags= {"User"})
@PostMapping
public Map<String, Set<String>> addUser(@Valid @RequestBody User user, BindingResult result) {
Expand Down Expand Up @@ -264,27 +230,13 @@ else if (code.equals("Pattern") && field.equals("phoneNumber")) {

}

/**
* HTTP PUT method (/users)
*
* @param user represents the updated User object being sent.
* @return The newly updated object.
*/

@ApiOperation(value="Updates user by id", tags= {"User"})
@PutMapping
public User updateUser(@Valid @RequestBody User user) {
//System.out.println(user);
return us.updateUser(user);
}

/**
* HTTP DELETE method (/users)
*
* @param id represents the user's id.
* @return A string that says which user was deleted.
*/

@ApiOperation(value="Deletes user by id", tags= {"User"})
@DeleteMapping("/{id}")
public String deleteUserById(@PathVariable("id")int id) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public String getGoogleMAPKey() {
return entry.getValue();
}
}
return null;
return "AIzaSyBC1Ufex-AFP9O0IZGX3iHB1P_DKfaIqV0";
}


Expand Down
Binary file added src/main/resources/chromedriver.exe
Binary file not shown.
Loading