Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ public class ListApiTest {
public void test() {
Results results = Runner.builder().clientFactory(ish.oncourse.api.test.client.KarateClient::new).path( "classpath:ish/oncourse/api/test/list/column",
"classpath:ish/oncourse/api/test/list/plain",
"classpath:ish/oncourse/api/test/list/get.feature",
"classpath:ish/oncourse/api/test/list/getListOfEntity.feature",
"classpath:ish/oncourse/api/test/list/getListOfEntityWithoutRights.feature",
"classpath:ish/oncourse/api/test/list/post.feature",
"classpath:ish/oncourse/api/test/list/postListOfEntity.feature",
"classpath:ish/oncourse/api/test/list/postListOfEntityWithoutRights.feature",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,15 +108,15 @@ Feature: re-usable feature to performance of full payment cycle and delete all o

Given path ishPathList
And param entity = 'Outcome'
And param search = 'enrolment.id == ' + enrolmentId
When method GET
And request {search: '#("enrolment.id == " +enrolmentId)'}
When method POST
Then status 200
And match karate.sizeOf(response.rows) == outcomesCount

Given path ishPathList
And param entity = 'Course'
And param search = 'courseClasses.id == ' + classId
When method GET
And request {search: '#("courseClasses.id == " +classId)'}
When method POST
Then status 200
And def courseId = response.rows[0].id

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ Feature: Main feature for all DELETE requests with path 'list/entity/account'

Given path ishPathList
And param entity = 'Account'
When method GET
And request {}
When method POST
Then status 200

* def id = get[0] response.rows[?(@.values == ["code100","true","asset","some descriptions"])].id
Expand Down Expand Up @@ -71,7 +72,8 @@ Feature: Main feature for all DELETE requests with path 'list/entity/account'

Given path ishPathList
And param entity = 'Account'
When method GET
And request {}
When method POST
Then status 200

* def id = get[0] response.rows[?(@.values == ["code101","true","asset","some descriptions"])].id
Expand Down Expand Up @@ -119,7 +121,8 @@ Feature: Main feature for all DELETE requests with path 'list/entity/account'

Given path ishPathList
And param entity = 'Account'
When method GET
And request {}
When method POST
Then status 200

* def id = get[0] response.rows[?(@.values == ["code102","true","asset","some descriptions"])].id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/account'

Given path ishPathList
And param entity = 'Account'
When method GET
And request {}
When method POST
Then status 200
And match $.rows[*].id contains ["1","2","3","4","5","6","7","8","9","10","11","12"]

Expand All @@ -35,7 +36,8 @@ Feature: Main feature for all GET requests with path 'list/entity/account'

Given path ishPathList
And param entity = 'Account'
When method GET
And request {}
When method POST
Then status 200
And match $.rows[*].id contains ["1","2","3","4","5","6","7","8","9","10","11","12"]

Expand Down Expand Up @@ -115,7 +117,8 @@ Feature: Main feature for all GET requests with path 'list/entity/account'

Given path ishPathList
And param entity = 'Account'
When method GET
And request {}
When method POST
Then status 403
And match $.errorMessage == "Sorry, you have no permissions to view this entity. Please contact your administrator"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ Feature: Main feature for all POST requests with path 'list/entity/account'

Given path ishPathList
And param entity = 'Account'
When method GET
And request {}
When method POST
Then status 200

* def id = get[0] response.rows[?(@.values == ["code1","true","income","some descriptions"])].id
Expand Down Expand Up @@ -88,7 +89,8 @@ Feature: Main feature for all POST requests with path 'list/entity/account'

Given path ishPathList
And param entity = 'Account'
When method GET
And request {}
When method POST
Then status 200

* def id = get[0] response.rows[?(@.values == ["code2","false","asset","some descriptions"])].id
Expand Down Expand Up @@ -139,7 +141,8 @@ Feature: Main feature for all POST requests with path 'list/entity/account'

Given path ishPathList
And param entity = 'Account'
When method GET
And request {}
When method POST
Then status 200

* def id = get[0] response.rows[?(@.values == ["A3A5A7A9A12A15A18A21A24A27A30A33A36A39A4","true","asset","A3A5A7A9A12A15A18A21A24A27A30A33A36A39A42A45A48A51A54A57A60A63A66A69A72A75A78A81A84A87A90A93A96A100A104A108A112A116A120A124A128A132A136A140A144A148A152A156A160A164A168A172A176A180A184A188A192A196A200A204A208A212A216A220A224A228A232A236A240A244A248A252A256A260A264A268A272A276A280A284A288A292A296A300A304A308A312A316A320A324A328A332A336A340A344A348A352A356A360A364A368A372A376A380A384A388A392A396A400A404A408A412A416A420A424A428A432A436A440A444A448A452A456A460A464A468A472A476A480A484A488A492A496A500A"])].id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/account'

Given path ishPathList
And param entity = 'Account'
When method GET
And request {}
When method POST
Then status 200

* def id = get[0] response.rows[?(@.values == ["code1000","true","asset","some descriptions_1000"])].id
Expand Down Expand Up @@ -86,7 +87,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/account'

Given path ishPathList
And param entity = 'Account'
When method GET
And request {}
When method POST
Then status 200

* def id = get[0] response.rows[?(@.values == ["code1001","true","asset","some descriptions_1001"])].id
Expand Down Expand Up @@ -159,7 +161,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/account'

Given path ishPathList
And param entity = 'Account'
When method GET
And request {}
When method POST
Then status 200

* def id = get[0] response.rows[?(@.values == ["code1002","true","asset","some descriptions_1002"])].id
Expand Down Expand Up @@ -227,7 +230,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/account'

Given path ishPathList
And param entity = 'Account'
When method GET
And request {}
When method POST
Then status 200

* def id = get[0] response.rows[?(@.values == ["code1003","true","asset","some descriptions_1003"])].id
Expand Down Expand Up @@ -314,7 +318,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/account'

Given path ishPathList
And param entity = 'Account'
When method GET
And request {}
When method POST
Then status 200

* def id = get[0] response.rows[?(@.values == ["code1004","true","asset","some descriptions_1004"])].id
Expand Down Expand Up @@ -365,7 +370,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/account'

Given path ishPathList
And param entity = 'Account'
When method GET
And request {}
When method POST
Then status 200

* def id = get[0] response.rows[?(@.values == ["code1005","true","asset","some descriptions_1005"])].id
Expand Down Expand Up @@ -416,7 +422,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/account'

Given path ishPathList
And param entity = 'Account'
When method GET
And request {}
When method POST
Then status 200

* def id = get[0] response.rows[?(@.values == ["code1006","true","asset","some descriptions_1006"])].id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ Feature: Main feature for all GET requests with path 'list/entity/accountTransac
Scenario: (+) Get list of all account transactions by admin

Given path ishPathList
And param pageSize = 1000
And param entity = 'AccountTransaction'
When method GET
And request {pageSize: 1000}
When method pOST
Then status 200
And match $.rows[*].id contains ["104","103","102","101","28","27","26","25","24","23","22","21","20","19","18","17","16","15","14","13","12","11","10","9","8","7","6","5","4","3","2","1","118","117","116","115","114","113","112","111","110","109","108","107","106","105","208","207","206","205"]

Expand All @@ -27,9 +27,9 @@ Feature: Main feature for all GET requests with path 'list/entity/accountTransac
* configure headers = { Authorization: 'UserWithRightsView' }

Given path ishPathList
And param pageSize = 1000
And param entity = 'AccountTransaction'
When method GET
And request {pageSize: 1000}
When method POST
Then status 200
And match $.rows[*].id contains ["104","103","102","101","28","27","26","25","24","23","22","21","20","19","18","17","16","15","14","13","12","11","10","9","8","7","6","5","4","3","2","1","118","117","116","115","114","113","112","111","110","109","108","107","106","105","208","207","206","205"]

Expand Down Expand Up @@ -61,7 +61,8 @@ Feature: Main feature for all GET requests with path 'list/entity/accountTransac

Given path ishPathList
And param entity = 'AccountTransaction'
When method GET
And request {}
When method POST
Then status 403
And match $.errorMessage == "Sorry, you have no permissions to view this entity. Please contact your administrator"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/application'

Given path ishPathList
And param entity = 'Application'
When method GET
And request {}
When method POST
Then status 200
And match $.rows[*].id contains ["1000"]

Expand Down Expand Up @@ -72,7 +73,8 @@ Feature: Main feature for all GET requests with path 'list/entity/application'

Given path ishPathList
And param entity = 'Application'
When method GET
And request {}
When method POST
Then status 200
And match $.rows[*].id contains ["1000"]

Expand Down Expand Up @@ -132,7 +134,7 @@ Feature: Main feature for all GET requests with path 'list/entity/application'

Given path ishPathList
And param entity = 'Application'
When method GET
When method POST
Then status 403
And match $.errorMessage == "Sorry, you have no permissions to view this entity. Please contact your administrator"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/articleProduct

Given path ishPathList
And param entity = 'ArticleProduct'
When method GET
And request {}
When method POST
Then status 200
And match $.rows[*].id contains ["1001"]

Expand All @@ -31,7 +32,8 @@ Feature: Main feature for all GET requests with path 'list/entity/articleProduct

Given path ishPathList
And param entity = 'ArticleProduct'
When method GET
And request {}
When method POST
Then status 200
And match $.rows[*].id contains ["1001"]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/assessment'

Given path ishPathList
And param entity = 'Assessment'
When method GET
And request {}
When method POST
Then status 200
And match $.rows[*].id contains ["1000","1001"]

Expand Down Expand Up @@ -61,7 +62,8 @@ Feature: Main feature for all GET requests with path 'list/entity/assessment'

Given path ishPathList
And param entity = 'Assessment'
When method GET
And request {}
When method POST
Then status 200
And match $.rows[*].id contains ["1000","1001"]

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/audit'

Given path ishPathList
And param entity = 'Audit'
And param search = "id in ( 1, 2, 3 )"
When method GET
And request {search: 'id in ( 1, 2, 3 )'}
When method POST
Then status 200
And match $.rows[*].id contains ["3","2","1"]

Expand Down Expand Up @@ -47,17 +47,17 @@ Feature: Main feature for all GET requests with path 'list/entity/audit'
Given path '/logout'
And request {}
When method PUT

# <---> Login as notadmin
* configure headers = { Authorization: 'UserWithRightsView'}


# <--->

Given path ishPathList
And param entity = 'Audit'
And param search = "id in ( 1, 2, 3 )"
When method GET
And request {search: 'id in ( 1, 2, 3 )'}
When method POST
Then status 200
And match $.rows[*].id contains ["3","2","1"]

Expand All @@ -68,11 +68,11 @@ Feature: Main feature for all GET requests with path 'list/entity/audit'
Given path '/logout'
And request {}
When method PUT

# <---> Login as notadmin
* configure headers = { Authorization: 'UserWithRightsView'}


# <--->

Given path ishPath + '/2'
Expand All @@ -98,16 +98,16 @@ Feature: Main feature for all GET requests with path 'list/entity/audit'
Given path '/logout'
And request {}
When method PUT

# <---> Login as notadmin
* configure headers = { Authorization: 'UserWithRightsHide'}


# <--->

Given path ishPathList
And param entity = 'Audit'
When method GET
When method POST
Then status 403
And match $.errorMessage == "Sorry, you have no permissions to view this entity. Please contact your administrator"

Expand All @@ -118,11 +118,11 @@ Feature: Main feature for all GET requests with path 'list/entity/audit'
Given path '/logout'
And request {}
When method PUT

# <---> Login as notadmin
* configure headers = { Authorization: 'UserWithRightsHide'}


# <--->

Given path ishPath + '/1'
Expand Down
Loading
Loading