mirror of
https://github.com/usebruno/bruno.git
synced 2026-06-11 09:51:30 +00:00
* feat: enhance import functionality with issue tracking and logging - Updated the import process to return both collections and issues for better error handling. - Introduced a new toast notification for displaying import issues, allowing users to copy or report them. - Enhanced logging for import issues, capturing errors and warnings during the import process. - Added new components for actionable toasts and import issues display. - Updated tests to validate the new import behavior and issue tracking. * feat: enhance import issues handling with new toast notifications and tests - Added optional testId prop to ActionableToast for better test targeting. - Updated ImportIssuesToast to include data-testid attributes for improved e2e testing. - Introduced a new Postman collection fixture to test partial import scenarios. - Created new tests to validate the import process, including issue reporting and copying functionality. - Implemented utility functions to manage import issues toasts during tests. * fix: improve clipboard copy functionality and handle import issues more robustly - Updated BulkImportCollectionLocation to always set import issues, ensuring consistent state management. - Enhanced clipboard copy functionality in ImportIssuesToast and BulkImportCollectionLocation to handle errors gracefully with user feedback. - Added aria-label for better accessibility in ActionableToast close button. * refactor: enhance import issue logging and toast notifications - Improved logging in BulkImportCollectionLocation and ImportCollectionLocation to provide detailed summaries of import issues, including counts of skipped items and warnings. - Updated ImportIssuesToast to handle long issue descriptions and provide user feedback for copying issue details to the clipboard. - Removed ActionableToast component and its styles, consolidating toast functionality within ImportIssuesToast for better maintainability. - Enhanced styling for ImportIssuesToast to improve user experience and accessibility. * refactor: update logging level for import issues in BulkImportCollectionLocation and ImportCollectionLocation - Changed log type from 'error' to 'warn' for import issue summaries in both components to better reflect the severity of the messages. - This adjustment improves clarity in the logging system and aligns with the intended handling of import warnings. * feat: enhance ImportIssuesToast with URL length warning and styling improvements - Added an alert icon and improved styling for the URL-too-long warning in ImportIssuesToast to enhance user experience. - Introduced a new test for verifying the display of the URL length warning when importing collections with many issues. - Updated locators to include a test ID for the URL-too-long warning, facilitating better end-to-end testing. * style: update ImportIssuesToast styling for improved user experience - Changed background and border colors in StyledWrapper for better visual consistency. - Enhanced box-shadow and close button styles for improved accessibility and interaction. - Adjusted padding and gap in warning messages for better layout and readability.
211 lines
5.7 KiB
JSON
211 lines
5.7 KiB
JSON
{
|
|
"info": {
|
|
"_postman_id": "test-import-issues-001",
|
|
"name": "Import Issues Test Collection",
|
|
"description": "A Postman collection designed to test partial import handling. Contains a mix of valid requests, requests with missing/invalid methods, and edge cases that should be gracefully handled.",
|
|
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
|
|
},
|
|
"item": [
|
|
{
|
|
"name": "Valid GET Request",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [
|
|
{ "key": "Accept", "value": "application/json" }
|
|
],
|
|
"url": {
|
|
"raw": "https://api.example.com/users",
|
|
"protocol": "https",
|
|
"host": ["api", "example", "com"],
|
|
"path": ["users"]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Missing Method (null)",
|
|
"request": {
|
|
"method": null,
|
|
"header": [],
|
|
"url": {
|
|
"raw": "https://api.example.com/should-be-skipped-1",
|
|
"protocol": "https",
|
|
"host": ["api", "example", "com"],
|
|
"path": ["should-be-skipped-1"]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Missing Method (absent)",
|
|
"request": {
|
|
"header": [],
|
|
"url": {
|
|
"raw": "https://api.example.com/should-be-skipped-2",
|
|
"protocol": "https",
|
|
"host": ["api", "example", "com"],
|
|
"path": ["should-be-skipped-2"]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Empty String Method",
|
|
"request": {
|
|
"method": "",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "https://api.example.com/should-be-skipped-3",
|
|
"protocol": "https",
|
|
"host": ["api", "example", "com"],
|
|
"path": ["should-be-skipped-3"]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Whitespace-Only Method",
|
|
"request": {
|
|
"method": " ",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "https://api.example.com/should-be-skipped-4",
|
|
"protocol": "https",
|
|
"host": ["api", "example", "com"],
|
|
"path": ["should-be-skipped-4"]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Valid POST Request",
|
|
"request": {
|
|
"method": "POST",
|
|
"header": [
|
|
{ "key": "Content-Type", "value": "application/json" }
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\"name\": \"test\", \"email\": \"test@example.com\"}",
|
|
"options": {
|
|
"raw": { "language": "json" }
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "https://api.example.com/users",
|
|
"protocol": "https",
|
|
"host": ["api", "example", "com"],
|
|
"path": ["users"]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "API Folder",
|
|
"item": [
|
|
{
|
|
"name": "Valid Nested GET",
|
|
"request": {
|
|
"method": "GET",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "https://api.example.com/nested/valid",
|
|
"protocol": "https",
|
|
"host": ["api", "example", "com"],
|
|
"path": ["nested", "valid"]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Nested Missing Method",
|
|
"request": {
|
|
"method": null,
|
|
"header": [],
|
|
"url": {
|
|
"raw": "https://api.example.com/nested/should-be-skipped",
|
|
"protocol": "https",
|
|
"host": ["api", "example", "com"],
|
|
"path": ["nested", "should-be-skipped"]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Deep Subfolder",
|
|
"item": [
|
|
{
|
|
"name": "Deep Valid Request",
|
|
"request": {
|
|
"method": "DELETE",
|
|
"header": [],
|
|
"url": {
|
|
"raw": "https://api.example.com/deep/valid",
|
|
"protocol": "https",
|
|
"host": ["api", "example", "com"],
|
|
"path": ["deep", "valid"]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "Deep Bad Method",
|
|
"request": {
|
|
"method": null,
|
|
"header": [],
|
|
"url": {
|
|
"raw": "https://api.example.com/deep/should-be-skipped",
|
|
"protocol": "https",
|
|
"host": ["api", "example", "com"],
|
|
"path": ["deep", "should-be-skipped"]
|
|
}
|
|
}
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"name": "Valid PUT Request",
|
|
"request": {
|
|
"method": "PUT",
|
|
"header": [
|
|
{ "key": "Content-Type", "value": "application/json" },
|
|
{ "key": "Authorization", "value": "Bearer {{token}}" }
|
|
],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\"name\": \"updated\"}",
|
|
"options": {
|
|
"raw": { "language": "json" }
|
|
}
|
|
},
|
|
"url": {
|
|
"raw": "https://api.example.com/users/{{userId}}",
|
|
"protocol": "https",
|
|
"host": ["api", "example", "com"],
|
|
"path": ["users", "{{userId}}"],
|
|
"variable": [
|
|
{ "key": "userId", "value": "123" }
|
|
]
|
|
}
|
|
}
|
|
},
|
|
{
|
|
"name": "No Request Object At All"
|
|
},
|
|
{
|
|
"name": "Valid PATCH Request",
|
|
"request": {
|
|
"method": "PATCH",
|
|
"header": [],
|
|
"body": {
|
|
"mode": "raw",
|
|
"raw": "{\"status\": \"active\"}"
|
|
},
|
|
"url": {
|
|
"raw": "https://api.example.com/users/1/status",
|
|
"protocol": "https",
|
|
"host": ["api", "example", "com"],
|
|
"path": ["users", "1", "status"]
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"variable": [
|
|
{ "key": "baseUrl", "value": "https://api.example.com" },
|
|
{ "key": "token", "value": "test-token-123" }
|
|
]
|
|
}
|