diff --git a/test/fixtures/linter/rules/AsyncComponentFlags/Positive_12/Component.js b/test/fixtures/linter/rules/AsyncComponentFlags/Positive_12/Component.js new file mode 100644 index 00000000..52a2b714 --- /dev/null +++ b/test/fixtures/linter/rules/AsyncComponentFlags/Positive_12/Component.js @@ -0,0 +1,8 @@ +// Fixture description: +// Async flag (rootView only, no routing) in manifest.json +// No manifest: "json" configuration in metadata +sap.ui.define(["sap/ui/core/UIComponent"], function (UIComponent) { + "use strict"; + + return UIComponent.extend("mycomp.Component"); +}); diff --git a/test/fixtures/linter/rules/AsyncComponentFlags/Positive_12/manifest.json b/test/fixtures/linter/rules/AsyncComponentFlags/Positive_12/manifest.json new file mode 100644 index 00000000..d077969e --- /dev/null +++ b/test/fixtures/linter/rules/AsyncComponentFlags/Positive_12/manifest.json @@ -0,0 +1,23 @@ +{ + "_version": "1.12.0", + + "sap.app": { + "id": "mycomp", + "type": "application", + "i18n": "i18n/i18n.properties", + "title": "{{appTitle}}", + "description": "{{appDescription}}", + "applicationVersion": { + "version": "1.0.0" + } + }, + + "sap.ui5": { + "rootView": { + "viewName": "mycomp.view.App", + "type": "XML", + "id": "app", + "async": true + } + } +} diff --git a/test/fixtures/linter/rules/NoDeprecatedApi/NoDeprecatedApi.js b/test/fixtures/linter/rules/NoDeprecatedApi/NoDeprecatedApi.js index 78b9a6b2..2110d2ac 100644 --- a/test/fixtures/linter/rules/NoDeprecatedApi/NoDeprecatedApi.js +++ b/test/fixtures/linter/rules/NoDeprecatedApi/NoDeprecatedApi.js @@ -1,7 +1,7 @@ sap.ui.define([ "sap/m/Button", "sap/m/DateTimeInput", "sap/base/util/includes", "sap/ui/Device", "sap/ui/core/library", "sap/ui/generic/app/navigation/service/NavigationHandler", - "sap/ui/table/Table", "sap/ui/table/plugins/MultiSelectionPlugin", "sap/ui/core/Configuration", "sap/m/library" -], function(Button, DateTimeInput, includes, Device, coreLib, NavigationHandler, Table, MultiSelectionPlugin, Configuration, mobileLib) { + "sap/ui/table/Table", "sap/ui/table/plugins/MultiSelectionPlugin", "sap/ui/core/Configuration", "sap/m/library", "sap/m/Bar" +], function(Button, DateTimeInput, includes, Device, coreLib, NavigationHandler, Table, MultiSelectionPlugin, Configuration, mobileLib, Bar) { var dateTimeInput = new DateTimeInput(); // Control is deprecated. A finding only appears for the module dependency, not for the usage. @@ -48,4 +48,11 @@ sap.ui.define([ const navigationHandler = new NavigationHandler({}); navigationHandler.storeInnerAppState({}); // Method "storeInnerAppState" is deprecated + + var bar = new Bar("P1Header", { + enableFlexBox: false, // Property "enableFlexBox" is deprecated + contentLeft: [], + contentRight: [] + }) + }); diff --git a/test/fixtures/linter/rules/renderer/9Control.js b/test/fixtures/linter/rules/renderer/9Control.js new file mode 100644 index 00000000..90443ab1 --- /dev/null +++ b/test/fixtures/linter/rules/renderer/9Control.js @@ -0,0 +1,8 @@ +sap.ui.define(["sap/m/Image", "sap/m/ImageRenderer"], function (Image, ImageRenderer) { + var LightBox = Image.extend("Lightbox", { + metadata: {}, + renderer: ImageRenderer.render + }); + + return Lightbox; +}); diff --git a/test/lib/linter/rules/snapshots/AsyncComponentFlags.ts.snap b/test/lib/linter/rules/snapshots/AsyncComponentFlags.ts.snap index b84ff36e..6f555639 100644 Binary files a/test/lib/linter/rules/snapshots/AsyncComponentFlags.ts.snap and b/test/lib/linter/rules/snapshots/AsyncComponentFlags.ts.snap differ diff --git a/test/lib/linter/rules/snapshots/renderer.ts.md b/test/lib/linter/rules/snapshots/renderer.ts.md index 8847f5ef..350a6576 100644 --- a/test/lib/linter/rules/snapshots/renderer.ts.md +++ b/test/lib/linter/rules/snapshots/renderer.ts.md @@ -376,6 +376,14 @@ Generated by [AVA](https://avajs.dev). ], warningCount: 0, }, + { + coverageInfo: [], + errorCount: 0, + fatalErrorCount: 0, + filePath: '9Control.js', + messages: [], + warningCount: 0, + }, { coverageInfo: [], errorCount: 3, diff --git a/test/lib/linter/rules/snapshots/renderer.ts.snap b/test/lib/linter/rules/snapshots/renderer.ts.snap index 0476c26c..a2073558 100644 Binary files a/test/lib/linter/rules/snapshots/renderer.ts.snap and b/test/lib/linter/rules/snapshots/renderer.ts.snap differ