Enabled the navigation tests.

This commit is contained in:
Rossen Hristov
2015-10-12 10:20:55 +03:00
parent 0c0b0484c8
commit b8dd6ad751
2 changed files with 30 additions and 30 deletions

View File

@ -32,41 +32,41 @@ export var test_backstackVisible = function() {
} }
// Clearing the history messes up the tests app. // Clearing the history messes up the tests app.
//export var test_ClearHistory = function () { export var test_ClearHistory = function () {
// var pageFactory = function(): pageModule.Page { var pageFactory = function(): pageModule.Page {
// return new pageModule.Page(); return new pageModule.Page();
// }; };
// var mainTestPage = frame.topmost().currentPage; var mainTestPage = frame.topmost().currentPage;
// var mainPageFactory = function(): pageModule.Page { var mainPageFactory = function(): pageModule.Page {
// return mainTestPage; return mainTestPage;
// }; };
// var currentPage: pageModule.Page; var currentPage: pageModule.Page;
// currentPage = frame.topmost().currentPage; currentPage = frame.topmost().currentPage;
// frame.topmost().navigate({ create: pageFactory }); frame.topmost().navigate({ create: pageFactory });
// TKUnit.waitUntilReady(() => { return frame.topmost().currentPage !== currentPage; }); TKUnit.waitUntilReady(() => { return frame.topmost().currentPage !== currentPage; });
// currentPage = frame.topmost().currentPage; currentPage = frame.topmost().currentPage;
// frame.topmost().navigate({ create: pageFactory }); frame.topmost().navigate({ create: pageFactory });
// TKUnit.waitUntilReady(() => { return frame.topmost().currentPage !== currentPage; }); TKUnit.waitUntilReady(() => { return frame.topmost().currentPage !== currentPage; });
// currentPage = frame.topmost().currentPage; currentPage = frame.topmost().currentPage;
// frame.topmost().navigate({ create: pageFactory }); frame.topmost().navigate({ create: pageFactory });
// TKUnit.waitUntilReady(() => { return frame.topmost().currentPage !== currentPage; }); TKUnit.waitUntilReady(() => { return frame.topmost().currentPage !== currentPage; });
// TKUnit.assert(frame.topmost().canGoBack(), "Frame should be able to go back."); 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().backStack.length === 3, "Back stack should have 3 entries.");
// // Navigate with clear history. // Navigate with clear history.
// currentPage = frame.topmost().currentPage; currentPage = frame.topmost().currentPage;
// frame.topmost().navigate({ create: pageFactory, clearHistory: true }); frame.topmost().navigate({ create: pageFactory, clearHistory: true });
// TKUnit.waitUntilReady(() => { return frame.topmost().currentPage !== currentPage; }); TKUnit.waitUntilReady(() => { return frame.topmost().currentPage !== currentPage; });
// TKUnit.assert(!frame.topmost().canGoBack(), "Frame should NOT be able to go back."); 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().backStack.length === 0, "Back stack should have 0 entries.");
// frame.topmost().navigate({ create: mainPageFactory }); frame.topmost().navigate({ create: mainPageFactory });
// TKUnit.waitUntilReady(() => { return frame.topmost().currentPage === mainTestPage; }); TKUnit.waitUntilReady(() => { return frame.topmost().currentPage === mainTestPage; });
//} }

View File

@ -88,7 +88,7 @@ if (!isRunningOnEmulator()) {
} }
// Navigation tests should always be last. // Navigation tests should always be last.
//allTests["NAVIGATION"] = require("./navigation-tests"); allTests["NAVIGATION"] = require("./navigation-tests");
import utils = require("utils/utils"); import utils = require("utils/utils");
var density = utils.layout.getDisplayDensity(); var density = utils.layout.getDisplayDensity();