-
Notifications
You must be signed in to change notification settings - Fork 98
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
feat(pci.private-registry): edit cidr #15009
base: feat/pci-private-registry_create-restriction_tapc-584
Are you sure you want to change the base?
feat(pci.private-registry): edit cidr #15009
Conversation
ref: TAPC-2320 Signed-off-by: Pierre-Philippe <[email protected]>
ref: TAPC-2320 Signed-off-by: Pierre-Philippe <[email protected]>
ref: TAPC-2320 Signed-off-by: Pierre-Philippe <[email protected]>
vi.mock('@/pages/CIDR/useDatagridContext', async () => ({ | ||
__esModule: true, | ||
default: () => ({ | ||
editActualRow: vi.fn(), | ||
isDraft: false, | ||
}), | ||
})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you should prefer do a global mock of the file and then mock only the default export when importing it ?
Also async isn't necessary here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
effectivly we have a test provider and setup on zimbra with all mocks
packages/manager/apps/zimbra/src/utils/test.provider.tsx
packages/manager/apps/zimbra/src/utils/test.setup.tsx
you can do same functional
packages/manager/apps/pci-private-registry/src/components/CIDR/Authorization.component.tsx
Show resolved
Hide resolved
vi.mock('@/pages/CIDR/useDatagridContext', () => ({ | ||
__esModule: true, | ||
default: () => ({ | ||
removeDraftRow: vi.fn(), | ||
}), | ||
})); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is the implementation required ?
7b6ced4
to
303282d
Compare
Quality Gate passedIssues Measures |
@@ -25,19 +25,85 @@ import { useDatagridColumn } from '@/pages/CIDR/useDatagridColumn'; | |||
import Filters from '@/components/CIDR/Filters.component'; | |||
import { getRegistryQueyPrefixWithId } from '@/api/hooks/useIpRestrictions'; | |||
import useDataGridContext from '@/pages/CIDR/useDatagridContext'; | |||
import { FilterRestrictionsEnum } from '@/types'; | |||
|
|||
const schemaAddCidr = (dataCIDR: string[], isUpdating: boolean) => |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what's about separate schemaAddCidr
in a dedicated file ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think better is on a dedicated file for all schema with zod
develop
Description
Related