Fix for #747 issue.

This commit is contained in:
Nedyalko Nikolov
2015-09-16 11:27:42 +03:00
parent ef8789c5da
commit bfaeb3c8a9
6 changed files with 44 additions and 3 deletions

View File

@@ -0,0 +1,5 @@
import frame = require("ui/frame");
export function buttonTap(args) {
frame.topmost().goBack();
}

View 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>

View File

@@ -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();
}
}