@thepalaceproject/circulation-admin 1.43.0-post.9 → 1.44.0-post.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (73) hide show
  1. package/CLAUDE.md +22 -10
  2. package/README.md +11 -5
  3. package/dist/circulation-admin.js +1 -1
  4. package/jest.config.js +11 -44
  5. package/package.json +1 -5
  6. package/tests/jest/components/AdvancedSearchBuilder.test.tsx +111 -0
  7. package/tests/jest/components/Announcement.test.tsx +76 -0
  8. package/tests/jest/components/AnnouncementForm.test.tsx +229 -0
  9. package/tests/jest/components/AnnouncementsSection.test.tsx +146 -0
  10. package/tests/jest/components/Autocomplete.test.tsx +67 -0
  11. package/tests/jest/components/BookCoverEditor.test.tsx +393 -0
  12. package/tests/jest/components/BookDetailsEditor.test.tsx +275 -0
  13. package/tests/jest/components/BookDetailsTabContainer.test.tsx +237 -0
  14. package/tests/jest/components/BookEditForm.test.tsx +352 -0
  15. package/tests/jest/components/BookEditor.test.tsx +20 -21
  16. package/tests/jest/components/CatalogPage.test.tsx +158 -0
  17. package/tests/jest/components/CatalogServices.test.tsx +38 -1
  18. package/tests/jest/components/ChangePasswordForm.test.tsx +163 -0
  19. package/tests/jest/components/Classifications.test.tsx +166 -0
  20. package/tests/jest/components/ClassificationsForm.test.tsx +458 -0
  21. package/tests/jest/components/ClassificationsTable.test.tsx +57 -0
  22. package/tests/jest/components/Collections.test.tsx +335 -7
  23. package/tests/jest/components/ColorPicker.test.tsx +58 -0
  24. package/tests/jest/components/ComplaintForm.test.tsx +171 -0
  25. package/tests/jest/components/Complaints.test.tsx +259 -0
  26. package/tests/jest/components/ConfigTabContainer.test.tsx +196 -0
  27. package/tests/jest/components/ContextProvider.test.tsx +138 -0
  28. package/tests/jest/components/Contributors.test.tsx +157 -0
  29. package/tests/jest/components/CustomListEditor.test.tsx +367 -0
  30. package/tests/jest/components/CustomListEntriesEditor.test.tsx +1240 -0
  31. package/tests/jest/components/CustomLists.test.tsx +621 -4
  32. package/tests/jest/components/CustomListsForBook.test.tsx +353 -0
  33. package/tests/jest/components/DiagnosticsServiceTabs.test.tsx +141 -0
  34. package/tests/jest/components/DiagnosticsServiceType.test.tsx +75 -0
  35. package/tests/jest/components/DiscoveryServices.test.tsx +154 -7
  36. package/tests/jest/components/EditableConfigList.test.tsx +598 -7
  37. package/tests/jest/components/EditableInput.test.tsx +250 -1
  38. package/tests/jest/components/EditorField.test.tsx +95 -0
  39. package/tests/jest/components/GenreForm.test.tsx +152 -0
  40. package/tests/jest/components/Header.test.tsx +421 -0
  41. package/tests/jest/components/IndividualAdminEditForm.test.tsx +506 -1
  42. package/tests/jest/components/IndividualAdmins.test.tsx +124 -8
  43. package/tests/jest/components/InputList.test.tsx +493 -0
  44. package/tests/jest/components/Lane.test.tsx +132 -10
  45. package/tests/jest/components/LaneCustomListsEditor.test.tsx +450 -0
  46. package/tests/jest/components/LaneEditor.test.tsx +377 -9
  47. package/tests/jest/components/Lanes.test.tsx +446 -0
  48. package/tests/jest/components/LanesSidebar.test.tsx +621 -0
  49. package/tests/jest/components/Libraries.test.tsx +48 -0
  50. package/tests/jest/components/LibraryEditForm.test.tsx +383 -0
  51. package/tests/jest/components/LibraryRegistration.test.tsx +354 -0
  52. package/tests/jest/components/LibraryRegistrationForm.test.tsx +203 -0
  53. package/tests/jest/components/MetadataServices.test.tsx +37 -1
  54. package/tests/jest/components/NeighborhoodAnalyticsForm.test.tsx +167 -0
  55. package/tests/jest/components/PairedMenus.test.tsx +220 -0
  56. package/tests/jest/components/PatronAuthServices.test.tsx +114 -0
  57. package/tests/jest/components/ProtocolFormField.test.tsx +443 -7
  58. package/tests/jest/components/ResetAdobeId.test.tsx +302 -0
  59. package/tests/jest/components/SelfTests.test.tsx +601 -0
  60. package/tests/jest/components/SelfTestsTabContainer.test.tsx +216 -0
  61. package/tests/jest/components/ServiceEditForm.test.tsx +1092 -0
  62. package/tests/jest/components/SitewideAnnouncements.test.tsx +134 -0
  63. package/tests/jest/components/Stats.test.tsx +0 -7
  64. package/tests/jest/components/TextWithEditMode.test.tsx +218 -0
  65. package/tests/jest/components/ToolTip.test.tsx +46 -0
  66. package/tests/jest/components/TroubleshootingCategoryPage.test.tsx +69 -0
  67. package/tests/jest/components/TroubleshootingPage.test.tsx +94 -0
  68. package/tests/jest/features/book.test.ts +75 -80
  69. package/tests/jest/fixtures/classificationsData.ts +45 -0
  70. package/tests/jest/fixtures/genreData.ts +811 -0
  71. package/tests/jest/README.md +0 -6
  72. package/tests/jest/legacy-setup.ts +0 -13
  73. package/tests/jest/legacyJsdomEnvironment.js +0 -49
