mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-08-17 21:01:34 +08:00
Removed a test.
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; });
|
||||||
}
|
//}
|
Reference in New Issue
Block a user