diff --git a/api-test/src/test/java/ish/oncourse/api/test/list/ListApiTest.java b/api-test/src/test/java/ish/oncourse/api/test/list/ListApiTest.java index 9ce50cc59b5..579795d7e21 100644 --- a/api-test/src/test/java/ish/oncourse/api/test/list/ListApiTest.java +++ b/api-test/src/test/java/ish/oncourse/api/test/list/ListApiTest.java @@ -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", diff --git a/api-test/src/test/resources/ish/oncourse/api/test/checkout/fullPaymentCycle.feature b/api-test/src/test/resources/ish/oncourse/api/test/checkout/fullPaymentCycle.feature index 5141680c0f9..585437b20d4 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/checkout/fullPaymentCycle.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/checkout/fullPaymentCycle.feature @@ -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 diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/account/delete.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/account/delete.feature index 8c05f8efbce..977a3e3a20f 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/account/delete.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/account/delete.feature @@ -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 @@ -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 @@ -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 diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/account/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/account/get.feature index a848cceb9ea..2e8577e0985 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/account/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/account/get.feature @@ -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"] @@ -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"] @@ -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" diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/account/post.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/account/post.feature index a66705589f7..475478d85f6 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/account/post.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/account/post.feature @@ -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 @@ -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 @@ -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 diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/account/put.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/account/put.feature index 30b01d275d7..f2354d61157 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/account/put.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/account/put.feature @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 @@ -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 diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/accountTransaction/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/accountTransaction/get.feature index 0adcbcdd45b..79e196b8e08 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/accountTransaction/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/accountTransaction/get.feature @@ -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"] @@ -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"] @@ -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" diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/application/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/application/get.feature index 38cb1fa0881..9e851c917e5 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/application/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/application/get.feature @@ -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"] @@ -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"] @@ -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" diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/articleProduct/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/articleProduct/get.feature index d64d0d912bf..8ea79012f16 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/articleProduct/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/articleProduct/get.feature @@ -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"] @@ -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"] diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/assessment/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/assessment/get.feature index b6d658db0e8..9586a876c14 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/assessment/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/assessment/get.feature @@ -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"] @@ -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"] diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/audit/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/audit/get.feature index 59f1d4c2729..3296f9a108e 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/audit/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/audit/get.feature @@ -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"] @@ -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"] @@ -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' @@ -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" @@ -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' diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/banking/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/banking/get.feature index 44de15f9f9d..e0799677b9f 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/banking/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/banking/get.feature @@ -15,7 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/banking' Given path ishPathList And param entity = 'Banking' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1000","1001"] @@ -31,7 +32,8 @@ Feature: Main feature for all GET requests with path 'list/entity/banking' Given path ishPathList And param entity = 'Banking' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1000","1001"] @@ -107,7 +109,8 @@ Feature: Main feature for all GET requests with path 'list/entity/banking' Given path ishPathList And param entity = 'Banking' - 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" diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/certificate/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/certificate/get.feature index 4bc4dd7d725..d023f061fad 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/certificate/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/certificate/get.feature @@ -15,7 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/certificate' Given path ishPathList And param entity = 'Certificate' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1000","1001","1002","1003","1004"] @@ -31,7 +32,8 @@ Feature: Main feature for all GET requests with path 'list/entity/certificate' Given path ishPathList And param entity = 'Certificate' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1000","1001","1002","1003","1004"] diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/contact/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/contact/get.feature index 73bc32cea1c..3a9daeebfe0 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/contact/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/contact/get.feature @@ -15,7 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/contact' Given path ishPathList And param entity = 'Contact' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1","2","3","4","5","6","7","8"] @@ -160,7 +161,8 @@ Feature: Main feature for all GET requests with path 'list/entity/contact' Given path ishPathList And param entity = 'Contact' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1","2","3","4","5","6","7","8"] diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/corporatepass/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/corporatepass/get.feature index 2a5399781b0..616808f5942 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/corporatepass/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/corporatepass/get.feature @@ -15,7 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/corporatepass' Given path ishPathList And param entity = 'CorporatePass' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1001", "1002"] @@ -31,7 +32,8 @@ Feature: Main feature for all GET requests with path 'list/entity/corporatepass' Given path ishPathList And param entity = 'CorporatePass' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1001", "1002"] @@ -105,7 +107,8 @@ Feature: Main feature for all GET requests with path 'list/entity/corporatepass' Given path ishPathList And param entity = 'CorporatePass' - 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" diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/course/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/course/get.feature index 922261cfd5d..ae3984beac7 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/course/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/course/get.feature @@ -15,7 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/course' Given path ishPathList And param entity = 'Course' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1","2","3","4"] @@ -64,7 +65,8 @@ Feature: Main feature for all GET requests with path 'list/entity/course' Given path ishPathList And param entity = 'Course' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1","2","3","4"] diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/courseClass/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/courseClass/get.feature index ce9fb1a82b9..0c599629759 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/courseClass/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/courseClass/get.feature @@ -15,7 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/courseClass' Given path ishPathList And param entity = 'CourseClass' - 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"] @@ -122,7 +123,8 @@ Feature: Main feature for all GET requests with path 'list/entity/courseClass' Given path ishPathList And param entity = 'CourseClass' - 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"] diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/definedTutorRole/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/definedTutorRole/get.feature index ad510960ce8..5aa90bd495c 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/definedTutorRole/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/definedTutorRole/get.feature @@ -15,7 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/definedTutorRo Given path ishPathList And param entity = 'DefinedTutorRole' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1","2","3","4","5","6","7"] @@ -31,7 +32,8 @@ Feature: Main feature for all GET requests with path 'list/entity/definedTutorRo Given path ishPathList And param entity = 'DefinedTutorRole' - When method GET + And request {} + When method POST Then status 200 diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/discount/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/discount/get.feature index 552fdf6ac07..417d394b8fc 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/discount/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/discount/get.feature @@ -15,7 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/discount' Given path ishPathList And param entity = 'Discount' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1001", "1002"] And match $.rows[*].values[2] contains ["discount2", "discount1"] @@ -32,7 +33,8 @@ Feature: Main feature for all GET requests with path 'list/entity/discount' Given path ishPathList And param entity = 'Discount' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1001", "1002"] And match $.rows[*].values[2] contains ["discount2", "discount1"] @@ -156,7 +158,8 @@ Feature: Main feature for all GET requests with path 'list/entity/discount' Given path ishPathList And param entity = 'Discount' - 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" diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/enrolment/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/enrolment/get.feature index 72bf038f5d1..189b3fe5d3b 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/enrolment/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/enrolment/get.feature @@ -15,7 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/enrolment' Given path ishPathList And param entity = 'Enrolment' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1","2","3","4","5","6","101","102","103","104","105","106","107"] @@ -31,7 +32,8 @@ Feature: Main feature for all GET requests with path 'list/entity/enrolment' Given path ishPathList And param entity = 'Enrolment' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1","2","3","4","5","6","101","102","103","104","105","106","107"] @@ -187,7 +189,8 @@ Feature: Main feature for all GET requests with path 'list/entity/enrolment' Given path ishPathList And param entity = 'Enrolment' - 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" diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/invoice/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/invoice/get.feature index 30f8f79e6b3..1583b216134 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/invoice/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/invoice/get.feature @@ -15,7 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/invoice' Given path ishPathList And param entity = 'AbstractInvoice' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1","2","101","3","4","5","6"] @@ -131,7 +132,8 @@ Feature: Main feature for all GET requests with path 'list/entity/invoice' Given path ishPathList And param entity = 'AbstractInvoice' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1","2","101","3","4","5","6"] @@ -147,7 +149,8 @@ Feature: Main feature for all GET requests with path 'list/entity/invoice' Given path ishPathList And param entity = 'Invoice' - 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" diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/membershipProduct/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/membershipProduct/get.feature index 2f7ac3cb31d..f3052bd35cc 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/membershipProduct/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/membershipProduct/get.feature @@ -15,7 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/membershipProd Given path ishPathList And param entity = 'MembershipProduct' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1003"] @@ -31,7 +32,8 @@ Feature: Main feature for all GET requests with path 'list/entity/membershipProd Given path ishPathList And param entity = 'MembershipProduct' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1003"] diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/message/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/message/get.feature index 67d4ed2dbe4..5af79447f06 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/message/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/message/get.feature @@ -15,7 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/message' Given path ishPathList And param entity = 'Message' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1000","1001","1002","1003"] @@ -31,7 +32,8 @@ Feature: Main feature for all GET requests with path 'list/entity/message' Given path ishPathList And param entity = 'Message' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1000","1001","1002","1003"] diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/module/delete.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/module/delete.feature index ab0fa078d70..44c7e7d89c0 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/module/delete.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/module/delete.feature @@ -24,7 +24,8 @@ Feature: Main feature for all DELETE requests with path 'list/entity/module' Given path ishPathList And param entity = 'Module' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[?(@.values == ["2","1","true"])].id @@ -36,7 +37,8 @@ Feature: Main feature for all DELETE requests with path 'list/entity/module' # <---> Verification of deleting Given path ishPathList And param entity = 'Module' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] !contains ["2"] @@ -55,7 +57,8 @@ Feature: Main feature for all DELETE requests with path 'list/entity/module' Given path ishPathList And param entity = 'Module' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[?(@.values == ["2","1","true"])].id @@ -77,7 +80,8 @@ Feature: Main feature for all DELETE requests with path 'list/entity/module' Given path ishPathList And param entity = 'Module' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] !contains ["2"] @@ -95,7 +99,8 @@ Feature: Main feature for all DELETE requests with path 'list/entity/module' Given path ishPathList And param entity = 'Module' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[?(@.values == ["2","1","true"])].id diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/module/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/module/get.feature index f4146033a21..127d9f700c7 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/module/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/module/get.feature @@ -15,7 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/module' Given path ishPathList And param entity = 'Module' - When method GET + And request {} + When method POST Then status 200 And match $ contains """ @@ -62,7 +63,8 @@ Feature: Main feature for all GET requests with path 'list/entity/module' Given path ishPathList And param entity = 'Module' - When method GET + And request {} + When method POST Then status 200 And match $ contains """ diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/module/post.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/module/post.feature index 194520baa30..f185064df48 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/module/post.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/module/post.feature @@ -22,7 +22,8 @@ Feature: Main feature for all POST requests with path 'list/entity/module' Given path ishPathList And param entity = 'Module' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["2"] @@ -48,7 +49,8 @@ Feature: Main feature for all POST requests with path 'list/entity/module' Given path ishPathList And param entity = 'Module' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["123456789012"] @@ -77,7 +79,8 @@ Feature: Main feature for all POST requests with path 'list/entity/module' Given path ishPathList And param entity = 'Module' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["notadmin_title1"] diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/module/put.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/module/put.feature index e48ffeb88b2..36572c13c58 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/module/put.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/module/put.feature @@ -38,7 +38,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/module' Given path ishPathList And param entity = 'Module' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["someCode"] @@ -122,7 +123,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/module' Given path ishPathList And param entity = 'Module' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["someCode"] @@ -206,7 +208,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/module' Given path ishPathList And param entity = 'Module' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["someCode"] @@ -289,7 +292,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/module' Given path ishPathList And param entity = 'Module' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["someCode"] @@ -429,7 +433,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/module' Given path ishPathList And param entity = 'Module' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["someCode"] @@ -499,7 +504,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/module' Given path ishPathList And param entity = 'Module' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["someCode"] @@ -563,7 +569,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/module' Given path ishPathList And param entity = 'Module' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["code123"] @@ -627,7 +634,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/module' Given path ishPathList And param entity = 'Module' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["someCode1"] @@ -744,7 +752,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/module' Given path ishPathList And param entity = 'Module' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["YYY"] @@ -808,7 +817,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/module' Given path ishPathList And param entity = 'Module' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["XXX"] diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/outcome/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/outcome/get.feature index 322699287a1..77964ab2639 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/outcome/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/outcome/get.feature @@ -15,7 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/outcome' Given path ishPathList And param entity = 'Outcome' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1","2","3","4","5","6","101","102","103","104","105","106","107","109"] @@ -31,7 +32,8 @@ Feature: Main feature for all GET requests with path 'list/entity/outcome' Given path ishPathList And param entity = 'Outcome' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1","2","3","4","5","6","101","102","103","104","105","106","107","109"] diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/paymentIn/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/paymentIn/get.feature index accbd7e76c4..6be725a2123 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/paymentIn/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/paymentIn/get.feature @@ -15,7 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/paymentIn' Given path ishPathList And param entity = 'PaymentIn' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1", "2", "101"] @@ -31,7 +32,8 @@ Feature: Main feature for all GET requests with path 'list/entity/paymentIn' Given path ishPathList And param entity = 'PaymentIn' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1", "2", "101"] @@ -118,7 +120,8 @@ Feature: Main feature for all GET requests with path 'list/entity/paymentIn' Given path ishPathList And param entity = 'Paymentin' - 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" diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/paymentOut/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/paymentOut/get.feature index ab3a4c164a3..68037c3a34b 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/paymentOut/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/paymentOut/get.feature @@ -15,7 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/paymentOut' Given path ishPathList And param entity = 'PaymentOut' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1000"] @@ -31,7 +32,8 @@ Feature: Main feature for all GET requests with path 'list/entity/paymentOut' Given path ishPathList And param entity = 'PaymentOut' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1000"] @@ -117,7 +119,8 @@ Feature: Main feature for all GET requests with path 'list/entity/paymentOut' Given path ishPathList And param entity = 'Paymentin' - 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" diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/payslip/delete.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/payslip/delete.feature index 9ac22d2872b..5855814b890 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/payslip/delete.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/payslip/delete.feature @@ -35,7 +35,8 @@ Feature: Main feature for all DELETE requests with path 'list/entity/payslip' Given path ishPathList And param entity = 'Payslip' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[7].id @@ -76,7 +77,8 @@ Feature: Main feature for all DELETE requests with path 'list/entity/payslip' Given path ishPathList And param entity = 'Payslip' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[7].id @@ -91,7 +93,8 @@ Feature: Main feature for all DELETE requests with path 'list/entity/payslip' Given path ishPathList And param entity = 'Payslip' - When method GET + And request {} + When method POST Then status 200 And match $.rows[7].values[5] == "Completed" # <-----> diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/payslip/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/payslip/get.feature index d3319b6a11d..8f4e5945eee 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/payslip/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/payslip/get.feature @@ -15,7 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/payslip' Given path ishPathList And param entity = 'Payslip' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1000","1001","1002","1003","1004","1005","1006"] @@ -31,7 +32,8 @@ Feature: Main feature for all GET requests with path 'list/entity/payslip' Given path ishPathList And param entity = 'Payslip' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1000","1001","1002","1003","1004","1005","1006"] @@ -95,7 +97,8 @@ Feature: Main feature for all GET requests with path 'list/entity/payslip' Given path ishPathList And param entity = 'Payslip' - 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" diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/payslip/marking/post.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/payslip/marking/post.feature index a7af52783f4..61bce5edca6 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/payslip/marking/post.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/payslip/marking/post.feature @@ -35,7 +35,8 @@ Feature: Main feature for all POST requests with path 'list/entity/payslip/marki Given path ishPathList And param entity = 'Payslip' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[7].id @@ -51,7 +52,8 @@ Feature: Main feature for all POST requests with path 'list/entity/payslip/marki Given path ishPathList And param entity = 'Payslip' - When method GET + And request {} + When method POST Then status 200 And match $.rows[7].values[5] == "Completed" @@ -79,7 +81,8 @@ Feature: Main feature for all POST requests with path 'list/entity/payslip/marki Given path ishPathList And param entity = 'Payslip' - When method GET + And request {} + When method POST Then status 200 And match $.rows[2].values[5] == "Paid/Exported" @@ -102,7 +105,8 @@ Feature: Main feature for all POST requests with path 'list/entity/payslip/marki Given path ishPathList And param entity = 'Payslip' - When method GET + And request {} + When method POST Then status 200 And match $.rows[1].values[5] == "Approved" @@ -119,7 +123,8 @@ Feature: Main feature for all POST requests with path 'list/entity/payslip/marki Given path ishPathList And param entity = 'Payslip' - When method GET + And request {} + When method POST Then status 200 And match $.rows[4].values[5] == "New" @@ -136,7 +141,8 @@ Feature: Main feature for all POST requests with path 'list/entity/payslip/marki Given path ishPathList And param entity = 'Payslip' - When method GET + And request {} + When method POST Then status 200 And match $.rows[5].values[5] == "Completed" @@ -153,7 +159,8 @@ Feature: Main feature for all POST requests with path 'list/entity/payslip/marki Given path ishPathList And param entity = 'Payslip' - When method GET + And request {} + When method POST Then status 200 And match $.rows[6].values[5] == "Paid/Exported" diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/payslip/post.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/payslip/post.feature index 9db41498051..58e889ffd1b 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/payslip/post.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/payslip/post.feature @@ -33,7 +33,8 @@ Feature: Main feature for all POST requests with path 'list/entity/payslip' Given path ishPathList And param entity = 'Payslip' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[7].id @@ -91,7 +92,8 @@ Feature: Main feature for all POST requests with path 'list/entity/payslip' Given path ishPathList And param entity = 'Payslip' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[7].id diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/payslip/put.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/payslip/put.feature index 6c8951049a5..983ece8f396 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/payslip/put.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/payslip/put.feature @@ -34,7 +34,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/payslip' Given path ishPathList And param entity = 'Payslip' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[7].id diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/priorLearning/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/priorLearning/get.feature index 15406e3498b..a4745bbccca 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/priorLearning/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/priorLearning/get.feature @@ -16,7 +16,8 @@ Feature: Main feature for all GET requests with path 'list/entity/priorLearning' Given path ishPathList And param entity = 'PriorLearning' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1001","1002"] @@ -164,7 +165,8 @@ Feature: Main feature for all GET requests with path 'list/entity/priorLearning' Given path ishPathList And param entity = 'PriorLearning' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1001","1002"] @@ -180,6 +182,7 @@ Feature: Main feature for all GET requests with path 'list/entity/priorLearning' Given path ishPathList And param entity = 'PriorLearning' - 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" diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/productItem/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/productItem/get.feature index d7eebddd43e..d9e459e5fc7 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/productItem/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/productItem/get.feature @@ -15,7 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/sales' Given path ishPathList And param entity = 'ProductItem' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1000", "1001", "1002", "1003", "1004"] @@ -31,7 +32,8 @@ Feature: Main feature for all GET requests with path 'list/entity/sales' Given path ishPathList And param entity = 'ProductItem' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1000", "1001", "1002", "1003", "1004"] diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/qualification/delete.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/qualification/delete.feature index 583e3e102f2..f94ecdb4ad5 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/qualification/delete.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/qualification/delete.feature @@ -24,7 +24,8 @@ Feature: Main feature for all DELETE requests with path 'list/entity/qualificati Given path ishPathList And param entity = 'Qualification' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[?(@.values == ["CODE01","someTitle","someLevel",null,"false"])].id @@ -37,7 +38,8 @@ Feature: Main feature for all DELETE requests with path 'list/entity/qualificati # <---> Verification of deleting Given path ishPathList And param entity = 'Qualification' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] !contains ["CODE01"] @@ -61,7 +63,8 @@ Feature: Main feature for all DELETE requests with path 'list/entity/qualificati Given path ishPathList And param entity = 'Qualification' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[?(@.values == ["CODE01","someTitle","someLevel",null,"false"])].id @@ -74,7 +77,8 @@ Feature: Main feature for all DELETE requests with path 'list/entity/qualificati # <---> Verification of deleting Given path ishPathList And param entity = 'Qualification' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] !contains ["CODE01"] @@ -103,7 +107,8 @@ Feature: Main feature for all DELETE requests with path 'list/entity/qualificati Given path ishPathList And param entity = 'Qualification' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[?(@.values == ["CODE01","someTitle","someLevel",null,"false"])].id diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/qualification/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/qualification/get.feature index 8a0d9892331..84015528ee4 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/qualification/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/qualification/get.feature @@ -15,7 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/qualification' Given path ishPathList And param entity = 'Qualification' - When method GET + And request {} + When method POST Then status 200 And match $ contains """ @@ -59,7 +60,8 @@ Feature: Main feature for all GET requests with path 'list/entity/qualification' Given path ishPathList And param entity = 'Qualification' - When method GET + And request {} + When method POST Then status 200 And match $ contains """ diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/qualification/post.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/qualification/post.feature index bbc6f2f981f..895c84dd214 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/qualification/post.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/qualification/post.feature @@ -31,7 +31,8 @@ Feature: Main feature for all POST requests with path 'list/entity/qualification Given path ishPathList And param entity = 'Qualification' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["CODE01"] @@ -65,7 +66,8 @@ Feature: Main feature for all POST requests with path 'list/entity/qualification Given path ishPathList And param entity = 'Qualification' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["A3A5A7A9A12A"] @@ -102,7 +104,8 @@ Feature: Main feature for all POST requests with path 'list/entity/qualification Given path ishPathList And param entity = 'Qualification' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["CODE01"] diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/qualification/put.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/qualification/put.feature index d1a45113ebc..80df6f8ca07 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/qualification/put.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/qualification/put.feature @@ -32,7 +32,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/qualification' Given path ishPathList And param entity = 'Qualification' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[?(@.values == ["CODE02","someTitle","someLevel",null,"false"])].id @@ -106,7 +107,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/qualification' Given path ishPathList And param entity = 'Qualification' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[?(@.values == ["CODE02","someTitle","someLevel",null,"false"])].id @@ -180,7 +182,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/qualification' Given path ishPathList And param entity = 'Qualification' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[?(@.values == ["CODE02","someTitle","someLevel",null,"false"])].id @@ -325,7 +328,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/qualification' Given path ishPathList And param entity = 'Qualification' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[?(@.values == ["CODE02","someTitle","someLevel",null,"false"])].id @@ -386,7 +390,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/qualification' Given path ishPathList And param entity = 'Qualification' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[?(@.values == ["CODE02","someTitle","someLevel",null,"false"])].id @@ -455,7 +460,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/qualification' Given path ishPathList And param entity = 'Qualification' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[?(@.values == ["CODE82","someTitle","someLevel",null,"false"])].id @@ -508,7 +514,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/qualification' Given path ishPathList And param entity = 'Qualification' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[?(@.values == ["CODE02","someTitle","someLevel",null,"false"])].id diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/room/delete.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/room/delete.feature index 5a67bee64e2..58d21684b82 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/room/delete.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/room/delete.feature @@ -34,7 +34,8 @@ Feature: Main feature for all DELETE requests with path 'list/entity/room' Given path ishPathList And param entity = 'Room' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[?(@.values == ["[]",null,"testRoom10","site1","100"])].id @@ -47,7 +48,8 @@ Feature: Main feature for all DELETE requests with path 'list/entity/room' # <---> Verification of deleting: Given path ishPathList And param entity = 'Room' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] !contains ["testRoom10"] @@ -76,7 +78,8 @@ Feature: Main feature for all DELETE requests with path 'list/entity/room' Given path ishPathList And param entity = 'Room' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[?(@.values == ["[]",null,"testRoom11","site1","100"])].id @@ -94,7 +97,8 @@ Feature: Main feature for all DELETE requests with path 'list/entity/room' # <---> Verification of deleting: Given path ishPathList And param entity = 'Room' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] !contains ["testRoom11"] @@ -123,7 +127,8 @@ Feature: Main feature for all DELETE requests with path 'list/entity/room' Given path ishPathList And param entity = 'Room' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[?(@.values == ["[]",null,"testRoom12","site1","100"])].id diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/room/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/room/get.feature index 6c9a960b2db..b3f4d0ddc51 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/room/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/room/get.feature @@ -15,7 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/room' Given path ishPathList And param entity = 'Room' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["room1","room2"] @@ -31,7 +32,8 @@ Feature: Main feature for all GET requests with path 'list/entity/room' Given path ishPathList And param entity = 'Room' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["room1","room2"] diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/room/post.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/room/post.feature index b8f0b1746b9..6aee10ad298 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/room/post.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/room/post.feature @@ -34,7 +34,8 @@ Feature: Main feature for all POST requests with path 'list/entity/room' Given path ishPathList And param entity = 'Room' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["testRoom1","site1","25"] @@ -92,7 +93,8 @@ Feature: Main feature for all POST requests with path 'list/entity/room' Given path ishPathList And param entity = 'Room' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["[]",null,"testRoom_2A15A18A21A24A27A30A33A36A39A42A45A48A51A54A57A60A63A66A69A72A75A78A81A84A87A90A93A96A100A104A108A112A116A120A124A128A132A136A140A144A148A150","site1","1234567890"] @@ -133,7 +135,8 @@ Feature: Main feature for all POST requests with path 'list/entity/room' Given path ishPathList And param entity = 'Room' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["[]","testRoom2","site1","25"] diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/room/put.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/room/put.feature index 6f0aa3d77f3..71099b8c06e 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/room/put.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/room/put.feature @@ -36,7 +36,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/room' Given path ishPathList And param entity = 'Room' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[?(@.values == ["[null]",null,"testRoom100","site1","25"])].id @@ -114,7 +115,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/room' Given path ishPathList And param entity = 'Room' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[?(@.values == ["[]",null,"testRoom101","site1","5"])].id @@ -178,7 +180,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/room' Given path ishPathList And param entity = 'Room' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[?(@.values == ["[]",null,"testRoom104","site1","5"])].id @@ -247,7 +250,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/room' Given path ishPathList And param entity = 'Room' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[?(@.values == ["[]",null,"testRoom105","site1","5"])].id @@ -311,7 +315,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/room' Given path ishPathList And param entity = 'Room' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[?(@.values == ["[]",null,"testRoom101","site1","5"])].id @@ -390,7 +395,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/room' Given path ishPathList And param entity = 'Room' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[?(@.values == ["[]",null,"testRoom101","site1","5"])].id @@ -448,7 +454,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/room' Given path ishPathList And param entity = 'Room' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[?(@.values == ["[]",null,"testRoom102","site1","5"])].id diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/script/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/script/get.feature index 97722e4e306..8d4176e74f1 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/script/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/script/get.feature @@ -14,7 +14,8 @@ Feature: Main feature for all GET requests with path 'list/entity/script' withou Given path ishPathList And param entity = 'Script' - When method GET + And request {} + When method POST Then status 200 And assert response.rows.length >= 46 @@ -23,8 +24,8 @@ Feature: Main feature for all GET requests with path 'list/entity/script' withou Given path ishPathList And param entity = 'Script' - And param pageSize = 1000 - When method GET + And request {pageSize: 1000} + When method POST Then status 200 * def row = get[0] response.rows[?(@.values[0] == 'VET Course completion survey')] * def id = row.id @@ -52,7 +53,8 @@ Feature: Main feature for all GET requests with path 'list/entity/script' withou Given path ishPathList And param entity = 'Script' - When method GET + And request {} + When method POST Then status 200 And assert response.rows.length >= 46 @@ -67,7 +69,8 @@ Feature: Main feature for all GET requests with path 'list/entity/script' withou Given path ishPathList And param entity = 'Script' - When method GET + And request {} + When method POST Then status 200 And assert response.rows.length >= 46 @@ -82,8 +85,8 @@ Feature: Main feature for all GET requests with path 'list/entity/script' withou Given path ishPathList And param entity = 'Script' - And param search = 'name == "send weekly finance summary report"' - When method GET + And request {search: 'name == "send weekly finance summary report"'} + When method POST Then status 200 * def id = response.rows[0].id diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/site/delete.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/site/delete.feature index d58633b6f31..5c4ec3c12b6 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/site/delete.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/site/delete.feature @@ -47,7 +47,8 @@ Feature: Main feature for all DELETE requests with path 'list/entity/site' Given path ishPathList And param entity = 'Site' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["someSite10","Adelaide","5000","true"] @@ -61,7 +62,8 @@ Feature: Main feature for all DELETE requests with path 'list/entity/site' # <---> Verification of deleting: Given path ishPathList And param entity = 'Site' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] !contains ["someSite10"] @@ -103,7 +105,8 @@ Feature: Main feature for all DELETE requests with path 'list/entity/site' Given path ishPathList And param entity = 'Site' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["someSite11","Adelaide","5000","true"] @@ -122,7 +125,8 @@ Feature: Main feature for all DELETE requests with path 'list/entity/site' # <---> Verification deleting: Given path ishPathList And param entity = 'Site' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] !contains ["someSite11"] @@ -164,7 +168,8 @@ Feature: Main feature for all DELETE requests with path 'list/entity/site' Given path ishPathList And param entity = 'Site' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["someSite12","Adelaide","5000","true"] diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/site/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/site/get.feature index c45e98993c8..f0c3d49cc2e 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/site/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/site/get.feature @@ -15,7 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/site' Given path ishPathList And param entity = 'Site' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["site1","Default site"] @@ -31,7 +32,8 @@ Feature: Main feature for all GET requests with path 'list/entity/site' Given path ishPathList And param entity = 'Site' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["site1","Default site"] @@ -41,7 +43,8 @@ Feature: Main feature for all GET requests with path 'list/entity/site' Given path ishPathList And param entity = 'Site' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["site1"] @@ -94,7 +97,8 @@ Feature: Main feature for all GET requests with path 'list/entity/site' # <---> Given path ishPathList And param entity = 'Site' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["site1"] diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/site/post.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/site/post.feature index 936648d8fb9..0871a8ef065 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/site/post.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/site/post.feature @@ -46,7 +46,8 @@ Feature: Main feature for all POST requests with path 'list/entity/site' Given path ishPathList And param entity = 'Site' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["someSite0"] @@ -131,7 +132,8 @@ Feature: Main feature for all POST requests with path 'list/entity/site' Given path ishPathList And param entity = 'Site' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].values[*] contains ["testSite_2A15A18A21A24A27A30A33A36A39A42A45A48A51A54A57A60A63A66A69A72A75A78A81A84A87A90A93A96A100A104A108A112A116A120A124A128A132A136A140A144A148A150","A3A5A7A9A12A15A18A21A24A27A30A33A36A39A42A45A48A51","1234567890","true"] diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/site/put.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/site/put.feature index 4ddbba8b707..5f77050feca 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/site/put.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/site/put.feature @@ -47,7 +47,8 @@ Feature: Main feature for all PUT requests with path 'list/entity/site' Given path ishPathList And param entity = 'Site' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[?(@.values == ["[]",null,"someSite100","Adelaide","5000","false"])].id diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/survey/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/survey/get.feature index 9b34bf96c99..6db727da6b0 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/survey/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/survey/get.feature @@ -15,7 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/survey' Given path ishPathList And param entity = 'Survey' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1000","1001","1002","1003","1004"] @@ -31,7 +32,8 @@ Feature: Main feature for all GET requests with path 'list/entity/survey' Given path ishPathList And param entity = 'Survey' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1000","1001","1002","1003","1004"] diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/voucherProduct/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/voucherProduct/get.feature index e45c19cbc18..4857fcf9661 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/voucherProduct/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/voucherProduct/get.feature @@ -15,7 +15,8 @@ Feature: Main feature for all GET requests with path 'list/entity/voucherProduct Given path ishPathList And param entity = 'VoucherProduct' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1002"] @@ -31,7 +32,8 @@ Feature: Main feature for all GET requests with path 'list/entity/voucherProduct Given path ishPathList And param entity = 'VoucherProduct' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1002"] diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/waitingList/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/waitingList/get.feature index 263a7c68b76..259ede7dcfd 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/entity/waitingList/get.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/entity/waitingList/get.feature @@ -16,7 +16,8 @@ Feature: Main feature for all GET requests with path 'list/entity/waitingList' Given path ishPathList And param entity = 'WaitingList' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1001","1000"] @@ -71,7 +72,8 @@ Feature: Main feature for all GET requests with path 'list/entity/waitingList' Given path ishPathList And param entity = 'WaitingList' - When method GET + And request {} + When method POST Then status 200 And match $.rows[*].id contains ["1001","1000"] @@ -87,7 +89,8 @@ Feature: Main feature for all GET requests with path 'list/entity/waitingList' Given path ishPathList And param entity = 'WaitingList' - 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" diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/get.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/get.feature deleted file mode 100644 index f1818cefb06..00000000000 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/get.feature +++ /dev/null @@ -1,178 +0,0 @@ -@parallel=false -Feature: Main feature for all GET requests with path 'list' - - Background: Authorize first - * configure headers = { Authorization: 'admin' } - * url 'https://127.0.0.1:8182/a/v1' - * def ishPath = 'list' - * def ishPathLogin = 'login' - - - - - Scenario: (+) Get list for each entity by admin - - * table getListOfEntity - - | entity | - | 'Account' | - | 'AccountTransaction' | - | 'Audit' | - | 'Banking' | - | 'CorporatePass' | - | 'Discount' | - | 'AbstractInvoice' | - | 'Module' | - | 'Qualification' | - | 'Payslip' | - | 'Room' | - | 'Script' | - | 'Site' | - | 'Document' | - | 'WaitingList' | - | 'Application' | - | 'ArticleProduct' | - | 'MembershipProduct' | - | 'VoucherProduct' | - | 'Certificate' | - | 'Survey' | - | 'Outcome' | - | 'ProductItem' | - | 'Message' | - | 'Enrolment' | - | 'Assessment' | - | 'PaymentIn' | - | 'PaymentOut' | - | 'Course' | - | 'CourseClass' | - | 'Contact' | - | 'PriorLearning' | - - * call read('getListOfEntity.feature') getListOfEntity - - - - Scenario: (+) Get list for each entity by notadmin with access rights View - - Given path '/logout' - And request {} - When method PUT - -# <---> Login as notadmin - * configure headers = { Authorization: 'UserWithRightsDelete'} - - -# <---> - - * table getListOfEntity - - | entity | - | 'Account' | - | 'AccountTransaction' | - | 'Audit' | - | 'Banking' | - | 'CorporatePass' | - | 'Discount' | - | 'AbstractInvoice' | - | 'Module' | - | 'Qualification' | - | 'Payslip' | - | 'Room' | - | 'Script' | - | 'Site' | - | 'Document' | - | 'WaitingList' | - | 'Application' | - | 'ArticleProduct' | - | 'MembershipProduct' | - | 'VoucherProduct' | - | 'Certificate' | - | 'Survey' | - | 'Outcome' | - | 'ProductItem' | - | 'Message' | - | 'Enrolment' | - | 'Assessment' | - | 'PaymentIn' | - | 'PaymentOut' | - | 'Course' | - | 'CourseClass' | - | 'Contact' | - | 'PriorLearning' | - - * call read('getListOfEntity.feature') getListOfEntity - - - - Scenario: (+) Get list for each entity by notadmin with access rights Hide - - Given path '/logout' - And request {} - When method PUT - -# <---> Login as notadmin - * configure headers = { Authorization: 'UserWithRightsView'} - - -# <---> - - * table getListOfEntity - - | entity | - | 'Audit' | - | 'Module' | - | 'Qualification' | - | 'Room' | - | 'Script' | - | 'Site' | - | 'Document' | - | 'Application' | - | 'ArticleProduct' | - | 'MembershipProduct' | - | 'VoucherProduct' | - | 'Survey' | - | 'ProductItem' | - | 'Message' | - | 'Assessment' | - | 'Course' | - | 'CourseClass' | - | 'Contact' | - - * call read('getListOfEntity.feature') getListOfEntity - - - - Scenario: (-) Get list for each entity by notadmin without access rights - - Given path '/logout' - And request {} - When method PUT - -# <---> Login as notadmin - * configure headers = { Authorization: 'UserWithRightsHide'} - - -# <---> - - * table getListOfEntity - - | entity | - | 'Account' | - | 'AccountTransaction' | - | 'Audit' | - | 'Banking' | - | 'CorporatePass' | - | 'Discount' | - | 'AbstractInvoice' | - | 'Payslip' | - | 'WaitingList' | - | 'Application' | - | 'Certificate' | - | 'Outcome' | - | 'Enrolment' | - | 'PaymentIn' | - | 'PaymentOut' | - | 'PriorLearning' | - - * call read('getListOfEntityWithoutRights.feature') getListOfEntity - diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/getListOfEntity.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/getListOfEntity.feature deleted file mode 100644 index 66c6af5d9da..00000000000 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/getListOfEntity.feature +++ /dev/null @@ -1,14 +0,0 @@ -@ignore -@parallel=false -Feature: Re-usable feature to get list for each entity using GET request - - - Scenario: - - * url 'https://127.0.0.1:8182/a/v1' - - Given path ishPath - And param entity = entity - When method GET - Then status 200 - And match $.entity == entity diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/getListOfEntityWithoutRights.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/getListOfEntityWithoutRights.feature deleted file mode 100644 index d313534bd5a..00000000000 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/getListOfEntityWithoutRights.feature +++ /dev/null @@ -1,15 +0,0 @@ -@ignore -@parallel=false -Feature: Re-usable feature to get list for each entity without access rights - - - Scenario: - - * url 'https://127.0.0.1:8182/a/v1' - - Given path ishPath - And param entity = entity - When method GET - Then status 403 - And match $.errorMessage contains "Sorry, you have no permissions" - diff --git a/api-test/src/test/resources/ish/oncourse/api/test/list/option/payroll/post.feature b/api-test/src/test/resources/ish/oncourse/api/test/list/option/payroll/post.feature index e49453ab6eb..59c5f66d55c 100644 --- a/api-test/src/test/resources/ish/oncourse/api/test/list/option/payroll/post.feature +++ b/api-test/src/test/resources/ish/oncourse/api/test/list/option/payroll/post.feature @@ -55,7 +55,8 @@ Feature: Main feature for all POST requests with path 'list/option/payroll' # <---> Define if for created entity: Given path ishPathList And param entity = 'Payslip' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[7].id @@ -124,7 +125,8 @@ Feature: Main feature for all POST requests with path 'list/option/payroll' # <---> Define if for created entity: Given path ishPathList And param entity = 'Payslip' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[7].id @@ -197,7 +199,8 @@ Feature: Main feature for all POST requests with path 'list/option/payroll' # <---> Define if for created entity: Given path ishPathList And param entity = 'Payslip' - When method GET + And request {} + When method POST Then status 200 * def id = get[0] response.rows[7].id diff --git a/client-html/src/js/common/services/EntityService.ts b/client-html/src/js/common/services/EntityService.ts index 3dc096232ca..3c110712809 100644 --- a/client-html/src/js/common/services/EntityService.ts +++ b/client-html/src/js/common/services/EntityService.ts @@ -66,10 +66,6 @@ class EntityService { return this.entityApi.updateTableModel(entity, model); } - public getRecords(entity: string, search: string): Promise { - return this.entityApi.get(entity, search, PLAIN_LIST_MAX_PAGE_SIZE, 0); - } - public getRecordsByListSearch(entity: EntityName, search: SearchQuery): Promise { return this.entityApi.getAll(entity, { ...search, pageSize: PLAIN_LIST_MAX_PAGE_SIZE, offset: 0 }); } diff --git a/server-api/src/main/resources/path/list/api.yaml b/server-api/src/main/resources/path/list/api.yaml index 6b5f1e1fff7..428bd83df07 100644 --- a/server-api/src/main/resources/path/list/api.yaml +++ b/server-api/src/main/resources/path/list/api.yaml @@ -1,46 +1,3 @@ -get: - operationId: get - description: gets entities in a list - tags: - - Entity - parameters: - - name: entity - in: query - required: true - type: string - description: The onCourse entity name that you wish to get - example: Course - - name: search - in: query - required: false - type: string - description: a seach query to filter results. Entities that match this query are returned - example: | - search="action in ('create', 'update') & entityIdentifier = 'Enrolment' & entityId in (1, 2)" - - name: pageSize - in: query - required: false - type: number - example: 50 - description: returned list size - - name: offset - in: query - required: false - type: number - example: 100 - description: selected list offset - responses: - '200': - description: Success response. - schema: - $ref: './def/list/DataResponse.yaml' - default: - description: Unexpected error - x-permission: - mask: view - keyCode: LAZY/entity - errorMessage: Sorry, you have no permissions to view this entity. Please contact your administrator - post: operationId: getAll description: gets entities in a list diff --git a/server/src/main/groovy/ish/oncourse/server/api/v1/service/impl/EntityApiImpl.groovy b/server/src/main/groovy/ish/oncourse/server/api/v1/service/impl/EntityApiImpl.groovy index a4cd7f7c5ad..699a1f37518 100644 --- a/server/src/main/groovy/ish/oncourse/server/api/v1/service/impl/EntityApiImpl.groovy +++ b/server/src/main/groovy/ish/oncourse/server/api/v1/service/impl/EntityApiImpl.groovy @@ -75,11 +75,6 @@ class EntityApiImpl implements EntityApi { bulkChangeApiService.bulkDelete(entity, dto) } - @Override - DataResponseDTO get(String entity, String search, BigDecimal pageSize, BigDecimal offset) { - return getAll(entity, new SearchQueryDTO(search: search, pageSize: pageSize, offset: offset)) - } - @Override DataResponseDTO getAll(String entity, SearchQueryDTO request) { DataResponseDTO response = createResponse(entity, request) diff --git a/server/src/main/java/ish/oncourse/server/security/api/permission/LazyApiPermission.java b/server/src/main/java/ish/oncourse/server/security/api/permission/LazyApiPermission.java index f8cfe2527d9..2ab9fbdd7de 100644 --- a/server/src/main/java/ish/oncourse/server/security/api/permission/LazyApiPermission.java +++ b/server/src/main/java/ish/oncourse/server/security/api/permission/LazyApiPermission.java @@ -108,6 +108,7 @@ public class LazyApiPermission extends ApiPermission { KEY_CODE_MAP.put(TutorAttendance.class.getSimpleName().toLowerCase(), KeyCode.TUTOR_ATTENDANCE); KEY_CODE_MAP.put(PortalWebsite.class.getSimpleName().toLowerCase(), KeyCode.PORTAL_WEBSITE); KEY_CODE_MAP.put(Faculty.class.getSimpleName().toLowerCase(), KeyCode.FACULTY); + KEY_CODE_MAP.put(DefinedTutorRole.class.getSimpleName().toLowerCase(), KeyCode.TUTOR_ROLE); }