generated from SAP/repository-template
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Detect deprecations in ManagedObject metadata (#349)
JIRA: CPOUI5FOUNDATION-858 Depends on: #358
- Loading branch information
Showing
10 changed files
with
1,746 additions
and
5 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
72 changes: 72 additions & 0 deletions
72
test/fixtures/linter/rules/NoDeprecatedApi/Control_ManagedObject.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
sap.ui.define(["sap/ui/core/Control", "sap/m/library", "mycustom/lib/FancyMultiPage"], | ||
function (Control, library, FancyMultiPage) { | ||
var DateTimeInputType = library.DateTimeInputType; | ||
var FrameType = library.FrameType; | ||
var FancyText = Control.extend("sap.fancy.Text", { | ||
metadata: { | ||
// sap.ui.commons.FormattedTextViewControl: deprecated | ||
interfaces: ["sap.ui.commons.FormattedTextViewControl"], | ||
library: "sap.fancy", | ||
properties: { | ||
text: {type: "string", group: "Data", defaultValue: "", bindable: "bindable"}, | ||
textShort: "sap.f.AvatarShape", | ||
// sap.m.DateTimeInputType: deprecated, DateTimeInputType.DateTime: deprecated | ||
textDirection: {type: "sap.m.DateTimeInputType", group: "Appearance", defaultValue: DateTimeInputType.DateTime}, | ||
// sap.m.DateTimeInputType: deprecated, "Date": deprecated | ||
textDirectionB: {type: "sap.m.DateTimeInputType", group: "Appearance", defaultValue: "Date"}, | ||
// sap.m.FrameType: NOT deprecated, sap.m.FrameType.TwoThirds: deprecated | ||
textAlign: {type: "sap.m.FrameType", group: "Appearance", defaultValue: FrameType.TwoThirds}, | ||
// sap.m.FrameType: NOT deprecated, "TwoThirds": deprecated | ||
textAlignB: {type: "sap.m.FrameType", group: "Appearance", defaultValue: "TwoThirds"}, | ||
}, | ||
aggregations: { | ||
// sap.f.Avatar: deprecated | ||
myagg: {type: "sap.f.Avatar", multiple: false, visibility: "hiddenDeprecated"}, | ||
// sap.f.Avatar: deprecated | ||
myaggShort: "sap.f.Avatar", | ||
// sap.f.IllustratedMessageSize DataType: deprecated | ||
tooltip: {type: "sap.ui.core.TooltipBase", altTypes: ["string", "sap.f.IllustratedMessageSize"], multiple: false}, | ||
beginColumnPages: { | ||
type: "sap.ui.core.Control", | ||
multiple: true, | ||
forwarding: { | ||
getter: "_getBeginColumn", | ||
aggregation: "deprecatedPages", | ||
}, | ||
}, | ||
}, | ||
associations: { | ||
// sap.f.Avatar: deprecated | ||
initialBeginColumnPage: {type: "sap.f.Avatar", multiple: false}, | ||
// sap.f.Avatar: deprecated | ||
initialBeginColumnPageShort: "sap.f.Avatar", | ||
}, | ||
events: { | ||
eventA: { | ||
parameters: { | ||
layout: { | ||
type: "sap.f.DynamicPageTitleArea", // deprecated | ||
}, | ||
}, | ||
}, | ||
eventB: { | ||
parameters: { | ||
layout: { | ||
type: "Promise<sap.f.DynamicPageTitleArea>", // deprecated | ||
}, | ||
}, | ||
}, | ||
eventC: { | ||
parameters: { | ||
layout: "Promise<sap.f.AvatarShape>", // deprecated | ||
newItems: { | ||
type: "sap.m.P13nColumnsItem[]", // deprecated | ||
}, | ||
}, | ||
}, | ||
}, | ||
}, | ||
}); | ||
|
||
return FancyText; | ||
}); |
Oops, something went wrong.