Skip to content

Commit

Permalink
SHIBUI-1740
Browse files Browse the repository at this point in the history
More test fixes.
  • Loading branch information
Bill Smith committed Jul 29, 2021
1 parent edaacfc commit 15cecc1
Show file tree
Hide file tree
Showing 5 changed files with 26 additions and 145 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import java.nio.file.Paths

//TODO: make config configurable
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = [ShibbolethUiApplication])
@ActiveProfiles(['dev'])
@ActiveProfiles(['dev', 'very-dangerous'])
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD, methodMode = DirtiesContext.MethodMode.AFTER_METHOD)
class SeleniumSIDETest extends Specification {
@Value('${local.server.port}')
Expand Down Expand Up @@ -127,11 +127,10 @@ class SeleniumSIDETest extends Specification {
'SHIBUI-1503: Non-admin can create metadata source' | '/SHIBUI-1503-1.side'
'SHIBUI-1503: User can be deleted' | '/SHIBUI-1503-2.side'
'SHIBUI-1503: User can be enabled' | '/SHIBUI-1503-3.side'*/
// 'SHIBUI-1740: Group can be created, edited, deleted' | '/SHIBUI-1740-1.side'
// 'SHIBUI-1740: Verify dev profile group membership' | '/SHIBUI-1740-2.side'
// 'SHIBUI-1740: Verify admin-owned resource not visible to nonadmins' | '/SHIBUI-1740-3.side'
// 'SHIBUI-1740: Verify nonadmin-owned resource visibility' | '/SHIBUI-1740-4.side'
'Test' | '/SHIBUI-1740-5.side'
'SHIBUI-1740: Group can be created, edited, deleted' | '/SHIBUI-1740-1.side'
'SHIBUI-1740: Verify dev profile group membership' | '/SHIBUI-1740-2.side'
'SHIBUI-1740: Verify admin-owned resource not visible to nonadmins' | '/SHIBUI-1740-3.side'
'SHIBUI-1740: Verify nonadmin-owned resource visibility' | '/SHIBUI-1740-4.side'
}
}

14 changes: 0 additions & 14 deletions backend/src/integration/resources/SHIBUI-1740-3.side
Original file line number Diff line number Diff line change
Expand Up @@ -52,27 +52,13 @@
["xpath=//p[2]/input", "xpath:position"]
],
"value": "${KEY_ENTER}"
}, {
"id": "3cbf8848-2e22-42cc-b5f9-aa289ad5cab6",
"comment": "",
"command": "pause",
"target": "5000",
"targets": [],
"value": ""
}, {
"id": "b64a0533-2175-4578-baeb-7ca4e97e0e23",
"comment": "",
"command": "open",
"target": "/api/heheheheheheheWipeout",
"targets": [],
"value": ""
}, {
"id": "70533c84-e78f-491e-aa4e-1c1e9f48b62e",
"comment": "",
"command": "pause",
"target": "5000",
"targets": [],
"value": ""
}, {
"id": "7580df7e-845d-4cf9-8ea8-116951d565fd",
"comment": "",
Expand Down
21 changes: 21 additions & 0 deletions backend/src/integration/resources/SHIBUI-1740-4.side
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,27 @@
["xpath=//p[2]/input", "xpath:position"]
],
"value": "${KEY_ENTER}"
}, {
"id": "d54e0170-3343-47d5-8541-b613372ef431",
"comment": "",
"command": "open",
"target": "/api/heheheheheheheWipeout",
"targets": [],
"value": ""
}, {
"id": "74ecfbbb-07d0-420f-abb9-895b68015645",
"comment": "",
"command": "assertText",
"target": "css=body",
"targets": [],
"value": "yes, you did it"
}, {
"id": "299da7ff-9249-4d12-82f8-492eb1739d2b",
"comment": "",
"command": "open",
"target": "/",
"targets": [],
"value": ""
}, {
"id": "6fb9efa3-c73e-4d27-82e6-28b25bf4fb60",
"comment": "",
Expand Down
124 changes: 0 additions & 124 deletions backend/src/integration/resources/SHIBUI-1740-5.side

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ public ResponseEntity<ErrorResponse> handleDatabaseConstraintViolation(Constrain

@ExceptionHandler(Exception.class)
public final ResponseEntity<ErrorResponse> handleAllOtherExceptions(Exception ex) {
System.err.println(ex);
ErrorResponse errorResponse = new ErrorResponse("400", ex.getLocalizedMessage(), ex.getCause() == null ? null : ex.getCause().getLocalizedMessage());
return new ResponseEntity<>(errorResponse, HttpStatus.BAD_REQUEST);
}
Expand Down

0 comments on commit 15cecc1

Please sign in to comment.