mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fix for #747 issue.
This commit is contained in:
5
apps/tests/ui/action-bar/ActionBar_NumberAsText.ts
Normal file
5
apps/tests/ui/action-bar/ActionBar_NumberAsText.ts
Normal file
@@ -0,0 +1,5 @@
|
||||
import frame = require("ui/frame");
|
||||
|
||||
export function buttonTap(args) {
|
||||
frame.topmost().goBack();
|
||||
}
|
||||
12
apps/tests/ui/action-bar/ActionBar_NumberAsText.xml
Normal file
12
apps/tests/ui/action-bar/ActionBar_NumberAsText.xml
Normal file
@@ -0,0 +1,12 @@
|
||||
<Page>
|
||||
<Page.actionBar>
|
||||
<ActionBar title="Service Asset Maintenance">
|
||||
<ActionBar.actionItems>
|
||||
<ActionItem text="1" ios.position="right"/>
|
||||
</ActionBar.actionItems>
|
||||
</ActionBar>
|
||||
</Page.actionBar>
|
||||
<StackLayout>
|
||||
<Button text="Click me" />
|
||||
</StackLayout>
|
||||
</Page>
|
||||
@@ -4,6 +4,7 @@ import helper = require("../helper");
|
||||
import builder = require("ui/builder");
|
||||
import button = require("ui/button");
|
||||
import PageModule = require("ui/page");
|
||||
import fs = require("file-system");
|
||||
|
||||
// <snippet module="ui/action-bar" title="ActionBar">
|
||||
// # ActionBar
|
||||
@@ -203,3 +204,24 @@ export function test_Setting_ActionItems_doesnt_thrown() {
|
||||
helper.goBack();
|
||||
}
|
||||
}
|
||||
|
||||
export function test_Setting_ActionItemsWithNumberAsText_doesnt_thrown() {
|
||||
|
||||
var gotException = false;
|
||||
|
||||
var moduleName = __dirname.substr(fs.knownFolders.currentApp().path.length);
|
||||
|
||||
try {
|
||||
helper.navigateToModule(moduleName + "/ActionBar_NumberAsText");
|
||||
}
|
||||
catch (e) {
|
||||
gotException = true;
|
||||
}
|
||||
|
||||
try {
|
||||
TKUnit.assert(!gotException, "Expected: false, Actual: " + gotException);
|
||||
}
|
||||
finally {
|
||||
helper.goBack();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user