Conversation
885e17d to
3c6cf4e
Compare
| data-cy="title-container" | ||
| > | ||
| {{ template.type }} | ||
| {{ template.name || template.type }} |
There was a problem hiding this comment.
template name is a required string, no need || X
There was a problem hiding this comment.
When HAS_BACKEND is false the data have actually no name field
src/pages/HomePage.vue
Outdated
| } | ||
| } | ||
| </style> | ||
| </style>src/services/TemplatesService |
|
|
||
| /** | ||
| * @param {string} type - project | component | model | ||
| * @returns {Promise<object>} |
There was a problem hiding this comment.
rework on documentation.
Missing default description, description param are no explain of what is the param
Return have a break line and incomplete description.
There was a problem hiding this comment.
PROJECT | COMPONENT | MODEL -> , can be 'PROJECT', 'COMPONENT' or 'MODEL'.
src/services/TemplatesService.js
Outdated
| * otherwise an error. | ||
| */ | ||
| export async function getAPITemplatesByType(type) { | ||
| return api.get(`/libraries/templates?type=${type.toUpperCase().trim()}`); |
There was a problem hiding this comment.
I did this to have consistency between the function getTemplatesByType in TemplateManager.js and getAPITemplatesByType but, done.
src/services/TemplatesService.js
Outdated
| } | ||
|
|
||
| /** | ||
| * Get templates have "project" type. |
There was a problem hiding this comment.
not understandable, rework on sentence
src/services/TemplatesService.js
Outdated
| export async function getProjectTemplates() { | ||
| if (!process.env.HAS_BACKEND) { | ||
| const response = await getTemplatesByType('project'); | ||
| return response; |
There was a problem hiding this comment.
why do you have a const response, you can directly
return getTemplatesByType(...)
| getTemplatesByType: jest.fn(), | ||
| })); | ||
|
|
||
| describe('Templates Service', () => { |
There was a problem hiding this comment.
I think is no like other test file, please check it
There was a problem hiding this comment.
I dont understand. I just did like in User Service tests file
| process.env = OLD_ENV; | ||
| }); | ||
|
|
||
| it('should return a template list not "using" api', async () => { |
| describe('Test function: getProjectTemplates', () => { | ||
| const OLD_ENV = process.env; | ||
|
|
||
| beforeEach(() => { |
There was a problem hiding this comment.
I think beforeEach and afterAll is useless, you can simplify by adding:
process.env.HAS_BACKEND = true; at the end of your first it
7234e93 to
6818d54
Compare
6818d54 to
84d31d7
Compare
Checking /home/runner/work/leto-modelizer/leto-modelizer/package.json
@babel/core =7.23.6 → =7.24.3
@babel/eslint-parser =7.23.3 → =7.24.1
@babel/preset-env =7.23.6 → =7.24.3
@badeball/cypress-cucumber-preprocessor =19.2.0 → =20.0.3
@quasar/app-webpack =3.9.6 → =3.12.4
@vue/test-utils =2.4.3 → =2.4.5
axios =1.6.2 → =1.6.8
core-js =3.34.0 → =3.36.1
cypress =13.6.1 → =13.7.1
cypress-real-events =1.11.0 → =1.12.0
eslint =8.56.0 → =8.57.0
eslint-plugin-jest =27.6.0 → =27.9.0
eslint-plugin-jsdoc =46.9.1 → =48.2.1
eslint-plugin-vue =9.19.2 → =9.24.0
eslint-webpack-plugin =4.0.1 → =4.1.0
gherkin-lint =4.2.2 → =4.2.4
isomorphic-git =1.25.1 → =1.25.6
monaco-editor =0.45.0 → =0.47.0
quasar =2.13.0 → =2.15.1
v-viewer =3.0.11 → =3.0.13
vue =3.3.9 → =3.4.21
vue-i18n =9.8.0 → =9.10.2
vue-loader =17.3.1 → =17.4.2
vue-router =4.2.5 → =4.3.0
Run npx npm-check-updates -x leto-modelizer* -u to upgrade package.json |
|



No description provided.