From b8dd6ad7517d0b49ca6ec2036ac1a24565861cc9 Mon Sep 17 00:00:00 2001 From: Rossen Hristov Date: Mon, 12 Oct 2015 10:20:55 +0300 Subject: [PATCH] Enabled the navigation tests. --- apps/tests/navigation-tests.ts | 58 +++++++++++++++++----------------- apps/tests/testRunner.ts | 2 +- 2 files changed, 30 insertions(+), 30 deletions(-) diff --git a/apps/tests/navigation-tests.ts b/apps/tests/navigation-tests.ts index 999dc8ab2..371191d3b 100644 --- a/apps/tests/navigation-tests.ts +++ b/apps/tests/navigation-tests.ts @@ -32,41 +32,41 @@ export var test_backstackVisible = function() { } // Clearing the history messes up the tests app. -//export var test_ClearHistory = function () { -// var pageFactory = function(): pageModule.Page { -// return new pageModule.Page(); -// }; +export var test_ClearHistory = function () { + var pageFactory = function(): pageModule.Page { + return new pageModule.Page(); + }; -// var mainTestPage = frame.topmost().currentPage; -// var mainPageFactory = function(): pageModule.Page { -// return mainTestPage; -// }; + var mainTestPage = frame.topmost().currentPage; + var mainPageFactory = function(): pageModule.Page { + return mainTestPage; + }; -// var currentPage: pageModule.Page; + var currentPage: pageModule.Page; -// currentPage = frame.topmost().currentPage; -// frame.topmost().navigate({ create: pageFactory }); -// TKUnit.waitUntilReady(() => { return frame.topmost().currentPage !== currentPage; }); + currentPage = frame.topmost().currentPage; + frame.topmost().navigate({ create: pageFactory }); + TKUnit.waitUntilReady(() => { return frame.topmost().currentPage !== currentPage; }); -// currentPage = frame.topmost().currentPage; -// frame.topmost().navigate({ create: pageFactory }); -// TKUnit.waitUntilReady(() => { return frame.topmost().currentPage !== currentPage; }); + currentPage = frame.topmost().currentPage; + frame.topmost().navigate({ create: pageFactory }); + TKUnit.waitUntilReady(() => { return frame.topmost().currentPage !== currentPage; }); -// currentPage = frame.topmost().currentPage; -// frame.topmost().navigate({ create: pageFactory }); -// TKUnit.waitUntilReady(() => { return frame.topmost().currentPage !== currentPage; }); + currentPage = frame.topmost().currentPage; + frame.topmost().navigate({ create: pageFactory }); + TKUnit.waitUntilReady(() => { return frame.topmost().currentPage !== currentPage; }); -// TKUnit.assert(frame.topmost().canGoBack(), "Frame should be able to go back."); -// TKUnit.assert(frame.topmost().backStack.length === 3, "Back stack should have 3 entries."); + TKUnit.assert(frame.topmost().canGoBack(), "Frame should be able to go back."); + TKUnit.assert(frame.topmost().backStack.length === 3, "Back stack should have 3 entries."); -// // Navigate with clear history. -// currentPage = frame.topmost().currentPage; -// frame.topmost().navigate({ create: pageFactory, clearHistory: true }); -// TKUnit.waitUntilReady(() => { return frame.topmost().currentPage !== currentPage; }); + // Navigate with clear history. + currentPage = frame.topmost().currentPage; + frame.topmost().navigate({ create: pageFactory, clearHistory: true }); + TKUnit.waitUntilReady(() => { return frame.topmost().currentPage !== currentPage; }); -// TKUnit.assert(!frame.topmost().canGoBack(), "Frame should NOT be able to go back."); -// TKUnit.assert(frame.topmost().backStack.length === 0, "Back stack should have 0 entries."); + TKUnit.assert(!frame.topmost().canGoBack(), "Frame should NOT be able to go back."); + TKUnit.assert(frame.topmost().backStack.length === 0, "Back stack should have 0 entries."); -// frame.topmost().navigate({ create: mainPageFactory }); -// TKUnit.waitUntilReady(() => { return frame.topmost().currentPage === mainTestPage; }); -//} \ No newline at end of file + frame.topmost().navigate({ create: mainPageFactory }); + TKUnit.waitUntilReady(() => { return frame.topmost().currentPage === mainTestPage; }); +} \ No newline at end of file diff --git a/apps/tests/testRunner.ts b/apps/tests/testRunner.ts index 105c7d909..e74940ed8 100644 --- a/apps/tests/testRunner.ts +++ b/apps/tests/testRunner.ts @@ -88,7 +88,7 @@ if (!isRunningOnEmulator()) { } // Navigation tests should always be last. -//allTests["NAVIGATION"] = require("./navigation-tests"); +allTests["NAVIGATION"] = require("./navigation-tests"); import utils = require("utils/utils"); var density = utils.layout.getDisplayDensity();