Skip to content

Commit

Permalink
Merge pull request #6 from Pasindu599/main
Browse files Browse the repository at this point in the history
Fixed Live Test File
  • Loading branch information
ThisaruGuruge authored Jan 17, 2025
2 parents 767c450 + 6d70ec3 commit 6e6f9a9
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions ballerina/tests/tests.bal
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,17 @@ final time:Utc currentUtc = time:utcNow();
string formId = "";

@test:Config {
groups: ["live_service_test"]
groups: ["live_service_test"],
enable: enableClient0auth2
}
isolated function testGetForm() returns error? {
CollectionResponseFormDefinitionBaseForwardPaging response = check baseClient->/.get();
test:assertTrue(response?.results.length() > 0);
}

@test:Config {
groups: ["live_service_test"]
groups: ["live_service_test"],
enable: enableClient0auth2
}
function testCreateForm() returns error? {
FormDefinitionBase response = check baseClient->/.post(
Expand Down Expand Up @@ -128,7 +130,8 @@ function testCreateForm() returns error? {

@test:Config {
dependsOn: [testCreateForm],
groups: ["live_service_test"]
groups: ["live_service_test"],
enable: enableClient0auth2
}
function testGetFormById() returns error? {
FormDefinitionBase response = check baseClient->/[formId]();
Expand All @@ -138,7 +141,8 @@ function testGetFormById() returns error? {

@test:Config {
dependsOn: [testCreateForm],
groups: ["live_service_test"]
groups: ["live_service_test"],
enable: enableClient0auth2
}
function testUpdateEntireForm() returns error? {
FormDefinitionBase response = check baseClient->/[formId].put(
Expand Down Expand Up @@ -219,7 +223,8 @@ function testUpdateEntireForm() returns error? {

@test:Config {
dependsOn: [testCreateForm],
groups: ["live_service_test"]
groups: ["live_service_test"],
enable: enableClient0auth2
}
function testUpdateForm() returns error? {
FormDefinitionBase response = check baseClient->/[formId].patch(
Expand All @@ -232,7 +237,8 @@ function testUpdateForm() returns error? {

@test:Config {
dependsOn: [testCreateForm],
groups: ["live_service_test"]
groups: ["live_service_test"],
enable: enableClient0auth2
}
function testDeleteForm() returns error? {
json response = check baseClient->/[formId].delete();
Expand Down

0 comments on commit 6e6f9a9

Please sign in to comment.