Files
NativeScript/apps/tests/ui/frame/frame-tests.ts
Erjan Gavalji f15f283c74 Reorder test file structure to match the modules
Needed to have a nice structured cookbook dir in the docs

Includes:
Move the data-module tests under the data dir
Move the frame tests under the ui dir
Rename the dialog.md file to dialogs.md
Fix the web-view title
Add previous_url attributes to each article for SEO
Rename the style dir to styling to match the reference
Fix the frame-tests path
2016-05-05 10:43:35 +03:00

43 lines
1.2 KiB
TypeScript

// >> frame-require
import frameModule = require("ui/frame");
var topmost = frameModule.topmost();
// << frame-require
import labelModule = require("ui/label");
import pagesModule = require("ui/page");
export var ignore_test_DummyTestForSnippetOnly0 = function () {
// >> frame-navigating
topmost.navigate("details-page");
// << frame-navigating
}
export var ignore_test_DummyTestForSnippetOnly1 = function () {
// >> frame-factory-func
var factoryFunc = function () {
var label = new labelModule.Label();
label.text = "Hello, world!";
var page = new pagesModule.Page();
page.content = label;
return page;
};
topmost.navigate(factoryFunc);
// <<frame-factory-func
}
export var ignore_test_DummyTestForSnippetOnly2 = function () {
// >> frame-naventry
var navigationEntry = {
moduleName: "details-page",
context: { info: "something you want to pass to your page" },
animated: false
};
topmost.navigate(navigationEntry);
// << frame-naventry
}
export var ignore_test_DummyTestForSnippetOnly3 = function () {
// >> frame-back
topmost.goBack();
// << frame-back
}