Skip to content

Commit

Permalink
UIPQB-70 Array fields support verification (#78)
Browse files Browse the repository at this point in the history
  • Loading branch information
vashjs authored Jan 16, 2024
1 parent 259c070 commit ab93d3a
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* [UIPQB-53](https://issues.folio.org/browse/UIPQB-53) Add support for $contains and $not_contains operators
* [UIPQB-66](https://issues.folio.org/browse/UIPQB-66) Localize dates in results view.
* [UIPQB-54](https://issues.folio.org/browse/UIPQB-54) Add support for array fields in query results.
* [UIPQB-70](https://issues.folio.org/browse/UIPQB-70) Array fields support verification.

## [1.0.0](https://github.com/folio-org/ui-plugin-query-builder/tree/v1.0.0) (2023-10-12)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { render, cleanup, fireEvent, waitFor } from '@testing-library/react';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import Intl from '../../../../../test/jest/__mock__/intlProvider.mock';
import '../../../../../test/jest/__mock__/resizeObserver.mock';
import { DataTypeInput } from './DataTypeInput';
import { DATA_TYPES } from '../../../../constants/dataTypes';
import { OPERATORS } from '../../../../constants/operators';
Expand Down
2 changes: 1 addition & 1 deletion src/QueryBuilder/ResultViewer/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export const getTableMetadata = (entityType) => {
if (dataType === DATA_TYPES.DateType) {
return <FormattedDate value={item[value]} />;
} else if (dataType === DATA_TYPES.ArrayType) {
return item[value].join('|');
return item[value]?.join('|');
} else {
// If value is empty we will return empty string
// instead of undefined
Expand Down
1 change: 1 addition & 0 deletions test/jest/__mock__/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@ import '@folio/stripes-acq-components/test/jest/__mock__/';

import './reactItl.mock';
import './intlProvider.mock';
import './resizeObserver.mock';
5 changes: 5 additions & 0 deletions test/jest/__mock__/resizeObserver.mock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
window.ResizeObserver = jest.fn().mockImplementation(() => ({
observe: jest.fn(),
unobserve: jest.fn(),
disconnect: jest.fn(),
}));

0 comments on commit ab93d3a

Please sign in to comment.