-
- Downloads
fix: Improve HTTP response handling and update test data sources
Summary of changes - Modified the fetchData function to check for successful HTTP response status codes (200-299) instead of relying on the "ok" property. This change enhances error handling by providing more granular status checks, making the code more robust against unexpected responses. - Updated the test cases for both the "Select" and "Treeselect" components to use a consistent and valid URL for country data. The mappings for label and value templates were also updated for better clarity and accuracy, aligning the tests with expected response formats. - Adjusted the timeout for the "Select" test to ensure it has enough time for asynchronous operations that may occur during the fetching of options. - Ensured that the "done" callback in the "Treeselect" test is only called when an exception is caught, preventing unnecessary multiple calls to "done", which could lead to confusing test results.
Showing
- source/components/form/select.mjs 1 addition, 1 deletionsource/components/form/select.mjs
- test/cases/components/form/select.mjs 5 additions, 3 deletionstest/cases/components/form/select.mjs
- test/cases/components/form/tree-select.mjs 5 additions, 6 deletionstest/cases/components/form/tree-select.mjs
Please register or sign in to comment