DDM Updated the validation logic as per BE values (policyFormatVersion field is removed from BE) (#2237)

* updated the validation logic as per BE values(policyFormatVersion will be removed from BE)

* removed field

* updated all test

---------

Co-authored-by: Sakshi Gupta <sakshig@microsoft.com>
This commit is contained in:
sakshigupta12feb
2025-10-28 19:11:12 +05:30
committed by GitHub
parent 0578910b9e
commit 18ecaaba78
7 changed files with 0 additions and 19 deletions

View File

@@ -30,7 +30,6 @@ jest.mock("../../../Common/dataAccess/updateCollection", () => ({
dataMaskingPolicy: {
includedPaths: [],
excludedPaths: ["/excludedPath"],
policyFormatVersion: 2,
isPolicyEnabled: true,
},
indexes: [],
@@ -308,13 +307,11 @@ describe("SettingsComponent", () => {
dataMaskingContent: {
includedPaths: [],
excludedPaths: ["/excludedPath"],
policyFormatVersion: 2,
isPolicyEnabled: true,
},
dataMaskingContentBaseline: {
includedPaths: [],
excludedPaths: [],
policyFormatVersion: 2,
isPolicyEnabled: false,
},
isDataMaskingDirty: true,
@@ -329,7 +326,6 @@ describe("SettingsComponent", () => {
expect(wrapper.state("dataMaskingContentBaseline")).toEqual({
includedPaths: [],
excludedPaths: ["/excludedPath"],
policyFormatVersion: 2,
isPolicyEnabled: true,
});
});
@@ -344,7 +340,6 @@ describe("SettingsComponent", () => {
const invalidPolicy: InvalidPolicy = {
includedPaths: "invalid",
excludedPaths: [],
policyFormatVersion: 2,
isPolicyEnabled: false,
};
// Use type assertion since we're deliberately testing with invalid data
@@ -354,7 +349,6 @@ describe("SettingsComponent", () => {
expect(wrapper.state("dataMaskingContent")).toEqual({
includedPaths: "invalid",
excludedPaths: [],
policyFormatVersion: 2,
isPolicyEnabled: false,
});
expect(wrapper.state("dataMaskingValidationErrors")).toEqual(["includedPaths must be an array"]);
@@ -370,7 +364,6 @@ describe("SettingsComponent", () => {
},
],
excludedPaths: ["/excludedPath"],
policyFormatVersion: 2,
isPolicyEnabled: true,
};
@@ -395,7 +388,6 @@ describe("SettingsComponent", () => {
},
],
excludedPaths: ["/excludedPath1"],
policyFormatVersion: 2,
isPolicyEnabled: false,
};
@@ -409,7 +401,6 @@ describe("SettingsComponent", () => {
},
],
excludedPaths: ["/excludedPath2"],
policyFormatVersion: 2,
isPolicyEnabled: true,
};