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(KONFLUX-1680): filter records on creationTimestamp #92

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

StanislavJochman
Copy link
Contributor

Backport of KFLUXBUGS-1680

@@ -37,7 +37,7 @@ describe('EnvironmentProvisionErrorAlert', () => {
expect(screen.getByTestId(/env-provision-err-alert/)).toBeInTheDocument();
expect(screen.getByText('app-sample-go-basic-enterprise-contract')).toBeInTheDocument();
expect(screen.getByText(/Snapshot failed to deploy/)).toBeInTheDocument();
expect(screen.getByText(/Sep 19, 2023/)).toBeInTheDocument();
expect(screen.getByText(/19. 9. 2023/)).toBeInTheDocument();
Copy link
Contributor Author

@StanislavJochman StanislavJochman Jan 21, 2025

Choose a reason for hiding this comment

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

This test is not consistend. 19. 9. 2023 works locally but not in github. Github works with Sep 19, 2023

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@sahil143 any idea how to fix this?

Copy link

codecov bot commented Jan 21, 2025

Codecov Report

Attention: Patch coverage is 97.22222% with 1 line in your changes missing coverage. Please review.

Project coverage is 80.11%. Comparing base (4609b37) to head (51a511f).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/hooks/useBuildPipelines.ts 75.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #92      +/-   ##
==========================================
- Coverage   80.11%   80.11%   -0.01%     
==========================================
  Files         570      570              
  Lines       21452    21484      +32     
  Branches     5050     5315     +265     
==========================================
+ Hits        17187    17211      +24     
- Misses       4241     4249       +8     
  Partials       24       24              
Flag Coverage Δ
unittests 80.11% <97.22%> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

@JoaoPedroPP
Copy link
Contributor

Overall LGTM.

The HAC code has PipelineRunDetailsTab.spec.tsx which I don't see here. Don't we need it here too?

@testcara
Copy link
Contributor

LGTM

Comment on lines +15 to 19
jest.mock('../../../hooks/useApplications', () => ({
useApplication: jest.fn().mockReturnValue([{ metadata: { name: 'test' } }, true]),
}));

jest.mock('../../Workspace/useWorkspaceInfo', () => ({
Copy link
Collaborator

Choose a reason for hiding this comment

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

Please create a utility to mock useApplication hook,

Look at https://github.com/konflux-ci/konflux-ui/blob/main/src/utils/test-utils.tsx#L213 how to create mock hook utility

@JoaoPedroPP
Copy link
Contributor

LGTM

Local version is working as expected. Please pay attention in the comments above

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.

5 participants