@thepalaceproject/circulation-admin 1.41.0-post.33 → 1.41.0-post.34

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.
package/eslint.config.mjs CHANGED
@@ -14,6 +14,15 @@ export default tseslint.config(
14
14
  ...tseslint.configs.recommended,
15
15
  react.configs.flat.recommended,
16
16
  jsxA11y.flatConfigs.strict,
17
+ {
18
+ // Global so react rules can detect the version everywhere they run,
19
+ // including config files outside the files filter below.
20
+ settings: {
21
+ react: {
22
+ version: "detect",
23
+ },
24
+ },
25
+ },
17
26
  {
18
27
  files: ["**/*.{js,jsx,ts,tsx}"],
19
28
  plugins: {
@@ -28,11 +37,6 @@ export default tseslint.config(
28
37
  ...globals.jest,
29
38
  },
30
39
  },
31
- settings: {
32
- react: {
33
- version: "detect",
34
- },
35
- },
36
40
  rules: {
37
41
  // Enable the two classic react-hooks rules explicitly rather than
38
42
  // spreading `reactHooks.configs.recommended.rules`. eslint-plugin-react-hooks
@@ -78,18 +82,6 @@ export default tseslint.config(
78
82
  },
79
83
  },
80
84
  // Disable ESLint formatting rules that conflict with Prettier.
81
- // This should be nearly the last option so it overrides previous rules.
82
- prettier,
83
- {
84
- // ESLint merges `linterOptions` with last-writer-wins
85
- // semantics, so placing it after every preset spread keeps a future plugin
86
- // config from silently re-enabling it. Flat config reports unused
87
- // eslint-disable directives by default; the previous .eslintrc setup did
88
- // not. Keep it off to preserve prior behavior and avoid the pre-commit hook
89
- // auto-stripping existing directives. Cleaning up stale directives can be
90
- // done as a separate, focused change.
91
- linterOptions: {
92
- reportUnusedDisableDirectives: "off",
93
- },
94
- }
85
+ // This should be the last option so it overrides previous rules.
86
+ prettier
95
87
  );
package/jest.polyfills.js CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  const globalThis = window;
4
4
 
5
- // eslint-disable-next-line @typescript-eslint/no-var-requires
6
5
  const { fetch, Headers, Request, Response } = require("fetch-ponyfill")();
7
6
  Object.defineProperties(globalThis, {
8
7
  fetch: { value: fetch, writable: true },
package/package.json CHANGED
@@ -15,6 +15,7 @@
15
15
  "scripts": {
16
16
  "prepublish": "npm run prod",
17
17
  "lint": "tslint -c tslint.json src/*.ts src/*.tsx src/**/*.ts src/**/*.tsx src/**/**/*.ts src/**/**/*.tsx && sass-lint -c .sass-lint.yml -v -q",
18
+ "lint:js": "eslint . --max-warnings 0",
18
19
  "test-js": "npm run lint && tsc && cp -r src/stylesheets lib && cp -r src/images lib && mocha --require lib/testHelper.js lib/__tests__/*.js lib/**/__tests__/*.js lib/**/**/__tests__/*.js",
19
20
  "test-js-file": "npm run lint && tsc && cp -r src/stylesheets lib && cp -r src/images lib && mocha --require lib/testHelper.js",
20
21
  "test-js-list": "mocha --require lib/testHelper.js lib/__tests__/*.js lib/**/__tests__/*.js lib/**/**/__tests__/*.js --reporter ./testReporter.js",
@@ -154,5 +155,5 @@
154
155
  "*.{js,jsx,ts,tsx,css,md}": "prettier --write",
155
156
  "*.{js,css,md}": "prettier --write"
156
157
  },
157
- "version": "1.41.0-post.33"
158
+ "version": "1.41.0-post.34"
158
159
  }
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env node
2
- /* eslint-disable @typescript-eslint/no-var-requires */
3
2
  /**
4
3
  * Reads ../circulation/docs/FUNCTIONS.md, converts it to HTML, and writes
5
4
  * src/content/patronBlockingFunctionsHtml.ts — a TypeScript module that
package/testReporter.js CHANGED
@@ -1,5 +1,3 @@
1
- /* eslint-disable @typescript-eslint/no-var-requires */
2
-
3
1
  const mocha = require("mocha");
4
2
  const sinon = require("sinon");
5
3
  const color = require("colors-cli/safe");
@@ -1,4 +1,3 @@
1
- const breadcrumbSelector = "ol.breadcrumb";
2
1
  let loadingSelector;
3
2
  let catalogPage;
4
3
  let bookPage;
@@ -21,68 +20,62 @@ module.exports = {
21
20
  });
22
21
  },
23
22
 
24
- "navigate to the first lane and back": function(browser) {
23
+ "navigate to the first lane and back": function (browser) {
25
24
  const { laneSelector } = catalogPage.elements;
26
25
  const { nthBreadcrumbSelector } = catalogPage;
27
26
 
28
- browser
29
- .goHome()
30
- .url(function(result) {
31
- let catalogUrl = result.value;
32
- this.getAttribute(laneSelector, "href", function(result) {
33
- let laneUrl = result.value;
34
- this.getText(laneSelector, function(laneText) {
35
- let laneTitle = laneText.value;
27
+ browser.goHome().url(function (result) {
28
+ let catalogUrl = result.value;
29
+ this.getAttribute(laneSelector, "href", function (result) {
30
+ let laneUrl = result.value;
31
+ this.getText(laneSelector, function (laneText) {
32
+ let laneTitle = laneText.value;
36
33
 
37
- this.click(laneSelector)
38
- .waitForElementNotPresent(loadingSelector, 5000)
39
- .verify.noError()
40
- .verify.urlEquals(laneUrl)
41
- .verify.titleContains(laneTitle)
42
- // when a lane selector is clicked, we go into another
43
- // navigation level
44
- .verify.elementPresent(nthBreadcrumbSelector(3))
45
- .back()
46
- .waitForElementNotPresent(loadingSelector, 5000)
47
- .verify.urlEquals(catalogUrl)
48
- .verify.elementNotPresent(nthBreadcrumbSelector(3));
49
- });
34
+ this.click(laneSelector)
35
+ .waitForElementNotPresent(loadingSelector, 5000)
36
+ .verify.noError()
37
+ .verify.urlEquals(laneUrl)
38
+ .verify.titleContains(laneTitle)
39
+ // when a lane selector is clicked, we go into another
40
+ // navigation level
41
+ .verify.elementPresent(nthBreadcrumbSelector(3))
42
+ .back()
43
+ .waitForElementNotPresent(loadingSelector, 5000)
44
+ .verify.urlEquals(catalogUrl)
45
+ .verify.elementNotPresent(nthBreadcrumbSelector(3));
50
46
  });
51
47
  });
48
+ });
52
49
  },
53
50
 
54
- "navigate to the first book in the first lane and back": function(browser) {
55
- const {
56
- bookSelector,
57
- bookLinkTitleSelector
58
- } = catalogPage.elements;
51
+ "navigate to the first book in the first lane and back": function (browser) {
52
+ const { bookSelector, bookLinkTitleSelector } = catalogPage.elements;
59
53
  const { bookTitleSelector } = bookPage.elements;
60
54
 
61
- browser
62
- .goHome()
63
- .url(function(result) {
64
- let catalogUrl = result.value;
65
- this.getAttribute(bookSelector, "href", function(result) {
66
- let bookUrl = result.value;
67
- this.getText(bookLinkTitleSelector, function(result) {
68
- let bookTitle = result.value;
69
- this
70
- .click(bookSelector)
71
- .waitForElementPresent(bookTitleSelector, 5000)
72
- .verify.noError()
73
- .verify.urlEquals(bookUrl)
74
- .verify.titleContains(bookTitle)
75
- .verify.containsText(bookTitleSelector, bookTitle)
76
- .back()
77
- .waitForElementNotPresent(loadingSelector, 5000)
78
- .verify.urlEquals(catalogUrl)
79
- .verify.elementNotPresent(bookTitleSelector);
80
- });
55
+ browser.goHome().url(function (result) {
56
+ let catalogUrl = result.value;
57
+ this.getAttribute(bookSelector, "href", function (result) {
58
+ let bookUrl = result.value;
59
+ this.getText(bookLinkTitleSelector, function (result) {
60
+ let bookTitle = result.value;
61
+ this.click(bookSelector)
62
+ .waitForElementPresent(bookTitleSelector, 5000)
63
+ .verify.noError()
64
+ .verify.urlEquals(bookUrl)
65
+ .verify.titleContains(bookTitle)
66
+ .verify.containsText(bookTitleSelector, bookTitle)
67
+ .back()
68
+ .waitForElementNotPresent(loadingSelector, 5000)
69
+ .verify.urlEquals(catalogUrl)
70
+ .verify.elementNotPresent(bookTitleSelector);
81
71
  });
82
72
  });
73
+ });
83
74
  },
84
75
 
85
- "navigate to the first book, click through tabs, refresh page, go back": function(browser) {
76
+ "navigate to the first book, click through tabs, refresh page, go back": function (
77
+ browser
78
+ ) {
86
79
  const { bookSelector } = catalogPage.elements;
87
80
  const {
88
81
  bookTitleSelector,
@@ -95,87 +88,84 @@ module.exports = {
95
88
  classificationsTabSelector,
96
89
  coverTabSelector,
97
90
  complaintsTabSelector,
98
- listsTabSelector
91
+ listsTabSelector,
99
92
  } = bookPage.elements;
100
93
 
101
- browser
102
- .goHome()
103
- .getAttribute(bookSelector, "href", function(result) {
104
- let bookUrl = result.value;
105
- this.getAttribute(bookSelector, "title", function(result) {
106
- let bookTitle = result.value;
107
- this
108
- .click(bookSelector)
109
- .waitForElementPresent(bookTitleSelector, 5000)
110
- .verify.noError()
111
- .verify.urlEquals(bookUrl)
112
- .verify.containsText(bookTitleSelector, bookTitle)
94
+ browser.goHome().getAttribute(bookSelector, "href", function (result) {
95
+ let bookUrl = result.value;
96
+ this.getAttribute(bookSelector, "title", function (result) {
97
+ let bookTitle = result.value;
98
+ this.click(bookSelector)
99
+ .waitForElementPresent(bookTitleSelector, 5000)
100
+ .verify.noError()
101
+ .verify.urlEquals(bookUrl)
102
+ .verify.containsText(bookTitleSelector, bookTitle)
113
103
 
114
- // go to the edit tab
115
- .click(editTabSelector)
116
- .waitForElementPresent(titleInputSelector, 5000)
117
- .verify.urlContains("tab/edit")
118
- .verify.value(titleInputSelector, bookTitle)
104
+ // go to the edit tab
105
+ .click(editTabSelector)
106
+ .waitForElementPresent(titleInputSelector, 5000)
107
+ .verify.urlContains("tab/edit")
108
+ .verify.value(titleInputSelector, bookTitle)
119
109
 
120
- // go to the classifications tab
121
- .click(classificationsTabSelector)
122
- .waitForElementPresent(genreInputSelector, 5000)
123
- .verify.urlContains("tab/classifications")
110
+ // go to the classifications tab
111
+ .click(classificationsTabSelector)
112
+ .waitForElementPresent(genreInputSelector, 5000)
113
+ .verify.urlContains("tab/classifications")
124
114
 
125
- // go to the image cover tab
126
- .click(coverTabSelector)
127
- .waitForElementPresent(coverInputSelector, 5000)
128
- .verify.urlContains("tab/cover")
115
+ // go to the image cover tab
116
+ .click(coverTabSelector)
117
+ .waitForElementPresent(coverInputSelector, 5000)
118
+ .verify.urlContains("tab/cover")
129
119
 
130
- // go to the complaints tab
131
- .click(complaintsTabSelector)
132
- .waitForElementPresent(complaintInputSelector, 5000)
133
- .verify.urlContains("tab/complaints")
134
- .refresh()
135
- .waitForElementPresent(complaintInputSelector, 5000)
136
- .verify.urlContains("tab/complaints")
137
- .verify.titleContains(bookTitle)
120
+ // go to the complaints tab
121
+ .click(complaintsTabSelector)
122
+ .waitForElementPresent(complaintInputSelector, 5000)
123
+ .verify.urlContains("tab/complaints")
124
+ .refresh()
125
+ .waitForElementPresent(complaintInputSelector, 5000)
126
+ .verify.urlContains("tab/complaints")
127
+ .verify.titleContains(bookTitle)
138
128
 
139
- // go to the list tab
140
- .click(listsTabSelector)
141
- .waitForElementPresent(listInputSelector, 5000)
142
- .verify.urlContains("tab/list")
129
+ // go to the list tab
130
+ .click(listsTabSelector)
131
+ .waitForElementPresent(listInputSelector, 5000)
132
+ .verify.urlContains("tab/list")
143
133
 
144
- // go back to the complaints tab
145
- .back()
146
- // go back to the cover tab
147
- .back()
148
- // go back to the classifications tab
149
- .back()
150
- // go back to the edit tab
151
- .back()
152
- // go back to the main details tab
153
- .back()
154
- .waitForElementPresent(bookTitleSelector, 5000)
155
- .verify.urlEquals(bookUrl);
156
- });
134
+ // go back to the complaints tab
135
+ .back()
136
+ // go back to the cover tab
137
+ .back()
138
+ // go back to the classifications tab
139
+ .back()
140
+ // go back to the edit tab
141
+ .back()
142
+ // go back to the main details tab
143
+ .back()
144
+ .waitForElementPresent(bookTitleSelector, 5000)
145
+ .verify.urlEquals(bookUrl);
157
146
  });
147
+ });
158
148
  },
159
149
 
160
- "navigate to top-level feeds": function(browser) {
150
+ "navigate to top-level feeds": function (browser) {
161
151
  const {
162
152
  laneSelector,
163
153
  complaintsSelector,
164
- hiddenSelector
154
+ hiddenSelector,
165
155
  } = catalogPage.elements;
166
156
  const { nthBreadcrumbSelector } = catalogPage;
167
157
 
168
158
  browser
169
159
  .goHome()
170
- .getAttribute(complaintsSelector, "href", function(result) {
160
+ .getAttribute(complaintsSelector, "href", function (result) {
171
161
  let complaintsUrl = result.value;
172
- this.getText(complaintsSelector, function(result) {
162
+ this.getText(complaintsSelector, function (result) {
173
163
  let complaintsTitle = result.value;
174
- this.getAttribute(hiddenSelector, "href", function(result) {
175
- let hiddenUrl = result.value
176
- this.getText(hiddenSelector, function(result) {
164
+ this.getAttribute(hiddenSelector, "href", function (result) {
165
+ let hiddenUrl = result.value;
166
+ this.getText(hiddenSelector, function (result) {
177
167
  let hiddenTitle = result.value;
178
- this.getText(laneSelector, function(result) {
168
+ this.getText(laneSelector, function (result) {
179
169
  let laneTitle = result.value;
180
170
  this
181
171
  // go to the first lane
@@ -192,7 +182,10 @@ module.exports = {
192
182
  .waitForElementNotPresent(loadingSelector, 5000)
193
183
  .assert.noError()
194
184
  .assert.containsText(nthBreadcrumbSelector(1), "All Books")
195
- .assert.containsText(nthBreadcrumbSelector(2), complaintsTitle)
185
+ .assert.containsText(
186
+ nthBreadcrumbSelector(2),
187
+ complaintsTitle
188
+ )
196
189
  .verify.urlEquals(complaintsUrl)
197
190
 
198
191
  // go to the hidden books page
@@ -209,7 +202,7 @@ module.exports = {
209
202
  });
210
203
  },
211
204
 
212
- "navigate to dashboard and back to catalog": function(browser) {
205
+ "navigate to dashboard and back to catalog": function (browser) {
213
206
  const {
214
207
  catalogSelector,
215
208
  dashboardSelector,
@@ -220,12 +213,11 @@ module.exports = {
220
213
 
221
214
  browser
222
215
  .goHome()
223
- .getAttribute(nthBreadcrumbSelector(1), "title", function(result) {
216
+ .getAttribute(nthBreadcrumbSelector(1), "title", function (result) {
224
217
  let libraryName = result.value;
225
- this.getAttribute(catalogSelector, "href", function(result) {
218
+ this.getAttribute(catalogSelector, "href", function (result) {
226
219
  let catalogUrl = result.value;
227
- this.getAttribute(dashboardSelector, "href", function(result) {
228
- let dashboardUrl = result.value
220
+ this.getAttribute(dashboardSelector, "href", function () {
229
221
  this
230
222
  // go to the dashboard
231
223
  .click(dashboardSelector)
@@ -241,18 +233,16 @@ module.exports = {
241
233
  .assert.noError()
242
234
  .verify.elementPresent(nthBreadcrumbSelector(1))
243
235
  .verify.urlEquals(catalogUrl)
244
- .verify.titleContains(`Palace Collection Manager - ${libraryName}`);
236
+ .verify.titleContains(
237
+ `Palace Collection Manager - ${libraryName}`
238
+ );
245
239
  });
246
240
  });
247
241
  });
248
242
  },
249
243
 
250
- "navigate to two different book detail pages": function(browser) {
251
- const {
252
- laneSelector,
253
- firstBookSelector,
254
- secondBookSelector
255
- } = catalogPage.elements;
244
+ "navigate to two different book detail pages": function (browser) {
245
+ const { firstBookSelector, secondBookSelector } = catalogPage.elements;
256
246
  const { bookTitleSelector } = bookPage.elements;
257
247
  const { nthBreadcrumbSelector } = catalogPage;
258
248
 
@@ -263,7 +253,7 @@ module.exports = {
263
253
  .click(firstBookSelector)
264
254
  .waitForElementNotPresent(loadingSelector, 5000)
265
255
  .waitForElementPresent(bookTitleSelector, 5000)
266
- .getText(bookTitleSelector, function(result) {
256
+ .getText(bookTitleSelector, function (result) {
267
257
  let firstTitle = result.value;
268
258
 
269
259
  this
@@ -278,7 +268,7 @@ module.exports = {
278
268
  .waitForElementPresent(bookTitleSelector, 50000)
279
269
 
280
270
  // making sure that we are on a new book
281
- .getText(bookTitleSelector, function(result) {
271
+ .getText(bookTitleSelector, function (result) {
282
272
  let secondTitle = result.value;
283
273
  this.assert.notEqual(firstTitle, secondTitle);
284
274
  });
@@ -290,5 +280,5 @@ module.exports = {
290
280
  */
291
281
  after: (browser) => {
292
282
  browser.end();
293
- }
283
+ },
294
284
  };
@@ -1,44 +1,30 @@
1
- const http = require('follow-redirects').http
1
+ const http = require("follow-redirects").http;
2
2
 
3
- const fetchGroupPage = (browser) => {
3
+ const fetchGroupPage = () => {
4
4
  return new Promise((resolve, reject) => {
5
- http.get({
6
- host: "localhost",
7
- port: 6500,
8
- path: "/groups/"
9
- }, (response) => {
10
- let body = "";
5
+ http.get(
6
+ {
7
+ host: "localhost",
8
+ port: 6500,
9
+ path: "/groups/",
10
+ },
11
+ (response) => {
12
+ let body = "";
11
13
 
12
- response.on("data", (chunk) => {
13
- body += chunk;
14
- });
14
+ response.on("data", (chunk) => {
15
+ body += chunk;
16
+ });
15
17
 
16
- response.on("error", (err) => {
17
- reject(err);
18
- });
18
+ response.on("error", (err) => {
19
+ reject(err);
20
+ });
19
21
 
20
- response.on("end", () => {
21
- resolve(body);
22
- });
23
- });
24
- });
25
- }
26
- const getAdminBookUrlAndTitle = (body, browser) => {
27
- const bookTitle = body.match(/<entry [\s\S]+?<title>([^<]+)<\/title>/i)[1];
28
- const link = body.match(/<link [^>]*rel="alternate[^>]+\/>/i)[0];
29
- const id = body.match(/<id>[\s\S]+?<\/id>/i)[0];
30
- const lib = id.match(/\/[\w]+/i)[0]; // includes forward slash
31
- const bookUrl = link.match(/href="([^"]+)"/)[1];
32
- const entryBaseUrl = browser.globals.homeUrl.replace("/admin/web/", lib + "/works");
33
-
34
- // transform the book url into an admin book url
35
- const adminBookUrl =
36
- browser.globals.homeUrl + "collection" + lib + "/book" + lib +
37
- encodeURIComponent(
38
- bookUrl.replace(entryBaseUrl, "")
22
+ response.on("end", () => {
23
+ resolve(body);
24
+ });
25
+ }
39
26
  );
40
-
41
- return { adminBookUrl, bookTitle };
27
+ });
42
28
  };
43
29
  const getAdminListUrl = (body, browser) => {
44
30
  const listBaseUrl = `${browser.globals.homeUrl}lists`;
@@ -56,11 +42,10 @@ module.exports = {
56
42
  loginPage = browser.page.login();
57
43
  loadingSelector = browser.page.catalog().elements.loadingSelector;
58
44
 
59
- fetchGroupPage(browser)
60
- .then(data => {
61
- body = data
62
- done();
63
- });
45
+ fetchGroupPage(browser).then((data) => {
46
+ body = data;
47
+ done();
48
+ });
64
49
  },
65
50
 
66
51
  "attempt to view the admin list page before signing in": (browser) => {
@@ -100,5 +85,5 @@ module.exports = {
100
85
 
101
86
  afterEach: (browser) => {
102
87
  browser.end();
103
- }
88
+ },
104
89
  };
@@ -5,7 +5,7 @@ import AdvancedSearchBuilder from "../../../src/components/AdvancedSearchBuilder
5
5
 
6
6
  describe("AdvancedSearchBuilder", () => {
7
7
  it("renders a placeholder and help text when the publication date filter is selected", async () => {
8
- const user = userEvent.setup();
8
+ userEvent.setup();
9
9
 
10
10
  const query = {
11
11
  id: "0",
@@ -11,7 +11,6 @@ import { ConfigurationSettings } from "../../../src/interfaces";
11
11
  describe("CustomLists", () => {
12
12
  // Stub scrollTo, since a component in the render tree will try to call it, and it is not
13
13
  // provided by JSDOM.
14
- // eslint-disable-next-line @typescript-eslint/no-empty-function
15
14
  Element.prototype.scrollTo = () => {};
16
15
 
17
16
  const server = setupServer(
@@ -56,7 +56,6 @@ const MOCK_DEBUG_RESULTS: PatronDebugResponse = {
56
56
  };
57
57
 
58
58
  describe("DebugAuthentication", () => {
59
- /* eslint-disable @typescript-eslint/no-empty-function */
60
59
  const queryClient = new QueryClient({
61
60
  defaultOptions: {
62
61
  queries: {
@@ -69,7 +68,6 @@ describe("DebugAuthentication", () => {
69
68
  error: process.env.NODE_ENV === "test" ? () => {} : console.error,
70
69
  },
71
70
  });
72
- /* eslint-enable @typescript-eslint/no-empty-function */
73
71
 
74
72
  const server = setupServer(
75
73
  http.get(AUTH_METHODS_PATH, () =>
@@ -55,7 +55,6 @@ const setupMockServer = () => {
55
55
  };
56
56
 
57
57
  describe("InventoryReportRequestModal", () => {
58
- /* eslint-disable @typescript-eslint/no-empty-function */
59
58
  const queryClient = new QueryClient({
60
59
  defaultOptions: {
61
60
  queries: {
@@ -68,7 +67,6 @@ describe("InventoryReportRequestModal", () => {
68
67
  error: process.env.NODE_ENV === "test" ? () => {} : console.error,
69
68
  },
70
69
  });
71
- /* eslint-enable @typescript-eslint/no-empty-function */
72
70
 
73
71
  describe("query hooks call correct api methods", () => {
74
72
  const wrapper = componentWithProviders({ queryClient });
@@ -1,6 +1,5 @@
1
1
  import * as React from "react";
2
2
  import { render, screen, act, fireEvent } from "@testing-library/react";
3
- import userEvent from "@testing-library/user-event";
4
3
  import JsonField, { JsonFieldHandle } from "../../../src/components/JsonField";
5
4
 
6
5
  const setting = {
@@ -12,7 +12,7 @@ import LaneEditor from "../../../src/components/LaneEditor";
12
12
 
13
13
  jest.mock("../../../src/components/LaneCustomListsEditor", () => ({
14
14
  __esModule: true,
15
- default: (props) => <div data-testid="LaneCustomListsEditor" />,
15
+ default: () => <div data-testid="LaneCustomListsEditor" />,
16
16
  }));
17
17
 
18
18
  const customListsData = [
@@ -1,5 +1,5 @@
1
1
  import * as React from "react";
2
- import { render, screen, waitFor } from "@testing-library/react";
2
+ import { render, screen } from "@testing-library/react";
3
3
  import userEvent from "@testing-library/user-event";
4
4
  import { PatronBlockingRulesHelpModal } from "../../../src/components/PatronBlockingRulesHelpModal";
5
5
 
@@ -29,9 +29,7 @@ describe("PatronBlockingRulesHelpModal", () => {
29
29
 
30
30
  it("does not render when show is false", () => {
31
31
  render(<PatronBlockingRulesHelpModal {...baseProps} show={false} />);
32
- expect(
33
- screen.queryByText(/Patron Blocking Rules — Help/i)
34
- ).toBeNull();
32
+ expect(screen.queryByText(/Patron Blocking Rules — Help/i)).toBeNull();
35
33
  });
36
34
 
37
35
  it("shows a loading indicator when fieldsLoading is true", () => {
@@ -84,7 +82,9 @@ describe("PatronBlockingRulesHelpModal", () => {
84
82
  />
85
83
  );
86
84
  expect(
87
- screen.getByText(/Save the service before template variables can be fetched/i)
85
+ screen.getByText(
86
+ /Save the service before template variables can be fetched/i
87
+ )
88
88
  ).toBeTruthy();
89
89
  expect(screen.queryByText("fines")).toBeNull();
90
90
  });
@@ -97,9 +97,7 @@ describe("PatronBlockingRulesHelpModal", () => {
97
97
  fieldsError={null}
98
98
  />
99
99
  );
100
- expect(
101
- screen.getByText(/No field data available/i)
102
- ).toBeTruthy();
100
+ expect(screen.getByText(/No field data available/i)).toBeTruthy();
103
101
  });
104
102
 
105
103
  it("renders null values as italic 'null'", () => {
@@ -6,7 +6,6 @@ import { LibrariesData } from "../../../src/interfaces";
6
6
  import buildStore from "../../../src/store";
7
7
  import { setupServer } from "msw/node";
8
8
  import { http, HttpResponse } from "msw";
9
- import renderWithContext from "../testUtils/renderWithContext";
10
9
  import { renderWithProviders } from "../testUtils/withProviders";
11
10
  import QuicksightDashboardPage from "../../../src/components/QuicksightDashboardPage";
12
11