@@ -1,6 +0,0 @@
1
- # Jest Unit Tests
2
-
3
- This directory contains unit tests that run using jest. The directory structure should mirror that of the `src` tree.
4
-
5
- To run these tests, use the command `npm run test-jest`. These tests are executed along with the older mocha-based tests when `npm test` is run.
6
- To run a single test file, use the command `npm run test-jest-file [filename]`.
@@ -1,13 +0,0 @@
1
- import { configure } from "enzyme";
2
- import * as Adapter from "enzyme-adapter-react-16";
3
-
4
- // Setup for the legacy enzyme + chai + sinon tests under `src/**/__tests__/`.
5
- // Replaces what `src/testHelper.ts` did for mocha. Delete alongside the last
6
- // enzyme test.
7
-
8
- configure({ adapter: new Adapter() });
9
-
10
- // Unhandled promise rejections are tolerated for these tests — see the comment in
11
- // `legacyJsdomEnvironment.js`. It cannot be done from here: jest hands test code a
12
- // *copy* of `process`, so a listener registered in this file never reaches the real
13
- // one that Node checks before throwing.
@@ -1,49 +0,0 @@
1
- "use strict";
2
-
3
- const JSDOMEnvironment = require("jest-environment-jsdom").default;
4
-
5
- const warnUnhandledRejection = (reason) => {
6
- console.warn("Unhandled promise rejection in a legacy test:", reason);
7
- };
8
-
9
- /**
10
- * jsdom environment for the legacy enzyme tests. Delete it with the last one.
11
- *
12
- * Two things it restores that `src/testHelper.ts` used to provide under mocha:
13
- *
14
- * 1. `global.jsdom`. A handful of tests call `global.jsdom.reconfigure({ url })` to
15
- * change the page origin mid-test. `history.replaceState` is not a substitute —
16
- * they navigate across origins (`http://example.com`), which it cannot do.
17
- *
18
- * 2. Tolerance for unhandled promise rejections. Several suites stub a `fetch` that
19
- * rejects, and nothing awaits the result; the rejection surfaces after the test
20
- * has already passed. Mocha shrugged those off because its runner keeps an
21
- * `unhandledRejection` listener installed, and Node only throws when there are
22
- * none. Under jest they kill the worker and take the whole suite with them.
23
- *
24
- * Re-arming has to happen on the `teardown` event, not in the constructor.
25
- * `jest-circus/globalErrorHandlers` reads `process.listeners()` off the sandbox's
26
- * *copied* `process` (always empty) but calls `removeAllListeners()` on the real
27
- * one. So any listener registered earlier is dropped at `setup` and "restored"
28
- * from an empty list, leaving zero listeners during the post-run window where
29
- * these rejections actually land.
30
- *
31
- * Scoping this to the legacy environment keeps the modern `tests/jest/` suite
32
- * strict: jest clears listeners at each file's `setup`, and nothing re-arms one
33
- * for a project that does not use this environment.
34
- */
35
- module.exports = class LegacyJSDOMEnvironment extends JSDOMEnvironment {
36
- constructor(config, context) {
37
- super(config, context);
38
- this.global.jsdom = this.dom;
39
- }
40
-
41
- handleTestEvent(event) {
42
- if (
43
- event.name === "teardown" &&
44
- process.listenerCount("unhandledRejection") === 0
45
- ) {
46
- process.on("unhandledRejection", warnUnhandledRejection);
47
- }
48
- }
49
- };