Skip to content

Commit

Permalink
test: adjusted client tests
Browse files Browse the repository at this point in the history
  • Loading branch information
abdul99ahad committed Feb 12, 2025
1 parent 17850a7 commit d38d0fd
Showing 1 changed file with 43 additions and 12 deletions.
55 changes: 43 additions & 12 deletions client/src/remote/__tests__/ZeebeAPISpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,13 @@ describe('<ZeebeAPI>', function() {
const zeebeAPI = new ZeebeAPI(backend);

const contactPoint = 'contactPoint';
const contactPointWithoutProtocol = 'contactPointWithoutProtocol';

const endpoint = {
targetType: ENDPOINT_TYPES.SELF_HOSTED,
authType: AUTH_TYPES.NONE,
contactPoint
contactPoint,
contactPointWithoutProtocol
};

// when
Expand All @@ -54,7 +56,8 @@ describe('<ZeebeAPI>', function() {
endpoint: {
type: ENDPOINT_TYPES.SELF_HOSTED,
authType: AUTH_TYPES.NONE,
url: contactPoint
url: contactPoint,
urlWithoutProtocol: contactPointWithoutProtocol
}
});
});
Expand All @@ -66,13 +69,15 @@ describe('<ZeebeAPI>', function() {
const zeebeAPI = new ZeebeAPI(backend);

const contactPoint = 'contactPoint';
const contactPointWithoutProtocol = 'contactPointWithoutProtocol';

const endpoint = {
targetType: ENDPOINT_TYPES.SELF_HOSTED,
authType: AUTH_TYPES.BASIC,
basicAuthUsername: 'username',
basicAuthPassword: 'password',
contactPoint
contactPoint,
contactPointWithoutProtocol
};

// when
Expand All @@ -84,6 +89,7 @@ describe('<ZeebeAPI>', function() {
type: ENDPOINT_TYPES.SELF_HOSTED,
authType: AUTH_TYPES.BASIC,
url: contactPoint,
urlWithoutProtocol: contactPointWithoutProtocol,
basicAuthUsername: 'username',
basicAuthPassword: 'password'
}
Expand All @@ -99,6 +105,7 @@ describe('<ZeebeAPI>', function() {
const targetType = ENDPOINT_TYPES.SELF_HOSTED;
const authType = AUTH_TYPES.OAUTH;
const contactPoint = 'contactPoint';
const contactPointWithoutProtocol = 'contactPointWithoutProtocol';
const oauthURL = 'oauthURL';
const audience = 'audience';
const scope = 'scope';
Expand All @@ -108,6 +115,7 @@ describe('<ZeebeAPI>', function() {
targetType,
authType,
contactPoint,
contactPointWithoutProtocol,
oauthURL,
audience,
scope,
Expand All @@ -124,6 +132,7 @@ describe('<ZeebeAPI>', function() {
type: ENDPOINT_TYPES.SELF_HOSTED,
authType: AUTH_TYPES.OAUTH,
url: contactPoint,
urlWithoutProtocol: contactPointWithoutProtocol,
oauthURL,
audience,
scope,
Expand All @@ -143,11 +152,13 @@ describe('<ZeebeAPI>', function() {
const camundaCloudClientId = 'camundaCloudClientId';
const camundaCloudClientSecret = 'camundaCloudClientSecret';
const camundaCloudClusterId = 'camundaCloudClusterId';
const camundaZeebeAddress = 'camundaZeebeAddress';
const endpoint = {
targetType,
camundaCloudClientId,
camundaCloudClientSecret,
camundaCloudClusterId
camundaCloudClusterId,
camundaZeebeAddress
};

// when
Expand All @@ -159,7 +170,8 @@ describe('<ZeebeAPI>', function() {
type: ENDPOINT_TYPES.CAMUNDA_CLOUD,
clientId: camundaCloudClientId,
clientSecret: camundaCloudClientSecret,
clusterId: camundaCloudClusterId
clusterId: camundaCloudClusterId,
urlWithoutProtocol: camundaZeebeAddress
}
});

Expand All @@ -176,13 +188,15 @@ describe('<ZeebeAPI>', function() {
const zeebeAPI = new ZeebeAPI(backend);

const contactPoint = 'contactPoint';
const contactPointWithoutProtocol = 'contactPointWithoutProtocol';

const processId = 'processId';

const endpoint = {
targetType: ENDPOINT_TYPES.SELF_HOSTED,
authType: AUTH_TYPES.NONE,
contactPoint
contactPoint,
contactPointWithoutProtocol
};

// when
Expand All @@ -197,7 +211,8 @@ describe('<ZeebeAPI>', function() {
endpoint: {
type: ENDPOINT_TYPES.SELF_HOSTED,
authType: AUTH_TYPES.NONE,
url: contactPoint
url: contactPoint,
urlWithoutProtocol: contactPointWithoutProtocol
}
});

Expand All @@ -215,14 +230,17 @@ describe('<ZeebeAPI>', function() {

const contactPoint = 'contactPoint';

const contactPointWithoutProtocol = 'contactPointWithoutProtocol';

const filePath = 'filePath';

const name = 'deployment';

const endpoint = {
targetType: ENDPOINT_TYPES.SELF_HOSTED,
authType: AUTH_TYPES.NONE,
contactPoint
contactPoint,
contactPointWithoutProtocol
};

// when
Expand All @@ -239,7 +257,8 @@ describe('<ZeebeAPI>', function() {
endpoint: {
type: ENDPOINT_TYPES.SELF_HOSTED,
authType: AUTH_TYPES.NONE,
url: contactPoint
url: contactPoint,
urlWithoutProtocol: contactPointWithoutProtocol
}
});

Expand All @@ -253,6 +272,8 @@ describe('<ZeebeAPI>', function() {

const contactPoint = 'contactPoint';

const contactPointWithoutProtocol = 'contactPointWithoutProtocol';

const filePath = 'filePath';

const name = 'deployment';
Expand All @@ -262,7 +283,8 @@ describe('<ZeebeAPI>', function() {
authType: AUTH_TYPES.BASIC,
basicAuthUsername: 'username',
basicAuthPassword: 'password',
contactPoint
contactPoint,
contactPointWithoutProtocol
};

// when
Expand All @@ -280,6 +302,7 @@ describe('<ZeebeAPI>', function() {
type: ENDPOINT_TYPES.SELF_HOSTED,
authType: AUTH_TYPES.BASIC,
url: contactPoint,
urlWithoutProtocol: contactPointWithoutProtocol,
basicAuthUsername: 'username',
basicAuthPassword: 'password'
}
Expand All @@ -294,6 +317,8 @@ describe('<ZeebeAPI>', function() {

const contactPoint = 'contactPoint';

const contactPointWithoutProtocol = 'contactPointWithoutProtocol';

const filePath = 'filePath';

const name = 'deployment';
Expand All @@ -304,6 +329,7 @@ describe('<ZeebeAPI>', function() {
targetType: ENDPOINT_TYPES.SELF_HOSTED,
authType: AUTH_TYPES.OAUTH,
contactPoint,
contactPointWithoutProtocol,
oauthURL: 'oauthURL',
audience: 'audience',
scope: 'scope',
Expand All @@ -328,6 +354,7 @@ describe('<ZeebeAPI>', function() {
type: ENDPOINT_TYPES.SELF_HOSTED,
authType: AUTH_TYPES.OAUTH,
url: contactPoint,
urlWithoutProtocol: contactPointWithoutProtocol,
oauthURL: 'oauthURL',
audience: 'audience',
scope: 'scope',
Expand All @@ -350,10 +377,13 @@ describe('<ZeebeAPI>', function() {

const contactPoint = 'contactPoint';

const contactPointWithoutProtocol = 'contactPointWithoutProtocol';

const endpoint = {
targetType: ENDPOINT_TYPES.SELF_HOSTED,
authType: AUTH_TYPES.NONE,
contactPoint
contactPoint,
contactPointWithoutProtocol
};

// when
Expand All @@ -364,7 +394,8 @@ describe('<ZeebeAPI>', function() {
endpoint: {
type: ENDPOINT_TYPES.SELF_HOSTED,
authType: AUTH_TYPES.NONE,
url: contactPoint
url: contactPoint,
urlWithoutProtocol: contactPointWithoutProtocol
}
});

Expand Down

0 comments on commit d38d0fd

Please sign in to comment.