Skip to content

Commit

Permalink
fix: diagnostic message
Browse files Browse the repository at this point in the history
  • Loading branch information
marufrasully committed Apr 26, 2024
1 parent ec4fd95 commit 40e9f02
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion packages/fe/src/i18n/i18n.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"UNKNOWN_PATH": "Unknown path: \"{{value}}\"",
"INVALID_PROPERTY_PATH_MULTIPLE_1_TO_MANY": "Invalid property path value. Multiple 1:many association segments not allowed",

"ENTITY_SET_OR_CONTEXT_PATH_IS_MISSING_IN_MANIFEST": "EntitySet or contextPath for the current view are not defined in application manifest. Attribute value completion and diagnostics is not possible if EntitySet or contextPath are not defined or defined dynamically in controllers",
"ENTITY_SET_OR_CONTEXT_PATH_IS_MISSING_IN_MANIFEST": "Path cannot be identified: use absolute path or define contextPath",
"EMPTY_CONTEXT_PATH_IN_MANIFEST": "ContextPath in manifest is empty. Attribute value completion and diagnostics are disabled",
"RELATIVE_CONTEXT_PATH_IN_MANIFEST": "ContextPath in manifest \"{{value}}\" must be absolute. Attribute value completion and diagnostics are disabled",
"UNKNOWN_CONTEXT_PATH_IN_MANIFEST": "Unknown contextPath in manifest \"{{value}}\". Attribute value completion and diagnostics are disabled",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ export function validateMissingViewEntitySet(
start: actualAttributeValueToken.startOffset,
end: actualAttributeValueToken.endOffset,
},
severity: "info",
severity: "warn",
},
];
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ describe("missing entitySet validation", () => {
}
);
expect(result.map((item) => issueToSnapshot(item))).toStrictEqual([
"kind: MissingEntitySet; text: EntitySet or contextPath for the current view are not defined in application manifest. Attribute value completion and diagnostics is not possible if EntitySet or contextPath are not defined or defined dynamically in controllers; severity:info; offset:344-354",
"kind: MissingEntitySet; text: Path cannot be identified: use absolute path or define contextPath; severity:warn; offset:344-354",
]);
});

Expand All @@ -87,7 +87,7 @@ describe("missing entitySet validation", () => {
(c) => ({ ...c, manifestDetails: undefined } as any)
);
expect(result.map((item) => issueToSnapshot(item))).toStrictEqual([
"kind: MissingEntitySet; text: EntitySet or contextPath for the current view are not defined in application manifest. Attribute value completion and diagnostics is not possible if EntitySet or contextPath are not defined or defined dynamically in controllers; severity:info; offset:344-349",
"kind: MissingEntitySet; text: Path cannot be identified: use absolute path or define contextPath; severity:warn; offset:344-349",
]);
});

Expand All @@ -103,7 +103,7 @@ describe("missing entitySet validation", () => {
}
);
expect(result.map((item) => issueToSnapshot(item))).toStrictEqual([
"kind: MissingEntitySet; text: EntitySet or contextPath for the current view are not defined in application manifest. Attribute value completion and diagnostics is not possible if EntitySet or contextPath are not defined or defined dynamically in controllers; severity:info; offset:344-349",
"kind: MissingEntitySet; text: Path cannot be identified: use absolute path or define contextPath; severity:warn; offset:344-349",
]);
});
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ annotate service.Travel with @(
4. Set the metaPath attribute value as `to_Booking`. Observe warning message `Path value must end with annotation term. Use code completion to select annotation path`.
5. Set the metaPath attribute value as `@com.sap.vocabularies.UI.v1.LineItem`. Observe warning message `Invalid annotation term: "@com.sap.vocabularies.UI.v1.LineItem". Trigger code completion to choose one of allowed annotations`.
6. Go to app manifest file, find `routing\targets\TravelMain` settings entry and rename `entitySet` property in the nested object structure to `entitySet_`. Save the file.
7. Set the metaPath attribute value as `@com.sap.vocabularies.UI.v1.Chart#sample1`. Observe info message `EntitySet or contextPath for the current view are not defined in application manifest. Attribute value completion and diagnostics is not possible if EntitySet or contextPath are not defined or defined dynamically in controllers`.
7. Set the metaPath attribute value as `@com.sap.vocabularies.UI.v1.Chart#sample1`. Observe warn message `Path cannot be identified: use absolute path or define contextPath`.
8. Revert manifest change that is done at previous step 7. Change property `entitySet` value to `Travel_`. Save the file.
9. Set the metaPath attribute value as `@com.sap.vocabularies.UI.v1.Chart#sample`. Observe info message `Entity Set "Travel_" specified in manifest for the current view is not found. Attribute value completion and diagnostics are disabled`.
10. Reset property `entitySet` value to `Travel` in app manifest. Save the file.
Expand Down

0 comments on commit 40e9f02

Please sign in to comment.