Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UIEH-1431: Change permission kb-ebsco.kb-credentials.item.get to kb-ebsco.kb-credentials.key.item.get and kb-ebsco.kb-credentials.uc.item.get to kb-ebsco.kb-credentials.uc.key.item.get. #1736

Merged
merged 3 commits into from
Oct 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-npm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -153,15 +153,15 @@ jobs:
comment_title: Jest Unit Test Statistics

- name: Publish Jest coverage report
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: always()
with:
name: jest-coverage-report
path: ${{ env.JEST_COVERAGE_REPORT_DIR }}
retention-days: 30

- name: Publish yarn.lock
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: failure()
with:
name: yarn.lock
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/build-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -96,15 +96,15 @@ jobs:
comment_title: Jest Unit Test Statistics

- name: Publish Jest coverage report
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: always()
with:
name: jest-coverage-report
path: ${{ env.JEST_COVERAGE_REPORT_DIR }}
retention-days: 30

- name: Publish yarn.lock
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
if: failure()
with:
name: yarn.lock
Expand Down
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Change history for ui-eholdings

## [9.2.0] (IN PROGRESS)
## [10.0.0] (IN PROGRESS)

* Agreements accordion - Revise Are you sure you want to unassign agreement? message. (UIEH-1420)
* Agreements accordion - Add a tooltip for the `New` and `Add` buttons. (UIEH-1424)
* eHoldings package-title (resource) view: display Proxied URL. (UIEH-1419)
* Fix title search is slow with many Packages filter options. (UIEH-1428)
* *BREAKING* Upgrade `eholdings` to `4.0`. Change permission `kb-ebsco.kb-credentials.item.get` to `kb-ebsco.kb-credentials.key.item.get` and `kb-ebsco.kb-credentials.uc.item.get` to `kb-ebsco.kb-credentials.uc.key.item.get`. (UIEH-1431)

## [9.1.1] (https://github.com/folio-org/ui-eholdings/tree/v9.1.1) (2024-03-24)

Expand Down
8 changes: 4 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@folio/eholdings",
"version": "9.1.1",
"version": "10.0.0",
"description": "FOLIO UI module for eHoldings",
"main": "src/index.js",
"repository": "https://github.com/folio-org/ui-eholdings",
Expand Down Expand Up @@ -98,7 +98,7 @@
}
],
"okapiInterfaces": {
"eholdings": "3.0",
"eholdings": "4.0",
"tags": "1.0",
"erm": "1.0 2.0 3.0 4.0 5.0 6.0 7.0"
},
Expand Down Expand Up @@ -181,7 +181,7 @@
"settings.eholdings.enabled",
"module.eholdings.enabled",
"kb-ebsco.kb-credentials.collection.get",
"kb-ebsco.kb-credentials.item.get"
"kb-ebsco.kb-credentials.key.item.get"
]
},
{
Expand Down Expand Up @@ -321,7 +321,7 @@
"visible": true,
"subPermissions": [
"ui-eholdings.settings.kb.view",
"kb-ebsco.kb-credentials.uc.item.get",
"kb-ebsco.kb-credentials.uc.key.item.get",
"kb-ebsco.currencies.collection.get",
"kb-ebsco.uc-credentials.item.get",
"kb-ebsco.uc-credentials.client-id.get",
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { render, fireEvent } from '@folio/jest-config-stripes/testing-library/react';
import PackagesFilterAccordion from './packages-filter-accordion';

jest.mock('lodash/debounce', () => jest.fn((fn) => fn));

const mockOnUpdate = jest.fn();

const getComponent = (props = {}) => (
Expand Down Expand Up @@ -60,6 +62,9 @@ describe('Given PackagesFilterAccordion', () => {
activeFilters,
});

fireEvent.click(getByText('ui-eholdings.packages.filter'));
fireEvent.click(getByText('stripes-components.selection.controlLabel'));

fireEvent.click(getByText('option1 (100)'));

expect(mockOnUpdate).toHaveBeenCalledWith({
Expand All @@ -81,7 +86,10 @@ describe('Given PackagesFilterAccordion', () => {
totalRecords: 200,
}];

const { container } = renderComponent({ dataOptions });
const { container, getByText } = renderComponent({ dataOptions });

fireEvent.click(getByText('ui-eholdings.packages.filter'));
fireEvent.click(getByText('stripes-components.selection.controlLabel'));

const input = container.querySelector('input[type="text"]');
fireEvent.change(input, { target: { value: '[' } });
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -153,13 +153,14 @@ describe('Given SettingsCustomLabels', () => {
getByRole,
getByTestId,
} = renderSettingsCustomLabels();
const name = 'ui-eholdings.settings.customLabels.remove ' +
const name =
'ui-eholdings.settings.customLabels.remove.description ' +
'ui-eholdings.settings.customLabels.remove.note';

fireEvent.change(getByTestId('customLabel2-display-label'), { target: { value: '' } });
fireEvent.click(getByRole('button', { name: 'stripes-core.button.save' }));

expect(getByRole('heading', { name: 'ui-eholdings.settings.customLabels.remove' })).toBeInTheDocument();
expect(getByRole('dialog', { name })).toBeDefined();
});
});
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
import { Form } from 'react-final-form';
import debounce from 'lodash/debounce';

import {
fireEvent,
render,
} from '@folio/jest-config-stripes/testing-library/react';

import wait from '../../../../../test/jest/helpers/wait';
import PackageSelectField from './package-select-field';

jest.mock('lodash/debounce', () => jest.fn((fn) => fn));

const mockOnFilter = jest.fn();

describe('Given PackageSelectField', () => {
Expand Down Expand Up @@ -43,6 +46,7 @@ describe('Given PackageSelectField', () => {
}],
});

fireEvent.click(getByText('ui-eholdings.title.chooseAPackage'));
expect(getByText('label1')).toBeDefined();
});

Expand Down Expand Up @@ -71,8 +75,7 @@ describe('Given PackageSelectField', () => {
const input = getAllByLabelText('stripes-components.selection.filterOptionsLabel')[0];

fireEvent.change(input, { target: { value: 'packageName' } });
expect(mockOnFilter).not.toHaveBeenCalled();
await wait(1100);
expect(debounce).toHaveBeenCalledWith(mockOnFilter, 1000);
expect(mockOnFilter).toHaveBeenCalled();
});
});
Loading