Removed a test.

This commit is contained in:
Rossen Hristov
2015-10-01 16:11:11 +03:00
parent 5e654ce96b
commit 16fecf19dd

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; });
} //}