mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 04:41:36 +08:00
Enabled the navigation tests.
This commit is contained in:
@ -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; });
|
||||||
//}
|
}
|
@ -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();
|
||||||
|
Reference in New Issue
Block a user