Files
NativeScript/tests/app/ui/gestures/gestures-tests.ts
Alexander Vakrilov cc97a16800 feat: Scoped Packages (#7911)
* chore: move tns-core-modules to nativescript-core

* chore: preparing compat generate script

* chore: add missing definitions

* chore: no need for http-request to be private

* chore: packages chore

* test: generate tests for tns-core-modules

* chore: add anroid module for consistency

* chore: add .npmignore

* chore: added privateModulesWhitelist

* chore(webpack): added bundle-entry-points

* chore: scripts

* chore: tests changed to use @ns/core

* test: add scoped-packages test project

* test: fix types

* test: update test project

* chore: build scripts

* chore: update build script

* chore: npm scripts cleanup

* chore: make the compat pgk work with old wp config

* test: generate diff friendly tests

* chore: create barrel exports

* chore: move files after rebase

* chore: typedoc config

* chore: compat mode

* chore: review of barrels

* chore: remove tns-core-modules import after rebase

* chore: dev workflow setup

* chore: update developer-workflow

* docs: experiment with API extractor

* chore: api-extractor and barrel exports

* chore: api-extractor configs

* chore: generate d.ts rollup with api-extractor

* refactor: move methods inside Frame

* chore: fic tests to use Frame static methods

* refactor: create Builder class

* refactor: use Builder class in tests

* refactor: include Style in ui barrel

* chore: separate compat build script

* chore: fix tslint errors

* chore: update NATIVESCRIPT_CORE_ARGS

* chore: fix compat pack

* chore: fix ui-test-app build with linked modules

* chore: Application, ApplicationSettings, Connectivity and Http

* chore: export Trace, Profiling and Utils

* refactor: Static create methods for ImageSource

* chore: fix deprecated usages of ImageSource

* chore: move Span and FormattedString to ui

* chore: add events-args and ImageSource to index files

* chore: check for CLI >= 6.2 when building for IOS

* chore: update travis build

* chore: copy Pod file to compat package

* chore: update error msg ui-tests-app

* refactor: Apply suggestions from code review

Co-Authored-By: Martin Yankov <m.i.yankov@gmail.com>

* chore: typings and refs

* chore: add missing d.ts files for public API

* chore: adress code review FB

* chore: update api-report

* chore: dev-workflow for other apps

* chore: api update

* chore: update api-report
2019-10-17 00:45:33 +03:00

169 lines
5.8 KiB
TypeScript

/* tslint:disable:no-unused-variable */
// >> gestures-require
import * as gestures from "@nativescript/core/ui/gestures";
// << gestures-require
import * as labelModule from "@nativescript/core/ui/label";
export var test_DummyTestForSnippetOnly0 = function () {
// >> gestures-double-tap
var label = new labelModule.Label();
var observer = label.on(gestures.GestureTypes.doubleTap, function (args: gestures.GestureEventData) {
console.log("Double Tap");
});
// << gestures-double-tap
};
export var test_DummyTestForSnippetOnly01 = function () {
// >> gestures-double-tap-alt
var label = new labelModule.Label();
var observer = label.on("doubleTap", function (args: gestures.GestureEventData) {
console.log("Double Tap");
});
// << gestures-double-tap-alt
};
export var test_DummyTestForSnippetOnly1 = function () {
// >> gestures-long-press
var label = new labelModule.Label();
var observer = label.on(gestures.GestureTypes.longPress, function (args: gestures.GestureEventData) {
console.log("Long Press");
});
// << gestures-long-press
};
export var test_DummyTestForSnippetOnly11 = function () {
// >> gestures-long-press-alt
var label = new labelModule.Label();
var observer = label.on("longPress", function (args: gestures.GestureEventData) {
console.log("Long Press");
});
// << gestures-long-press-alt
};
export var test_DummyTestForSnippetOnly2 = function () {
// >> gestures-pan
var label = new labelModule.Label();
var observer = label.on(gestures.GestureTypes.pan, function (args: gestures.PanGestureEventData) {
console.log("Pan deltaX:" + args.deltaX + "; deltaY:" + args.deltaY + ";");
});
// << gestures-pan
};
export var test_DummyTestForSnippetOnly22 = function () {
// >> gestures-pan-alt
var label = new labelModule.Label();
var observer = label.on("pan", function (args: gestures.PanGestureEventData) {
console.log("Pan deltaX:" + args.deltaX + "; deltaY:" + args.deltaY + ";");
});
// << gestures-pan-alt
};
export var test_DummyTestForSnippetOnly3 = function () {
// >> gestures-pan-pinch
var label = new labelModule.Label();
var observer = label.on(gestures.GestureTypes.pinch, function (args: gestures.PinchGestureEventData) {
console.log("Pinch scale: " + args.scale);
});
// << gestures-pan-pinch
};
export var test_DummyTestForSnippetOnly33 = function () {
// >> gestures-pan-pinch-alt
var label = new labelModule.Label();
var observer = label.on("pinch", function (args: gestures.PinchGestureEventData) {
console.log("Pinch scale: " + args.scale);
});
// << gestures-pan-pinch-alt
};
export var test_DummyTestForSnippetOnly4 = function () {
// >> gestures-rotation
var label = new labelModule.Label();
var observer = label.on(gestures.GestureTypes.rotation, function (args: gestures.RotationGestureEventData) {
console.log("Rotation: " + args.rotation);
});
// << gestures-rotation
};
export var test_DummyTestForSnippetOnly44 = function () {
// >> gestures-rotation-alt
var label = new labelModule.Label();
var observer = label.on("rotation", function (args: gestures.RotationGestureEventData) {
console.log("Rotation: " + args.rotation);
});
// << gestures-rotation-alt
};
export var test_DummyTestForSnippetOnly5 = function () {
// >> gestures-swipe
var label = new labelModule.Label();
var observer = label.on(gestures.GestureTypes.swipe, function (args: gestures.SwipeGestureEventData) {
console.log("Swipe direction: " + args.direction);
});
// << gestures-swipe
};
export var test_DummyTestForSnippetOnly55 = function () {
// >> gestures-swipe-alt
var label = new labelModule.Label();
var observer = label.on("swipe", function (args: gestures.SwipeGestureEventData) {
console.log("Swipe direction: " + args.direction);
});
// << gestures-swipe-alt
};
export var test_DummyTestForSnippetOnly6 = function () {
// >> gestures-tap
var label = new labelModule.Label();
var observer = label.on(gestures.GestureTypes.tap, function (args: gestures.GestureEventData) {
console.log("Tap");
});
// << gestures-tap
};
export var test_DummyTestForSnippetOnly66 = function () {
// >> gestures-tap-alt
var label = new labelModule.Label();
var observer = label.on("tap", function (args: gestures.GestureEventData) {
console.log("Tap");
});
// << gestures-tap-alt
};
export var test_DummyTestForSnippetOnly7 = function () {
// >> gestures-stop-observe
var label = new labelModule.Label();
var observer = label.on(gestures.GestureTypes.tap, function (args: gestures.GestureEventData) {
console.log("Tap");
});
observer.disconnect();
// << gestures-stop-observe
};
export var test_DummyTestForSnippetOnly8 = function () {
// >> gestures-multiple
var label = new labelModule.Label();
var observer = label.on(gestures.GestureTypes.tap | gestures.GestureTypes.doubleTap | gestures.GestureTypes.longPress, function (args: gestures.GestureEventData) {
console.log("Event: " + args.eventName);
});
// << gestures-multiple
};
export var test_DummyTestForSnippetOnly88 = function () {
// >> gestures-string
var label = new labelModule.Label();
var observer = label.on("tap, doubleTap, longPress", function (args: gestures.GestureEventData) {
console.log("Event: " + args.eventName);
});
// << gestures-string
};
export var test_DummyTestForSnippetOnly9 = function () {
// >> gestures-events-string
var label = new labelModule.Label();
var observer = label.on("loaded, tap, longPress", function (args: gestures.GestureEventData) {
console.log("Event: " + args.eventName);
});
// << gestures-events-string
};