-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #4127 from communitybridge/cypress-appConfig
Cypress app config
- Loading branch information
Showing
23 changed files
with
1,254 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
// config.dev.js | ||
export const appConfig = { | ||
projectSFID: 'a09P000000DsCE5IAN',//project name: SUN | ||
|
||
/*Variable for create cla group*/ | ||
foundationSFID:'a09P000000DsNGsIAN', //project name: easyAutom foundation & common for foundation.spec.ts | ||
createNewClaGroupSFID:'a09P000000DsNGxIAN', //project name: easyAutom-child1 | ||
claGroupName:'CypressDevClaGroup', | ||
gitHubOrgPartialStatus:'Sun-lfxfoundationOrgTest',//For partial Connection | ||
enrollProjectsSFID:'a09P000000DsNHCIA3', //project name: easyAutomChild1-GrandChild1, | ||
child_Project_name:'easyAutomChild1-GrandChild1', | ||
|
||
/*company*/ | ||
companyName:'Infosys Limited', | ||
user_id:"8f3e52b8-0072-11ee-9def-0ef17207dfe8",//[email protected] | ||
userEmail: "[email protected]", | ||
user_id2: "4a4c1dba-407f-11ed-8c58-a6b0f8fb81a9",//[email protected] | ||
|
||
/*events*/ | ||
companyID:"f7c7ac9c-4dbf-4104-ab3f-6b38a26d82dc", | ||
childProjectSFID:'a09P000000DsNH2IAN', //project name: easyAutom-child2 | ||
|
||
/*github-organizations*/ | ||
gitHubOrgUpdate:'ApiAutomStandaloneOrg', | ||
gitHubNewOrg:'cypressioTest', | ||
claGroupId:'1baf67ab-d894-4edf-b6fc-c5f939db59f7', | ||
|
||
/*metrics*/ | ||
projectID:'01af041c-fa69-4052-a23c-fb8c1d3bef24', | ||
|
||
/*cla-manager*/ | ||
userIdclaManager:'c5ac2857-c263-11ed-94d1-d2349de32229',//veerendrat | ||
claGroupId_projectSFID:'01af041c-fa69-4052-a23c-fb8c1d3bef24', | ||
|
||
/* project */ | ||
projectName:'easyAutom-child2', | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// config.production.js | ||
export const appConfig = { | ||
projectSFID: 'a09P000000DsCE5IAN',//project name: SUN | ||
//Veriable used in foundation.spec.ts | ||
foundationSFID:'a09P000000DsNGsIAN' //project name: easyAutom foundation | ||
//Variable for create cla group | ||
|
||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,35 @@ | ||
import {validateApiResponse,validate_200_Status,getTokenKey} from '../support/commands' | ||
describe("To Validate cla-manager API call", function () { | ||
//Reference api doc: https://api-gw.dev.platform.linuxfoundation.org/cla-service/v4/api-docs#tag/cla-manager | ||
|
||
// Define a variable for the environment | ||
const environment = Cypress.env("CYPRESS_ENV"); | ||
|
||
// Import the appropriate configuration based on the environment | ||
let appConfig; | ||
if (environment === 'dev') { | ||
appConfig = require('../appConfig/config.dev.ts').appConfig; | ||
} else if (environment === 'production') { | ||
appConfig = require('../appConfig/config.production.ts').appConfig; | ||
} | ||
|
||
//Reference api doc: https://api-gw.dev.platform.linuxfoundation.org/cla-service/v4/api-docs#tag/cla-manager | ||
/* | ||
https://api-gw.dev.platform.linuxfoundation.org/acs/v1/api-docs#tag/UserRole | ||
https://api-gw.dev.platform.linuxfoundation.org/acs/v1/api-docs#tag/Role/operation/getRoles | ||
*/ | ||
//Variable for GitHub | ||
const companyID="f7c7ac9c-4dbf-4104-ab3f-6b38a26d82dc";//infosys limited | ||
const projectSFID="a09P000000DsCE5IAN";//sun | ||
const projectSFID_Designee="a09P000000DsNH2IAN" | ||
const companyID=appConfig.companyID;//infosys limited | ||
const projectSFID=appConfig.projectSFID;//sun | ||
const projectSFID_Designee=appConfig.childProjectSFID//EASYAUTOM-CHILD2 | ||
const claEndpoint = `${Cypress.env("APP_URL")}cla-service/v4/`; | ||
let bearerToken: string = null; | ||
const claGroupID="1baf67ab-d894-4edf-b6fc-c5f939db59f7"; | ||
const sun_claGroupID="01af041c-fa69-4052-a23c-fb8c1d3bef24" | ||
const claGroupID=appConfig.claGroupId; | ||
const sun_claGroupID=appConfig.claGroupId_projectSFID //sun | ||
const userEmail="[email protected]"; | ||
let companyName="Infosys limited"; | ||
let organization_id=""; | ||
let organization_name=""; | ||
let companyName=appConfig.companyName//"Infosys limited"; | ||
let companySFID=""; | ||
let userLFID="veerendrat"; | ||
let userId="c5ac2857-c263-11ed-94d1-d2349de32229";//veerendrat | ||
let userId=appConfig.userIdclaManager//"c5ac2857-c263-11ed-94d1-d2349de32229";//veerendrat | ||
|
||
before(() => { | ||
|
||
|
@@ -81,8 +91,6 @@ https://api-gw.dev.platform.linuxfoundation.org/acs/v1/api-docs#tag/Role/operati | |
validate_200_Status(response); | ||
// Validate specific data in the response | ||
let list = response.body; | ||
organization_id=list.organization_id; | ||
organization_name=list.organization_name; | ||
expect(list.project_sfid).to.eql(projectSFID) | ||
//To validate schema of response | ||
}else{ | ||
|
Oops, something went wrong.