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

fix: Upgrade dependencies and fix unit tests #466

Merged
merged 1 commit into from
Dec 26, 2024

Conversation

raulkele
Copy link
Collaborator

@raulkele raulkele commented Dec 23, 2024

fix: Upgrade dependencies and fix unit tests

Changelog:

  • upgraded vulnerable dependencies (@rchincha)
  • upgraded eslint version and config setup from .eslintrc to the new flat config file eslint.config.json
  • upgraded unit test libraries
  • updated unit tests failing due to breaking changes in jest, always use queryBy selectors when looking for negative result
  • updated unit tests failing due to non awaited userEvent and fireEvent instances

No user facing changes

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

Copy link

codecov bot commented Dec 23, 2024

Codecov Report

Attention: Patch coverage is 0% with 3 lines in your changes missing coverage. Please review.

Project coverage is 84.10%. Comparing base (c78b303) to head (2fb9c2c).
Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
src/index.js 0.00% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #466      +/-   ##
==========================================
- Coverage   85.00%   84.10%   -0.91%     
==========================================
  Files          63       63              
  Lines        1961     1963       +2     
  Branches      532      531       -1     
==========================================
- Hits         1667     1651      -16     
- Misses        284      299      +15     
- Partials       10       13       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@rchincha
Copy link
Contributor

Traceback (most recent call last):
  File "/home/runner/work/zui/zui/./tests/scripts/load_test_data.py", line 179, in <module>
    main()
  File "/home/runner/work/zui/zui/./tests/scripts/load_test_data.py", line 168, in main
    image_metadata = pull_modify_push_image(logger, registry, image_name, tag, cosign_password, multiarch, username, password, debug, data_dir)
                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/runner/work/zui/zui/./tests/scripts/load_test_data.py", line 91, in pull_modify_push_image
    image_metadata["cves"] = getCVEInfo(image_metadata.pop("trivy"))
                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^
KeyError: 'trivy'
make: *** [Makefile:30: test-data] Error 1

@andaaron
Copy link
Contributor

Fixed in #467, please rebase.

fix: Upgrade packages and fix unit tests

Signed-off-by: Ramkumar Chinchani <[email protected]>
Signed-off-by: Raul-Cristian Kele <[email protected]>
@raulkele raulkele marked this pull request as ready for review December 25, 2024 16:24
import filterConstants from 'utilities/filterConstants.js';
import { sortByCriteria } from 'utilities/sortCriteria.js';
import MockThemeProvider from '__mocks__/MockThemeProvider';

// router mock
const mockedUsedNavigate = jest.fn();
jest.mock('react-router-dom', () => ({
...jest.requireActual('react-router-dom'),
jest.mock('react-router', () => ({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This appears to be the repeated pattern ...

Copy link
Contributor

@rchincha rchincha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Thanks a lot @raulkele

@andaaron pls take a look.

If it looks good, let's merge.

@andaaron
Copy link
Contributor

andaaron commented Dec 26, 2024

lgtm

Thanks a lot @raulkele

@andaaron pls take a look.

If it looks good, let's merge.

We can merge from my point of view, thanks @raulkele for working on this.

@rchincha rchincha merged commit 930ae7e into project-zot:main Dec 26, 2024
9 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants