-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: release for Sprint 3
- Loading branch information
Showing
18 changed files
with
10,265 additions
and
1,752 deletions.
There are no files selected for viewing
8,583 changes: 8,582 additions & 1 deletion
8,583
.nyc_output/b755a280-3904-4861-918c-2476ca49ae4e.json
Large diffs are not rendered by default.
Oops, something went wrong.
45 changes: 44 additions & 1 deletion
45
.nyc_output/processinfo/b755a280-3904-4861-918c-2476ca49ae4e.json
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 +1,44 @@ | ||
{"parent":null,"pid":17204,"argv":["C:\\Program Files\\nodejs\\node.exe","C:\\ISPP\\ISPP-G1-Talent\\node_modules\\mocha\\bin\\mocha.js","--timeout","60000","api/v1/tests/**/*.js"],"execArgv":[],"cwd":"C:\\ISPP\\ISPP-G1-Talent","time":1712858561193,"ppid":27232,"coverageFilename":"C:\\ISPP\\ISPP-G1-Talent\\.nyc_output\\b755a280-3904-4861-918c-2476ca49ae4e.json","externalId":"","uuid":"b755a280-3904-4861-918c-2476ca49ae4e","files":["C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\tests\\api\\CallingApiTest.js","C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\analysis\\services\\GitHubService.js","C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\tests\\e2e\\UserControllerTest.js","C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\user\\controllers\\UserController.js","C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\user\\services\\UserService.js","C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\user\\helpers\\handleJWT.js","C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\user\\models\\user.js","C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\analysis\\models\\analysis.model.js","C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\professional-experience\\models\\professional-experience.js","C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\user\\helpers\\handleRoles.js","C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\analysis\\services\\AnalysisService.js","C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\notification\\services\\NotificationService.js","C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\notification\\models\\notification.js","C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\history\\models\\history.js","C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\history\\services\\HistoryService.js","C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\subscriptions\\services\\SubscriptionsService.js","C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\subscriptions\\models\\subscription.js","C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\utils\\ApiResponse.js","C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\user\\middlewares\\UserMiddleware.js","C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\user\\helpers\\handleBcrypt.js","C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\tests\\unit\\TeamCreatorServiceTest.js","C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\professional-experience\\services\\ProfessionalExperienceService.js","C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\team-creator\\services\\TeamCreatorService.js","C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\team-creator\\models\\TeamCreatorModel.js"]} | ||
{ | ||
"parent": null, | ||
"pid": 17204, | ||
"argv": [ | ||
"C:\\Program Files\\nodejs\\node.exe", | ||
"C:\\ISPP\\ISPP-G1-Talent\\node_modules\\mocha\\bin\\mocha.js", | ||
"--timeout", | ||
"60000", | ||
"api/v1/tests/**/*.js" | ||
], | ||
"execArgv": [], | ||
"cwd": "C:\\ISPP\\ISPP-G1-Talent", | ||
"time": 1712858561193, | ||
"ppid": 27232, | ||
"coverageFilename": "C:\\ISPP\\ISPP-G1-Talent\\.nyc_output\\b755a280-3904-4861-918c-2476ca49ae4e.json", | ||
"externalId": "", | ||
"uuid": "b755a280-3904-4861-918c-2476ca49ae4e", | ||
"files": [ | ||
"C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\tests\\api\\CallingApiTest.js", | ||
"C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\analysis\\services\\GitHubService.js", | ||
"C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\tests\\e2e\\UserControllerTest.js", | ||
"C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\user\\controllers\\UserController.js", | ||
"C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\user\\services\\UserService.js", | ||
"C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\user\\helpers\\handleJWT.js", | ||
"C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\user\\models\\user.js", | ||
"C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\analysis\\models\\analysis.model.js", | ||
"C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\professional-experience\\models\\professional-experience.js", | ||
"C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\user\\helpers\\handleRoles.js", | ||
"C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\analysis\\services\\AnalysisService.js", | ||
"C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\notification\\services\\NotificationService.js", | ||
"C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\notification\\models\\notification.js", | ||
"C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\history\\models\\history.js", | ||
"C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\history\\services\\HistoryService.js", | ||
"C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\subscriptions\\services\\SubscriptionsService.js", | ||
"C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\subscriptions\\models\\subscription.js", | ||
"C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\utils\\ApiResponse.js", | ||
"C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\user\\middlewares\\UserMiddleware.js", | ||
"C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\user\\helpers\\handleBcrypt.js", | ||
"C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\tests\\unit\\TeamCreatorServiceTest.js", | ||
"C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\professional-experience\\services\\ProfessionalExperienceService.js", | ||
"C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\team-creator\\services\\TeamCreatorService.js", | ||
"C:\\ISPP\\ISPP-G1-Talent\\api\\v1\\modules\\team-creator\\models\\TeamCreatorModel.js" | ||
] | ||
} |
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,29 +1,41 @@ | ||
/* eslint-disable @typescript-eslint/no-unsafe-argument */ | ||
import express from 'express'; | ||
import express from 'express' | ||
import { | ||
// getAllTeamCreator, | ||
getTeamCreatorById, | ||
createTeamCreator, | ||
getAllTeamCreatorOfRepresentative, | ||
//updateTeamCreator, | ||
deleteTeamCreator | ||
} from './controllers/TeamCreatorController'; | ||
// getAllTeamCreator, | ||
getTeamCreatorById, | ||
createTeamCreator, | ||
getAllTeamCreatorOfRepresentative, | ||
//updateTeamCreator, | ||
deleteTeamCreator, | ||
} from './controllers/TeamCreatorController' | ||
import { | ||
checkIsRepresentative, | ||
checkValidToken, | ||
checkDataCreateTeam, | ||
checkAuthorization, | ||
checkSubscriptionState | ||
|
||
} from './validators/TeamCreatorMiddleware'; | ||
const router = express.Router(); | ||
router.use(express.json()); | ||
checkIsRepresentative, | ||
checkValidToken, | ||
checkDataCreateTeam, | ||
checkAuthorization, | ||
checkSubscriptionState, | ||
} from './validators/TeamCreatorMiddleware' | ||
const router = express.Router() | ||
router.use(express.json()) | ||
// Define routes for the TeamCreator module | ||
//router.get('/', getAllTeamCreator); | ||
router.get('/:id',checkValidToken,checkIsRepresentative, getTeamCreatorById); | ||
router.get('/representative-user/:id',checkValidToken,checkIsRepresentative,checkAuthorization,getAllTeamCreatorOfRepresentative) | ||
router.post('/',checkValidToken,checkIsRepresentative,checkDataCreateTeam,checkSubscriptionState, createTeamCreator); | ||
router.get('/:id', checkValidToken, checkIsRepresentative, getTeamCreatorById) | ||
router.get( | ||
'/representative-user/:id', | ||
checkValidToken, | ||
checkIsRepresentative, | ||
checkAuthorization, | ||
getAllTeamCreatorOfRepresentative | ||
) | ||
router.post( | ||
'/', | ||
checkValidToken, | ||
checkIsRepresentative, | ||
checkDataCreateTeam, | ||
checkSubscriptionState, | ||
createTeamCreator | ||
) | ||
//router.patch('/:id', updateTeamCreator); | ||
router.delete('/:id',checkValidToken,checkIsRepresentative, deleteTeamCreator); | ||
router.delete('/:id', checkValidToken, checkIsRepresentative, deleteTeamCreator) | ||
|
||
export default router; | ||
export default router |
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,28 +1,32 @@ | ||
import assert from 'assert'; | ||
import { GetUserAnaliseInfo } from '../../modules/analysis/services/GitHubService'; | ||
|
||
// Estas 3 lineas son necesarias porque al estar el .env fuera de tests, no te lo detecta | ||
import * as dotenv from 'dotenv'; | ||
import * as path from 'path'; | ||
const githubUsername = 'rwieruch' | ||
dotenv.config({ path: path.resolve(__dirname, '../../.env') }); | ||
describe(`Call the API to add a new analysis - ${githubUsername} : `, () => { | ||
it('Should call the API and verify that its the same user', (done: Mocha.Done) => { | ||
// Aquí invocas tu función que hace la llamada a la API GraphQL | ||
GetUserAnaliseInfo(githubUsername, process.env.GH_TOKEN) | ||
.then(data => { | ||
// Asumiendo que data tiene una propiedad llamada 'success' que indica si la llamada fue exitosa | ||
assert.strictEqual(data.githubUsername, githubUsername, 'The API call was not successful'); | ||
/* | ||
* Si tienes datos específicos que esperas recibir, puedes hacer aserciones sobre ellos aquí | ||
* Por ejemplo, si esperas que los datos incluyan un usuario con un nombre específico: | ||
* assert(data.user.name === 'Expected Name', 'The received name did not match the expected one'); | ||
*/ | ||
|
||
done(); // Indica que el test ha terminado | ||
}) | ||
.catch(err => { | ||
done(err); // Si hay un error, lo pasa a Mocha | ||
}); | ||
}); | ||
}).timeout(10000); | ||
import assert from 'assert' | ||
import { GetUserAnaliseInfo } from '../../modules/analysis/services/GitHubService' | ||
|
||
// Estas 3 lineas son necesarias porque al estar el .env fuera de tests, no te lo detecta | ||
import * as dotenv from 'dotenv' | ||
import * as path from 'path' | ||
const githubUsername = 'rwieruch' | ||
dotenv.config({ path: path.resolve(__dirname, '../../.env') }) | ||
describe(`Call the API to add a new analysis - ${githubUsername} : `, () => { | ||
it('Should call the API and verify that its the same user', (done: Mocha.Done) => { | ||
// Aquí invocas tu función que hace la llamada a la API GraphQL | ||
GetUserAnaliseInfo(githubUsername, process.env.GH_TOKEN) | ||
.then((data) => { | ||
// Asumiendo que data tiene una propiedad llamada 'success' que indica si la llamada fue exitosa | ||
assert.strictEqual( | ||
data.githubUsername, | ||
githubUsername, | ||
'The API call was not successful' | ||
) | ||
/* | ||
* Si tienes datos específicos que esperas recibir, puedes hacer aserciones sobre ellos aquí | ||
* Por ejemplo, si esperas que los datos incluyan un usuario con un nombre específico: | ||
* assert(data.user.name === 'Expected Name', 'The received name did not match the expected one'); | ||
*/ | ||
|
||
done() // Indica que el test ha terminado | ||
}) | ||
.catch((err) => { | ||
done(err) // Si hay un error, lo pasa a Mocha | ||
}) | ||
}) | ||
}).timeout(10000) |
Oops, something went wrong.