-
Notifications
You must be signed in to change notification settings - Fork 3
[backend/frontend] feat(integrations): add ability to update multiple images, demo and datasheet url (#1404) (#1837) #1826
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+3,034
−1,018
Merged
Changes from 16 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
fcbadd2
[backend/frontend] feat(integrations): add and display datasheet and …
Kroustille a613305
[frontend] feat(integrations): add datasheet and demo link fields in …
Kroustille 2781b36
[frontend] feat(services): mutualize multiple images component across…
Kroustille d1388d7
[frontend] feat(services): display integration images in a carousel
Kroustille 6ca30bb
[frontend] refactor(services): rename useSimpleServiceFormField hook
Kroustille 3051a9c
[frontend] chore: add possibility to disable service form fields
Kroustille 8525054
[frontend] feat: add ability to update a connector urls and images
Kroustille 16828bb
[frontend] feat: display carousel on connector pages
Kroustille 02ce9da
[frontend] chore: use first third party integration image as logo
Kroustille f9ddca7
[frontend] fix: allow deletion of datasheet or demo URLs
Kroustille a6dc579
[backend] chore: replace only external image by connector logo
Kroustille 8a4f0be
[backend] test: add tests for document app and document children domain
Kroustille a54dfc0
[backend] chore: add migration to mark connector images as external
Kroustille 2329175
[backend/frontend] refactor: use GraphQL enum for document source typ…
Kroustille e084fde
[frontend] chore: disable image edition when it is from external source
Kroustille 3230692
[backend/frontend] chore: implement copilot review comments
Kroustille fada5a8
Merge branch 'development' into issue/1404
Kroustille 6f78017
[backend/frontend] chore: implement review comments
Kroustille a6ef5ee
Merge branch 'development' into issue/1404
Kroustille b594866
[frontend] refactor(service-form): move images states into service fo…
Kroustille 610d2fc
[frontend] fix(third-party): do not display first image in carousel o…
Kroustille cd1a669
[frontend] fix: display filigran logo for dashboards and scenarios
Kroustille 368ebf4
Merge branch 'development' into issue/1404
Kroustille 74b9f21
Merge branch 'development' into issue/1404
Kroustille f254ca8
Merge branch 'development' into issue/1404
Kroustille bb51805
Merge branch 'development' into issue/1404
Kroustille 3c52207
[backend/frontend] feat(resources): split logo and images creation an…
Kroustille 31e1556
Merge branch 'development' into issue/1404
Kroustille File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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,27 @@ | ||
| --- | ||
| description: API test writer agent. | ||
| tools: ['insert_edit_into_file', 'replace_string_in_file', 'create_file', 'run_in_terminal', 'get_terminal_output', 'get_errors', 'show_content', 'open_file', 'list_dir', 'read_file', 'file_search', 'grep_search', 'validate_cves', 'run_subagent', 'semantic_search'] | ||
| --- | ||
| You are a senior backend integration test engineer for the XTM Hub monorepo. You have deep expertise in designing robust, maintainable integration tests for API and backend systems, with a strong focus on real-world data flows and best practices. | ||
|
|
||
| Follow these principles: | ||
| Write tests in TypeScript using Vitest. | ||
| Prefer real database calls over mocks for all *.domain.ts files. Only use mocks for external services or when testing *.app.ts files, and only when necessary. | ||
| If you need to mock, do so only for external dependencies (e.g., MinIO, Elasticsearch). | ||
| Keep tests simple, clear, and focused on real data flows. | ||
| Use the actual database (test DB) for integration tests. Clean up data between tests to ensure isolation. | ||
| Never use console.log; use logApp if logging is needed. | ||
| Prefix unused variables with _ (underscore). | ||
| Follow the repository’s structure and conventions for test files and setup/teardown. | ||
| Use the project’s constants and helpers for test data (e.g., from tests/tests.const). | ||
| Ensure tests are deterministic and do not depend on external state. | ||
| Do not write frontend or UI tests. | ||
| Ask for clarification if requirements or behaviors are ambiguous. | ||
|
|
||
| As a senior engineer, you are expected to: | ||
| Apply best practices for integration testing, code organization, and maintainability. | ||
| Proactively identify edge cases and ensure comprehensive coverage. | ||
| Document your tests clearly and concisely. | ||
| Mentor by example through code quality and structure. | ||
|
|
||
| Your goal: Write integration tests that validate the real behavior of backend modules, ensuring correctness, reliability, and maintainability at a high professional standard. | ||
This file contains hidden or 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
apps/portal-api/src/migrations/20260305082651_mark-connector-pictures-external.js
This file contains hidden or 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,39 @@ | ||
| const loadConnectorChildImageIds = async (knex) => { | ||
| const parentConnectorIds = await knex('Document_Metadata') | ||
| .where({ key: 'integration_type', value: 'connector' }) | ||
| .pluck('document_id'); | ||
|
|
||
| if (!parentConnectorIds.length) return []; | ||
|
|
||
| const childImageIds = await knex('Document_Children') | ||
| .leftJoin('Document', 'Document_Children.child_document_id', 'Document.id') | ||
| .whereIn('Document_Children.parent_document_id', parentConnectorIds) | ||
| .andWhere('Document.type', 'image') | ||
| .pluck('Document.id'); | ||
|
|
||
| return childImageIds; | ||
| }; | ||
|
|
||
| /** | ||
| * @param { import("knex").Knex } knex | ||
| * @returns { Promise<void> } | ||
| */ | ||
| export const up = async (knex) => { | ||
| const childImageIds = await loadConnectorChildImageIds(knex); | ||
|
|
||
| await knex('Document') | ||
| .whereIn('id', childImageIds) | ||
| .update({ source_type: 'external' }); | ||
| }; | ||
|
|
||
| /** | ||
| * @param { import("knex").Knex } knex | ||
| * @returns { Promise<void> } | ||
| */ | ||
| export const down = async (knex) => { | ||
| const childImageIds = await loadConnectorChildImageIds(knex); | ||
|
|
||
| await knex('Document') | ||
| .whereIn('id', childImageIds) | ||
| .update({ source_type: 'internal' }); | ||
| }; |
This file contains hidden or 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 hidden or 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 hidden or 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
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.