Skip to content

Commit

Permalink
Merge branch 'master' into UIPFU-96
Browse files Browse the repository at this point in the history
  • Loading branch information
Terala-Priyanka committed Sep 5, 2024
2 parents 304aa57 + 615bbb5 commit 52b28be
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 11 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/build-npm-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
github-actions-ci:
if : ${{ startsWith(github.ref, 'refs/tags/v') }}
env:
YARN_TEST_OPTIONS: '--karma.singleRun --karma.browsers ChromeDocker --karma.reporters mocha junit --coverage'
YARN_TEST_OPTIONS: ''
SQ_ROOT_DIR: './src'
COMPILE_TRANSLATION_FILES: 'true'
PUBLISH_MOD_DESCRIPTOR: 'true'
Expand Down Expand Up @@ -152,7 +152,7 @@ jobs:
comment_title: Jest Unit Test Statistics

- name: Publish Jest coverage report
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: always()
with:
name: jest-coverage-report
Expand All @@ -170,7 +170,7 @@ jobs:
comment_title: BigTest Unit Test Statistics

- name: Publish BigTest coverage report
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: always()
with:
name: bigtest-coverage-report
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ on: [push, pull_request]
jobs:
github-actions-ci:
env:
YARN_TEST_OPTIONS: '--karma.singleRun --karma.browsers ChromeDocker --karma.reporters mocha junit --coverage'
YARN_TEST_OPTIONS: ''
SQ_ROOT_DIR: './src'
COMPILE_TRANSLATION_FILES: 'true'
PUBLISH_MOD_DESCRIPTOR: 'true'
Expand Down Expand Up @@ -95,7 +95,7 @@ jobs:
comment_title: Jest Unit Test Statistics

- name: Publish Jest coverage report
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: always()
with:
name: jest-coverage-report
Expand All @@ -113,7 +113,7 @@ jobs:
comment_title: BigTest Unit Test Statistics

- name: Publish BigTest coverage report
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
if: always()
with:
name: bigtest-coverage-report
Expand Down
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
* Create Jest test environment and setup initial mocks. Refs UIPFU-78.
* Apply Prev/Next Pagination. Refs UIPFU-49.
* Use keywords CQL field for keyword user search. Ref UIPFU-95.
* Add Jest unit tests for ui-plugin-find-user/src/Filters.js. Refs UIPFU-81.

## [7.1.1](https://github.com/folio-org/ui-plugin-find-user/tree/v7.1.1) (2024-05-03)
[Full Changelog](https://github.com/folio-org/ui-plugin-find-user/compare/v7.1.0...v7.1.1)
Expand Down
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"lint": "eslint .",
"build-mod-descriptor": "stripes mod descriptor --full --strict | jq '.[]' > module-descriptor.json ",
"formatjs-compile": "formatjs compile-folder --ast --format simple ./translations/ui-plugin-find-user ./translations/ui-plugin-find-user/compiled",
"test": "stripes test karma",
"test": "yarn run test:jest",
"test:jest": "jest --ci --coverage --colors"
},
"okapiInterfaces": {
Expand All @@ -48,6 +48,7 @@
"eslint": "^7.32.0",
"eslint-import-resolver-webpack": "^0.13.2",
"faker": "^4.1.0",
"history": "^4.0.0",
"inflected": "^2.0.4",
"miragejs": "^0.1.40",
"react": "^18.2.0",
Expand Down
5 changes: 3 additions & 2 deletions src/Filters.test.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { FormattedMessage } from 'react-intl';

import { screen } from '@folio/jest-config-stripes/testing-library/react';
import userEvent from '@folio/jest-config-stripes/testing-library/user-event';
import { FormattedMessage } from 'react-intl';

import renderWithRouter from 'helpers/renderWithRouter';
import Filters from './Filters';
Expand Down Expand Up @@ -72,7 +73,7 @@ describe('Filters', () => {
});

it('should call changeHandler on clicking inactive checkbox', async () => {
const inActiveCheckbox = document.querySelector('[ id = "clickable-filter-active-inactive"]');
const inActiveCheckbox = screen.getByRole('checkbox', { name: 'ui-plugin-find-user.inactive' });
await userEvent.click(inActiveCheckbox);

expect(props.onChangeHandlers.checkbox).toHaveBeenCalled();
Expand Down
1 change: 0 additions & 1 deletion test/jest/helpers/renderWithRouter.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import { createMemoryHistory } from 'history';

let rtlApi;


const renderWithRouter = (children, options = {}) => {
const history = createMemoryHistory();
const renderFn = options.rerender ? rtlApi.rerender : render;
Expand Down
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -6780,7 +6780,7 @@ highlight-words-core@^1.2.0:
resolved "https://registry.yarnpkg.com/highlight-words-core/-/highlight-words-core-1.2.2.tgz#1eff6d7d9f0a22f155042a00791237791b1eeaaa"
integrity sha512-BXUKIkUuh6cmmxzi5OIbUJxrG8OAk2MqoL1DtO3Wo9D2faJg2ph5ntyuQeLqaHJmzER6H5tllCDA9ZnNe9BVGg==

history@^4.10.1, history@^4.6.3, history@^4.9.0:
history@^4.0.0, history@^4.10.1, history@^4.6.3, history@^4.9.0:
version "4.10.1"
resolved "https://registry.yarnpkg.com/history/-/history-4.10.1.tgz#33371a65e3a83b267434e2b3f3b1b4c58aad4cf3"
integrity sha512-36nwAD620w12kuzPAsyINPWJqlNbij+hpK1k9XRloDtym8mxzGYl2c17LnV6IAGB2Dmg4tEa7G7DlawS0+qjew==
Expand Down

0 comments on commit 52b28be

Please sign in to comment.