mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fixed the currentEntry property to return navigation entry instead of backstack entry
This commit is contained in:
@@ -9,7 +9,9 @@ var topmost = frameModule.topmost();
|
||||
import labelModule = require("ui/label");
|
||||
import pagesModule = require("ui/page");
|
||||
|
||||
export var test_DummyTestForSnippetOnly0 = function () {
|
||||
import TKUnit = require("./TKUnit");
|
||||
|
||||
export var ignore_test_DummyTestForSnippetOnly0 = function () {
|
||||
// <snippet module="ui/frame" title="frame">
|
||||
// ### Navigating to a Module
|
||||
// ``` JavaScript
|
||||
@@ -18,7 +20,7 @@ export var test_DummyTestForSnippetOnly0 = function () {
|
||||
// </snippet>
|
||||
}
|
||||
|
||||
export var test_DummyTestForSnippetOnly1 = function () {
|
||||
export var ignore_test_DummyTestForSnippetOnly1 = function () {
|
||||
// <snippet module="ui/frame" title="frame">
|
||||
// ### Navigating with a Factory Function
|
||||
// ``` JavaScript
|
||||
@@ -34,7 +36,7 @@ export var test_DummyTestForSnippetOnly1 = function () {
|
||||
// </snippet>
|
||||
}
|
||||
|
||||
export var test_DummyTestForSnippetOnly2 = function () {
|
||||
export var ignore_test_DummyTestForSnippetOnly2 = function () {
|
||||
// <snippet module="ui/frame" title="frame">
|
||||
// ### Navigating with NavigationEntry
|
||||
// ``` JavaScript
|
||||
@@ -48,7 +50,7 @@ export var test_DummyTestForSnippetOnly2 = function () {
|
||||
// </snippet>
|
||||
}
|
||||
|
||||
export var test_DummyTestForSnippetOnly3 = function () {
|
||||
export var ignore_test_DummyTestForSnippetOnly3 = function () {
|
||||
// <snippet module="ui/frame" title="frame">
|
||||
// ### Navigating Back
|
||||
// ``` JavaScript
|
||||
@@ -56,3 +58,8 @@ export var test_DummyTestForSnippetOnly3 = function () {
|
||||
// ```
|
||||
// </snippet>
|
||||
}
|
||||
|
||||
export function test_currentEntry() {
|
||||
var moduleName = frameModule.topmost().currentEntry.moduleName;
|
||||
TKUnit.assert(moduleName === "tests/app/mainPage" || moduleName === "app/mainPage", "Expected frameModule.topmost().currentEntry.moduleName to return tests/app/mainPage or app/mainPage but instead returned " + moduleName);
|
||||
}
|
||||
@@ -40,6 +40,7 @@ allTests["FILE SYSTEM"] = require("./file-system-tests");
|
||||
allTests["HTTP"] = require("./http-tests");
|
||||
allTests["XHR"] = require("./xhr-tests");
|
||||
allTests["FETCH"] = require("./fetch-tests");
|
||||
allTests["FRAME"] = require("./frame-tests");
|
||||
allTests["APPLICATION SETTINGS"] = require("./application-settings-tests");
|
||||
allTests["IMAGE SOURCE"] = require("./image-source-tests");
|
||||
allTests["TIMER"] = require("./timer-tests");
|
||||
|
||||
Reference in New Issue
Block a user