Skip to content

Commit 55e526c

Browse files
WIP 3
Signed-off-by: Lukasz Gryglicki <[email protected]> Assisted by [OpenAI](https://platform.openai.com/) Assisted by [GitHub Copilot](https://github.com/features/copilot)
1 parent 983690c commit 55e526c

File tree

9 files changed

+41
-43
lines changed

9 files changed

+41
-43
lines changed

tests/functional/cypress/e2e/cla-group.cy.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ describe("To Validate 'GET, CREATE, UPDATE and DELETE' CLA groups API call on ch
4646
}
4747
});
4848

49-
it('Creates a new CLA Group at child level - Record should Returns 200 Response', function () {
49+
it('Creates a new CLA Group at child level - Record should return 200 Response', function () {
5050
cy.request({
5151
method: 'POST',
5252
url: `${claEndpoint}/cla-group`,
@@ -103,7 +103,7 @@ describe("To Validate 'GET, CREATE, UPDATE and DELETE' CLA groups API call on ch
103103
});
104104
});
105105

106-
it('Get list of cla group associated with project - Record should Returns 200 Response', function () {
106+
it('Get list of cla group associated with project - Record should return 200 Response', function () {
107107
cy.request({
108108
method: 'GET',
109109
url: `${claEndpoint}/foundation/${projectSfid}/cla-groups`,
@@ -142,7 +142,7 @@ describe("To Validate 'GET, CREATE, UPDATE and DELETE' CLA groups API call on ch
142142
});
143143
});
144144

145-
it('Updates a CLA Group details - Record should Returns 200 Response', function () {
145+
it('Updates a CLA Group details - Record should return 200 Response', function () {
146146
cy.request({
147147
method: 'PUT',
148148
url: `${claEndpoint}/cla-group/${claGroupId}`,
@@ -168,7 +168,7 @@ describe("To Validate 'GET, CREATE, UPDATE and DELETE' CLA groups API call on ch
168168
});
169169
});
170170

171-
it('Enroll projects in a CLA Group - Record should Returns 200 Response', function () {
171+
it('Enroll projects in a CLA Group - Record should return 200 Response', function () {
172172
cy.request({
173173
method: 'PUT',
174174
url: `${claEndpoint}/cla-group/${claGroupId}/enroll-projects`,
@@ -206,7 +206,7 @@ describe("To Validate 'GET, CREATE, UPDATE and DELETE' CLA groups API call on ch
206206
});
207207
});
208208

209-
it('Unenroll projects in a CLA Group - Record should Returns 200 Response', function () {
209+
it('Unenroll projects in a CLA Group - Record should return 200 Response', function () {
210210
cy.request({
211211
method: 'PUT',
212212
url: `${claEndpoint}/cla-group/${claGroupId}/unenroll-projects`,
@@ -222,7 +222,7 @@ describe("To Validate 'GET, CREATE, UPDATE and DELETE' CLA groups API call on ch
222222
});
223223
});
224224

225-
it('Get list of Github organization associated with project - Record should Returns 200 Response', function () {
225+
it('Get list of Github organization associated with project - Record should return 200 Response', function () {
226226
cy.request({
227227
method: 'GET',
228228
url: `${claEndpoint}/project/${projectSfidOrg}/github/organizations`,
@@ -245,7 +245,7 @@ describe("To Validate 'GET, CREATE, UPDATE and DELETE' CLA groups API call on ch
245245
});
246246
});
247247

248-
it('Update GitHub Organization Configuration - Record should Returns 200 Response', function () {
248+
it('Update GitHub Organization Configuration - Record should return 200 Response', function () {
249249
cy.request({
250250
method: 'PUT',
251251
url: `${claEndpoint}/project/${projectSfidOrg}/github/organizations/${gitHubOrgName}/config`,
@@ -264,7 +264,7 @@ describe("To Validate 'GET, CREATE, UPDATE and DELETE' CLA groups API call on ch
264264
});
265265
});
266266

267-
it('Deletes the CLA Group - Record should Returns 204 Response', function () {
267+
it('Deletes the CLA Group - Record should return 204 Response', function () {
268268
if (claGroupId != null) {
269269
cy.request({
270270
method: 'DELETE',

tests/functional/cypress/e2e/docs.cy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('To Validate & get api-docs via API call', function () {
1515
}
1616
});
1717

18-
it('Endpoint to render the API documentation- Record should Returns 200 Response', function () {
18+
it('Endpoint to render the API documentation- Record should return 200 Response', function () {
1919
cy.request({
2020
method: 'GET',
2121
url: `${claEndpoint}/api-docs`,
@@ -28,7 +28,7 @@ describe('To Validate & get api-docs via API call', function () {
2828
});
2929
});
3030

31-
it('Returns the Swagger specification as a JSON document- Record should Returns 200 Response', function () {
31+
it('Returns the Swagger specification as a JSON document- Record should return 200 Response', function () {
3232
cy.request({
3333
method: 'GET',
3434
url: `${claEndpoint}/swagger.json`,

tests/functional/cypress/e2e/events.cy.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe('To Validate events are properly capture via API call', function () {
3131
}
3232
});
3333

34-
it('Get recent events of company and project - Record should Returns 200 Response', function () {
34+
it('Get recent events of company and project - Record should return 200 Response', function () {
3535
claEndpointForNextKey = `${Cypress.env('APP_URL')}cla-service/v4/company/${companyID}/project/${compProjectSFID}/events`;
3636
cy.request({
3737
method: 'GET',
@@ -59,7 +59,7 @@ describe('To Validate events are properly capture via API call', function () {
5959
});
6060
});
6161

62-
it('Get events of foundation project - Record should Returns 200 Response', function () {
62+
it('Get events of foundation project - Record should return 200 Response', function () {
6363
claEndpointForNextKey = `${claEndpoint}/foundation/${foundationSFID}`;
6464
cy.request({
6565
method: 'GET',
@@ -87,7 +87,7 @@ describe('To Validate events are properly capture via API call', function () {
8787
});
8888
});
8989

90-
it('Get events of child project - Record should Returns 200 Response', function () {
90+
it('Get events of child project - Record should return 200 Response', function () {
9191
claEndpointForNextKey = `${claEndpoint}/project/${projectSfid}`;
9292
cy.request({
9393
method: 'GET',
@@ -115,7 +115,7 @@ describe('To Validate events are properly capture via API call', function () {
115115
});
116116
});
117117

118-
it.skip('Get List of recent events - requires Admin-level access - Record should Returns 200 Response', function () {
118+
it.skip('Get List of recent events - requires Admin-level access - Record should return 200 Response', function () {
119119
cy.request({
120120
method: 'GET',
121121
url: `${claEndpoint}/recent?pageSize=2`,
@@ -141,7 +141,7 @@ describe('To Validate events are properly capture via API call', function () {
141141
});
142142
});
143143

144-
it('Download all the events for the foundation as a CSV document - Record should Returns 200 Response', function () {
144+
it('Download all the events for the foundation as a CSV document - Record should return 200 Response', function () {
145145
cy.request({
146146
method: 'GET',
147147
url: `${claEndpoint}/foundation/${foundationSFID}/csv`,
@@ -154,7 +154,7 @@ describe('To Validate events are properly capture via API call', function () {
154154
});
155155
});
156156

157-
it('Download all the events for the project as a CSV document - Record should Returns 200 Response', function () {
157+
it('Download all the events for the project as a CSV document - Record should return 200 Response', function () {
158158
cy.request({
159159
method: 'GET',
160160
url: `${claEndpoint}/project/${projectSfid}/csv`,

tests/functional/cypress/e2e/foundation.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ describe('To Validate & get list of Foundation ClaGroups via API call', function
2727
}
2828
});
2929

30-
it('Get CLA Groups under a foundation- Record should Returns 200 Response', function () {
30+
it('Get CLA Groups under a foundation- Record should return 200 Response', function () {
3131
cy.request({
3232
method: 'GET',
3333
url: `${claEndpoint}?foundationSFID=${foundationSFID}`,

tests/functional/cypress/e2e/github-organizations.cy.ts

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe('To Validate github-organizations API call', function () {
3131
}
3232
});
3333

34-
it('Get list of Github organization associated with project - Record should Returns 200 Response', function () {
34+
it('Get list of Github organization associated with project - Record should return 200 Response', function () {
3535
cy.request({
3636
method: 'GET',
3737
url: `${claEndpoint}`,
@@ -53,7 +53,7 @@ describe('To Validate github-organizations API call', function () {
5353
});
5454
});
5555

56-
it('Update GitHub Organization Configuration - Record should Returns 200 Response', function () {
56+
it('Update GitHub Organization Configuration - Record should return 200 Response', function () {
5757
cy.request({
5858
method: 'PUT',
5959
url: `${claEndpoint}/${gitHubOrgName}/config`,
@@ -72,12 +72,11 @@ describe('To Validate github-organizations API call', function () {
7272
});
7373
});
7474

75-
it('Add new GitHub Oranization in the project - Record should Returns 200 Response', function () {
75+
it('Add new GitHub Oranization in the project - Record should return 200 Response', function () {
7676
cy.request({
7777
method: 'POST',
7878
url: `${claEndpoint}`,
7979
failOnStatusCode: allowFail,
80-
8180
auth: {
8281
bearer: bearerToken,
8382
},
@@ -88,19 +87,18 @@ describe('To Validate github-organizations API call', function () {
8887
organizationName: gitHubOrg,
8988
},
9089
}).then((response) => {
91-
validate_200_Status(response);
90+
cy.logJson('response', response).then(() => {
91+
validate_200_Status(response);
9292

93-
// Validate specific data in the response
94-
expect(response.body).to.have.property('list');
95-
let list = response.body.list;
96-
expect(list[1].github_organization_name).to.eql(gitHubOrg);
97-
expect(list[1].connection_status).to.eql('connected');
98-
//To validate schema of response
99-
validateApiResponse('github-organizations/addProjectGithubOrganization.json', response.body);
93+
// Validate specific data in the response
94+
expect(response.body.organizationName).to.eql(gitHubOrg);
95+
//To validate schema of response
96+
validateApiResponse('github-organizations/addProjectGithubOrganization.json', response.body);
97+
});
10098
});
10199
});
102100

103-
it('Delete GitHub oranization in the project - Record should Returns 204 Response', function () {
101+
it('Delete GitHub oranization in the project - Record should return 204 Response', function () {
104102
cy.request({
105103
method: 'DELETE',
106104
url: `${claEndpoint}/${gitHubOrg}`,

tests/functional/cypress/e2e/github-repositories.cy.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ describe('To Validate github-organizations API call', function () {
4747
}
4848
});
4949

50-
it('Get the GitHub repositories of the project which are CLA Enforced- Record should Returns 200 Response', function () {
50+
it('Get the GitHub repositories of the project which are CLA Enforced- Record should return 200 Response', function () {
5151
cy.task('log', `--> GET ${claEndpoint}`);
5252

5353
cy.request({
@@ -79,7 +79,7 @@ describe('To Validate github-organizations API call', function () {
7979
});
8080
});
8181

82-
it("Remove 'disable CLA Enforced' the GitHub repository from the project - Record should Returns 204 Response", function () {
82+
it("Remove 'disable CLA Enforced' the GitHub repository from the project - Record should return 204 Response", function () {
8383
cy.request({
8484
method: 'DELETE',
8585
url: `${claEndpoint}/${repository_id}`,
@@ -92,7 +92,7 @@ describe('To Validate github-organizations API call', function () {
9292
});
9393
});
9494

95-
it("User should able to Add 'CLA Enforced' a GitHub repository to the project - Record should Returns 200 Response", function () {
95+
it("User should able to Add 'CLA Enforced' a GitHub repository to the project - Record should return 200 Response", function () {
9696
cy.request({
9797
method: 'POST',
9898
url: `${claEndpoint}`,
@@ -124,7 +124,7 @@ describe('To Validate github-organizations API call', function () {
124124
});
125125
});
126126

127-
it('Get GitHub branch protection for given repository - Record should Returns 200 Response', function () {
127+
it('Get GitHub branch protection for given repository - Record should return 200 Response', function () {
128128
// cy.logJson("appConfig", appConfig);
129129
const url = `${claEndpoint}/${repository_id}/branch-protection`;
130130
cy.task('log', `--> GET ${url}`);
@@ -154,7 +154,7 @@ describe('To Validate github-organizations API call', function () {
154154
});
155155
});
156156

157-
it('Update github branch protection for given repository - Record should Returns 200 Response', function () {
157+
it('Update github branch protection for given repository - Record should return 200 Response', function () {
158158
cy.request({
159159
method: 'POST',
160160
url: `${claEndpoint}/${repository_id}/branch-protection`,

tests/functional/cypress/e2e/health.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('To Validate & get health status via API call', function () {
1515
}
1616
});
1717

18-
it('Returns the Health of the application- Record should Returns 200 Response', function () {
18+
it('Returns the Health of the application- Record should return 200 Response', function () {
1919
cy.request({
2020
method: 'GET',
2121
url: `${claEndpoint}/ops/health`,

tests/functional/cypress/e2e/metrics.cy.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ describe('To Validate cla-manager API call', function () {
3131
}
3232
});
3333

34-
it('Get CLA manager distribution for EasyCLA - Record should Returns 200 Response', function () {
34+
it('Get CLA manager distribution for EasyCLA - Record should return 200 Response', function () {
3535
cy.request({
3636
method: 'GET',
3737
url: `${claEndpoint}cla-manager-distribution`,
@@ -45,7 +45,7 @@ describe('To Validate cla-manager API call', function () {
4545
});
4646
});
4747

48-
it('Get & Returns metrics of company - Record should Returns 200 Response', function () {
48+
it('Get & Returns metrics of company - Record should return 200 Response', function () {
4949
cy.request({
5050
method: 'GET',
5151
url: `${claEndpoint}company/${companyID}`,
@@ -61,7 +61,7 @@ describe('To Validate cla-manager API call', function () {
6161
});
6262
});
6363

64-
it('Get & Returns metrics of company - Record should Returns 200 Response', function () {
64+
it('Get & Returns metrics of company - Record should return 200 Response', function () {
6565
cy.request({
6666
method: 'GET',
6767
url: `${claEndpoint}company/${companyID}/project/${projectSFID}`,
@@ -80,7 +80,7 @@ describe('To Validate cla-manager API call', function () {
8080
});
8181
});
8282

83-
it('List the metrics for the projects - Record should Returns 200 Response', function () {
83+
it('List the metrics for the projects - Record should return 200 Response', function () {
8484
claEndpointForNextKey = `${claEndpoint}project`;
8585
cy.request({
8686
method: 'GET',
@@ -98,7 +98,7 @@ describe('To Validate cla-manager API call', function () {
9898
});
9999
});
100100

101-
it('Get & Returns metrics of company - Record should Returns 200 Response', function () {
101+
it('Get & Returns metrics of company - Record should return 200 Response', function () {
102102
cy.request({
103103
method: 'GET',
104104
url: `${claEndpoint}project?=${projectID}`,
@@ -112,7 +112,7 @@ describe('To Validate cla-manager API call', function () {
112112
});
113113
});
114114

115-
it('Get top company metrics - Record should Returns 200 Response', function () {
115+
it('Get top company metrics - Record should return 200 Response', function () {
116116
cy.request({
117117
method: 'GET',
118118
url: `${claEndpoint}top-companies`,

tests/functional/cypress/e2e/version.cy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ describe('To Validate & check cla version via API call', function () {
1515
}
1616
});
1717

18-
it('Returns the application version information- Record should Returns 200 Response', function () {
18+
it('Returns the application version information- Record should return 200 Response', function () {
1919
cy.request({
2020
method: 'GET',
2121
url: `${claEndpoint}/ops/version`,

0 commit comments

Comments
 (0)