@@ -11,6 +11,7 @@ import pageModule = require("ui/page");
1111import stackLayoutModule = require( "ui/layouts/stack-layout" ) ;
1212import bindingBuilder = require( "ui/builder/binding-builder" ) ;
1313import labelModule = require( "ui/label" ) ;
14+ import textFieldModule = require( "ui/text-field" ) ;
1415
1516// <snippet module="ui/core/bindable" title="bindable">
1617// For information and examples how to use bindings please refer to special [**Data binding**](../../../../bindings.md) topic.
@@ -472,5 +473,21 @@ export var test_TwoElementsBindingToSameBindingContext = function () {
472473 TKUnit . assertEqual ( upperStackLabel . text , label2 . text ) ;
473474 }
474475
475- helper . navigateToModuleAndRunTest ( "./tests/ui/bindingContext_testPage" , testFunc ) ;
476+ helper . navigateToModuleAndRunTest ( "./tests/ui/bindingContext_testPage" , null , testFunc ) ;
477+ }
478+
479+ export var test_BindingContext_NavigatingForwardAndBack = function ( ) {
480+ var expectedValue = "Tralala" ;
481+ var testFunc = function ( page : pageModule . Page ) {
482+ var innerTestFunc = function ( childPage : pageModule . Page ) {
483+ var testTextField : textFieldModule . TextField = < textFieldModule . TextField > ( childPage . getViewById ( "testTextField" ) ) ;
484+ testTextField . text = expectedValue ;
485+ } ;
486+
487+ helper . navigateToModuleAndRunTest ( "./tests/ui/bindingContext_testPage2" , page . bindingContext , innerTestFunc ) ;
488+ var testLabel : labelModule . Label = < labelModule . Label > ( page . getViewById ( "testLabel" ) ) ;
489+ TKUnit . assertEqual ( testLabel . text , expectedValue ) ;
490+ }
491+
492+ helper . navigateToModuleAndRunTest ( "./tests/ui/bindingContext_testPage1" , null , testFunc ) ;
476493}
0 commit comments