Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test: Add fixture for nested views #293

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<mvc:View xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m"
xmlns:table="sap.ui.table"
xmlns:tablePlugins="sap.ui.table.plugins"
>
<mvc:XMLView viewName="ui5.walkthrough.view.HelloPanel"/>
<mvc:View type="JSON" viewName="ui5.walkthrough.view.HelloPanel"/>
</mvc:View>
8 changes: 8 additions & 0 deletions test/fixtures/transpiler/xml/XMLViewNestedView.view.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<mvc:View xmlns:mvc="sap.ui.core.mvc"
xmlns="sap.m"
xmlns:table="sap.ui.table"
xmlns:tablePlugins="sap.ui.table.plugins"
>
<mvc:XMLView viewName="ui5.walkthrough.view.HelloPanel"/>
<mvc:View type="JSON" viewName="ui5.walkthrough.view.HelloPanel"/>
</mvc:View>
15 changes: 15 additions & 0 deletions test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,21 @@ Generated by [AVA](https://avajs.dev).
},
]

## General: XMLViewNestedView.view.xml

> Snapshot 1

[
{
coverageInfo: [],
errorCount: 0,
fatalErrorCount: 0,
filePath: 'XMLViewNestedView.view.xml',
messages: [],
warningCount: 0,
},
]

## General: jQuery-device.js

> Snapshot 1
Expand Down
Binary file modified test/lib/linter/rules/snapshots/NoDeprecatedApi.ts.snap
Binary file not shown.
41 changes: 41 additions & 0 deletions test/lib/linter/xmlTemplate/snapshots/transpiler.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -930,6 +930,47 @@ Generated by [AVA](https://avajs.dev).

[]

## Transpile XMLViewNestedView.view.xml

> Snapshot 1

`import View from "sap/ui/core/mvc/View";␊
import View2 from "sap/ui/core/mvc/View";␊
import XMLView from "sap/ui/core/mvc/XMLView";␊
const oXMLView = new XMLView({␊
viewName: "ui5.walkthrough.view.HelloPanel",␊
});␊
const oView = new View({␊
type: "JSON",␊
viewName: "ui5.walkthrough.view.HelloPanel",␊
});␊
export default const oView2 = new View2({␊
content: [␊
oXMLView,␊
oView,␊
],␊
});␊
`

> Snapshot 2

{
file: 'XMLViewNestedView.view.js',
mappings: 'AAMC,wCAAkE;AANnE,yCAIC;AACA,8CAAyD;iBAAzD,aAAyD;IAA5C,4CAA0C;;;cACvD,UAAkE;IAAxD,aAAW;IAAC,4CAA0C;;;8BANjE,WAIC;IACA,OAAyD',
names: [],
sources: [
'XMLViewNestedView.view.xml',
],
version: 3,
}

> Snapshot 3

[]

## Transpile XMLViewWithLowerCaseControl.view.xml

> Snapshot 1
Expand Down
Binary file modified test/lib/linter/xmlTemplate/snapshots/transpiler.ts.snap
Binary file not shown.