Skip to content

Commit 27f7d4b

Browse files
Merge pull request #4782 from linuxfoundation/unicron-4762-cypress-apis-test-coverage-3
Fixing test coverage #4762
2 parents 5b91fee + 049c848 commit 27f7d4b

18 files changed

+246
-34
lines changed

tests/functional/README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,10 @@ You can ask for example `.env` file over slack.
9090
- Run `npx cypress install`
9191
- Run tests using cmd `npx cypress run`. Or `xvfb-run -a npx cypress run` when runnign over SSH.
9292
- Run tests using UI `npx cypress open`. Choose **E2E testing**, select **Chrome** browser.
93-
- Run single E2E spec file: `` [ALLOW_FAIL=1] ./run-single-test.sh github-repositories ``.
94-
- Run single test from E2E spec file: `` [ALLOW_FAIL=1] ./run-single-test.sh github-repositories 'test name regexp' ``.
93+
- Run single E2E spec file: `` [ALLOW_FAIL=1] ./utils/run-single-test.sh github-repositories ``.
94+
- Run single test from E2E spec file: `` [ALLOW_FAIL=1] ./utils/run-single-test.sh github-repositories 'test name regexp' ``.
95+
- Additional options include: `TOKEN=xxxx`, `XACL=xxxx`, `DEBUG=1`, `LOCAL=1`, `ALL=1`.
96+
- To format E2E tests: `` npx prettier --write cypress/e2e/* ``.
9597
- View test reports in the `cypress-report` directory.
9698
- Explore source code files for detailed implementation.
9799

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ describe("To Validate 'GET, CREATE, UPDATE and DELETE' CLA groups API call on ch
5757
cy.request({
5858
method: 'POST',
5959
url: `${claEndpoint}cla-group`,
60+
timeout: 180000,
6061
failOnStatusCode: allowFail,
6162
headers: getXACLHeader(),
6263
auth: {
@@ -114,6 +115,7 @@ describe("To Validate 'GET, CREATE, UPDATE and DELETE' CLA groups API call on ch
114115
cy.request({
115116
method: 'GET',
116117
url: `${claEndpoint}foundation/${projectSfid}/cla-groups`,
118+
timeout: 180000,
117119
failOnStatusCode: allowFail,
118120
headers: getXACLHeader(),
119121
auth: {
@@ -138,6 +140,7 @@ describe("To Validate 'GET, CREATE, UPDATE and DELETE' CLA groups API call on ch
138140
cy.request({
139141
method: 'GET',
140142
url: `${claEndpoint}foundation/${projectSfid}-xyz/cla-groups`,
143+
timeout: 180000,
141144
failOnStatusCode: false,
142145
headers: getXACLHeader(),
143146
auth: {
@@ -154,6 +157,7 @@ describe("To Validate 'GET, CREATE, UPDATE and DELETE' CLA groups API call on ch
154157
cy.request({
155158
method: 'PUT',
156159
url: `${claEndpoint}cla-group/${claGroupId}`,
160+
timeout: 180000,
157161
failOnStatusCode: allowFail,
158162
headers: getXACLHeader(),
159163
auth: {
@@ -180,6 +184,7 @@ describe("To Validate 'GET, CREATE, UPDATE and DELETE' CLA groups API call on ch
180184
cy.request({
181185
method: 'PUT',
182186
url: `${claEndpoint}cla-group/${claGroupId}/enroll-projects`,
187+
timeout: 180000,
183188
failOnStatusCode: allowFail,
184189
headers: getXACLHeader(),
185190
auth: {
@@ -195,6 +200,7 @@ describe("To Validate 'GET, CREATE, UPDATE and DELETE' CLA groups API call on ch
195200
cy.request({
196201
method: 'GET',
197202
url: `${claEndpoint}foundation/${projectSfid}/cla-groups`,
203+
timeout: 180000,
198204
failOnStatusCode: allowFail,
199205
headers: getXACLHeader(),
200206
auth: {
@@ -218,6 +224,7 @@ describe("To Validate 'GET, CREATE, UPDATE and DELETE' CLA groups API call on ch
218224
cy.request({
219225
method: 'PUT',
220226
url: `${claEndpoint}cla-group/${claGroupId}/unenroll-projects`,
227+
timeout: 180000,
221228
failOnStatusCode: allowFail,
222229
headers: getXACLHeader(),
223230
auth: {
@@ -234,6 +241,7 @@ describe("To Validate 'GET, CREATE, UPDATE and DELETE' CLA groups API call on ch
234241
cy.request({
235242
method: 'GET',
236243
url: `${claEndpoint}project/${projectSfidOrg}/github/organizations`,
244+
timeout: 180000,
237245
failOnStatusCode: allowFail,
238246
headers: getXACLHeader(),
239247
auth: {
@@ -257,6 +265,7 @@ describe("To Validate 'GET, CREATE, UPDATE and DELETE' CLA groups API call on ch
257265
cy.request({
258266
method: 'PUT',
259267
url: `${claEndpoint}project/${projectSfidOrg}/github/organizations/${gitHubOrgName}/config`,
268+
timeout: 180000,
260269
failOnStatusCode: allowFail,
261270
headers: getXACLHeader(),
262271
auth: {
@@ -277,6 +286,7 @@ describe("To Validate 'GET, CREATE, UPDATE and DELETE' CLA groups API call on ch
277286
cy.request({
278287
method: 'DELETE',
279288
url: `${claEndpoint}cla-group/${claGroupId}`,
289+
timeout: 180000,
280290
failOnStatusCode: allowFail,
281291
headers: getXACLHeader(),
282292
auth: {
@@ -290,6 +300,7 @@ describe("To Validate 'GET, CREATE, UPDATE and DELETE' CLA groups API call on ch
290300
cy.request({
291301
method: 'GET',
292302
url: `${claEndpoint}foundation/${projectSfid}/cla-groups`,
303+
timeout: 180000,
293304
failOnStatusCode: allowFail,
294305
headers: getXACLHeader(),
295306
auth: {

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

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ https://api-gw.dev.platform.linuxfoundation.org/acs/v1/api-docs#tag/Role/operati
5555
cy.request({
5656
method: 'POST',
5757
url: url,
58+
timeout: 180000,
5859
failOnStatusCode: allowFail,
5960
headers: getXACLHeader(),
6061
auth: { bearer: bearerToken },
@@ -82,6 +83,7 @@ https://api-gw.dev.platform.linuxfoundation.org/acs/v1/api-docs#tag/Role/operati
8283
cy.request({
8384
method: 'POST',
8485
url: url,
86+
timeout: 180000,
8587
failOnStatusCode: allowFail,
8688
headers: getXACLHeader(),
8789
auth: {
@@ -113,6 +115,7 @@ https://api-gw.dev.platform.linuxfoundation.org/acs/v1/api-docs#tag/Role/operati
113115
cy.request({
114116
method: 'DELETE',
115117
url: `${claEndpoint}company/${companyID}/project/${projectSFID}/cla-manager/${userLFID}`,
118+
timeout: 180000,
116119
failOnStatusCode: allowFail,
117120
headers: getXACLHeader(),
118121
auth: {
@@ -128,6 +131,7 @@ https://api-gw.dev.platform.linuxfoundation.org/acs/v1/api-docs#tag/Role/operati
128131
cy.request({
129132
method: 'POST',
130133
url: `${claEndpoint}company/${companyID}/project/${projectSFID_Designee}/cla-manager-designee`,
134+
timeout: 180000,
131135
failOnStatusCode: allowFail,
132136
headers: getXACLHeader(),
133137
auth: {
@@ -152,6 +156,7 @@ https://api-gw.dev.platform.linuxfoundation.org/acs/v1/api-docs#tag/Role/operati
152156
cy.request({
153157
method: 'POST',
154158
url: `${claEndpoint}company/${companyID}/project/${projectSFID_Designee}/cla-manager/requests`,
159+
timeout: 180000,
155160
failOnStatusCode: allowFail,
156161
headers: getXACLHeader(),
157162
auth: {
@@ -192,6 +197,7 @@ https://api-gw.dev.platform.linuxfoundation.org/acs/v1/api-docs#tag/Role/operati
192197
cy.request({
193198
method: 'POST',
194199
url: `${claEndpoint}notify-cla-managers`,
200+
timeout: 180000,
195201
failOnStatusCode: allowFail,
196202
headers: getXACLHeader(),
197203
auth: {
@@ -223,7 +229,8 @@ https://api-gw.dev.platform.linuxfoundation.org/acs/v1/api-docs#tag/Role/operati
223229
cy.request({
224230
method: 'POST',
225231
url: `${claEndpoint}notify-cla-managers`,
226-
failOnStatusCode: allowFail,
232+
timeout: 180000,
233+
failOnStatusCode: false,
227234
headers: getXACLHeader(),
228235
auth: {
229236
bearer: bearerToken,
@@ -240,6 +247,7 @@ https://api-gw.dev.platform.linuxfoundation.org/acs/v1/api-docs#tag/Role/operati
240247
cy.request({
241248
method: 'POST',
242249
url: `${claEndpoint}user/${userId2}/invite-company-admin`,
250+
timeout: 180000,
243251
failOnStatusCode: allowFail,
244252
headers: getXACLHeader(),
245253
auth: {
@@ -264,6 +272,7 @@ https://api-gw.dev.platform.linuxfoundation.org/acs/v1/api-docs#tag/Role/operati
264272
cy.request({
265273
method: 'GET',
266274
url: `${claEndpoint}company/${companySFID}/user/${userLFID}/claGroupID/${claGroupID}/is-cla-manager-designee`,
275+
timeout: 180000,
267276
failOnStatusCode: allowFail,
268277
headers: getXACLHeader(),
269278
auth: {

0 commit comments

Comments
 (0)