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.
test(Formatter): Add positive and negative fixtures
- Loading branch information
1 parent
8d2ad2f
commit 64ddc1d
Showing
3 changed files
with
30 additions
and
0 deletions.
There are no files selected for viewing
12 changes: 12 additions & 0 deletions
12
test/fixtures/linter/rules/NoGlobals/FormatterGlobalBindingString.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,12 @@ | ||
sap.ui.define( | ||
["sap/m/Input"], | ||
(Input) => { | ||
const input = new Input({ | ||
value: "{ path: 'invoice>Status', formatter: 'ui5.walkthrough.model.formatter.statusText' }" | ||
}); | ||
|
||
input.applySettings({ | ||
value: "{ path: 'invoice>Status', formatter: 'ui5.walkthrough.model.formatter.statusText' }", | ||
}); | ||
} | ||
); |
10 changes: 10 additions & 0 deletions
10
test/fixtures/linter/rules/NoGlobals/FormatterGlobalBindingStringPropertyString.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,10 @@ | ||
sap.ui.define( | ||
["sap/m/Input", "ui5/walkthrough/model/formatter"], | ||
(Input, formatter) => { | ||
// Although the formatter property is not a global notation, | ||
// it should still get detected if it is a string: | ||
const input = new Input({ | ||
value: "{ path: 'invoice>Status', formatter: 'formatter.statusText' }" | ||
}); | ||
} | ||
); |
8 changes: 8 additions & 0 deletions
8
test/fixtures/linter/rules/NoGlobals/FormatterGlobalBindingString_Negative.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,8 @@ | ||
sap.ui.define( | ||
["sap/m/Input", "ui5/walkthrough/model/formatter"], | ||
(Input, formatter) => { | ||
const input = new Input({ | ||
value: "{ path: 'invoice>Status', formatter: formatter.statusText }" | ||
}); | ||
} | ||
); |