Skip to content

Commit

Permalink
test(NoDeprecatedApi): Add fixture for sap/ushell/Container
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomByte committed Sep 11, 2024
1 parent d329c96 commit 47d2ff6
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
6 changes: 4 additions & 2 deletions test/fixtures/linter/rules/NoDeprecatedApi/NoDeprecatedApi.js
Original file line number Diff line number Diff line change
@@ -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/ushell/Container",
], function(Button, DateTimeInput, includes, Device, coreLib, NavigationHandler, Table, MultiSelectionPlugin, Configuration, mobileLib, Container) {

var dateTimeInput = new DateTimeInput(); // Control is deprecated. A finding only appears for the module dependency, not for the usage.

Expand Down Expand Up @@ -48,4 +48,6 @@ sap.ui.define([

const navigationHandler = new NavigationHandler({});
navigationHandler.storeInnerAppState({}); // Method "storeInnerAppState" is deprecated

await Container.createRenderer();
});
9 changes: 8 additions & 1 deletion test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,14 @@ Generated by [AVA](https://avajs.dev).
[
{
coverageInfo: [],
coverageInfo: [
{
category: 1,
column: 8,
line: 52,
message: 'Unable to analyze this method call because the type of identifier "createRenderer" in "Container.createRenderer()"" could not be determined',
},
],
errorCount: 23,
fatalErrorCount: 0,
filePath: 'NoDeprecatedApi.js',
Expand Down
Binary file modified test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.snap
Binary file not shown.

0 comments on commit 47d2ff6

Please sign in to comment.