mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
how-to's fixed slashes in code comments
This commit is contained in:
@@ -68,7 +68,7 @@ function binding_busy_to_image() {
|
||||
indicator.width = 100;
|
||||
indicator.height = 100;
|
||||
|
||||
//// Bind the busy property of the indicator to the isLoading property of the image
|
||||
// Bind the busy property of the indicator to the isLoading property of the image
|
||||
indicator.bind({
|
||||
sourceProperty: "isLoading",
|
||||
targetProperty: "busy"
|
||||
|
||||
@@ -38,7 +38,7 @@ export function test_AnimatingProperties(done) {
|
||||
curve: enums.AnimationCurve.easeIn
|
||||
})
|
||||
.then(() => {
|
||||
////console.log("Animation finished.");
|
||||
//console.log("Animation finished.");
|
||||
// >> (hide)
|
||||
assertIOSNativeTransformIsCorrect(label);
|
||||
done();
|
||||
@@ -61,13 +61,13 @@ export function test_CancellingAnimation(done) {
|
||||
|
||||
animation1.play()
|
||||
.then(() => {
|
||||
////console.log("Animation finished");
|
||||
//console.log("Animation finished");
|
||||
// >> (hide)
|
||||
throw new Error("Cancelling Animation - Should not be in the Promise Then()");
|
||||
// << (hide)
|
||||
})
|
||||
.catch((e) => {
|
||||
////console.log("Animation cancelled");
|
||||
//console.log("Animation cancelled");
|
||||
// >> (hide)
|
||||
if (!e) {
|
||||
done(new Error("Cancel path did not have proper error"));
|
||||
@@ -88,13 +88,13 @@ export function test_CancellingAnimate(done) {
|
||||
// >> animation-cancel2
|
||||
var animation1 = label.animate({ translate: { x: 100, y: 100 }, duration: 20 })
|
||||
.then(() => {
|
||||
////console.log("Animation finished");
|
||||
//console.log("Animation finished");
|
||||
// >> (hide)
|
||||
throw new Error("Cancelling Animate - Should not be in Promise Then()");
|
||||
// << (hide)
|
||||
})
|
||||
.catch((e) => {
|
||||
////console.log("Animation cancelled");
|
||||
//console.log("Animation cancelled");
|
||||
// >> (hide)
|
||||
if (!e) {
|
||||
done(new Error("Cancel path did not have proper error"));
|
||||
@@ -126,7 +126,7 @@ export function test_ChainingAnimations(done) {
|
||||
.then(() => label.animate({ rotate: 180, duration: duration }))
|
||||
.then(() => label.animate({ rotate: 0, duration: duration }))
|
||||
.then(() => {
|
||||
////console.log("Animation finished");
|
||||
//console.log("Animation finished");
|
||||
// >> (hide)
|
||||
assertIOSNativeTransformIsCorrect(label);
|
||||
done();
|
||||
@@ -155,7 +155,7 @@ export function test_ReusingAnimations(done) {
|
||||
.then(() => animation1.play())
|
||||
.then(() => animation2.play())
|
||||
.then(() => {
|
||||
////console.log("Animation finished");
|
||||
//console.log("Animation finished");
|
||||
// >> (hide)
|
||||
assertIOSNativeTransformIsCorrect(label);
|
||||
done();
|
||||
@@ -194,7 +194,7 @@ export function test_AnimatingMultipleViews(done) {
|
||||
var a = new animation.Animation(animations);
|
||||
a.play()
|
||||
.then(() => {
|
||||
////console.log("Animations finished");
|
||||
//console.log("Animations finished");
|
||||
// >> (hide)
|
||||
assertIOSNativeTransformIsCorrect(label1);
|
||||
assertIOSNativeTransformIsCorrect(label2);
|
||||
|
||||
@@ -101,7 +101,7 @@ var _testOnClick = function (views: Array<viewModule.View>) {
|
||||
var actualValue = false;
|
||||
// >> button-tap
|
||||
button.on(buttonModule.Button.tapEvent, function (args: observable.EventData) {
|
||||
//// Do something
|
||||
// Do something
|
||||
// >> (hide)
|
||||
actualValue = true;
|
||||
// << (hide)
|
||||
@@ -123,12 +123,12 @@ var _testBindTextDirectlyToModel = function (views: Array<viewModule.View>) {
|
||||
targetProperty: "text"
|
||||
}
|
||||
button.bind(options, model);
|
||||
//// button.text is now "OK"
|
||||
// button.text is now "OK"
|
||||
// >> (hide)
|
||||
TKUnit.assert(button.text === "OK", "Actual: " + button.text + "; Expected: " + "OK");
|
||||
// << (hide)
|
||||
model.set("buttonTitle", "Cancel");
|
||||
//// button.text is now "Cancel"
|
||||
// button.text is now "Cancel"
|
||||
// >> (hide)
|
||||
TKUnit.assert(button.text === "Cancel", "Actual: " + button.text + "; Expected: " + "Cancel");
|
||||
// << (hide)
|
||||
|
||||
@@ -26,7 +26,7 @@ export function test_DummyTestForSnippetOnly1() {
|
||||
neutralButtonText: "Cancel"
|
||||
};
|
||||
dialogs.confirm(options).then((result: boolean) => {
|
||||
//// result can be true/false/undefined
|
||||
// result can be true/false/undefined
|
||||
console.log(result);
|
||||
});
|
||||
// << dialog-confirm
|
||||
@@ -54,7 +54,7 @@ export function test_DummyTestForSnippetOnly3() {
|
||||
password: ""
|
||||
};
|
||||
dialogs.login(options).then((loginResult: dialogs.LoginResult) => {
|
||||
//// true or false.
|
||||
// true or false.
|
||||
console.log(loginResult.result);
|
||||
});
|
||||
// << dialog-login
|
||||
|
||||
@@ -10,19 +10,19 @@ export function test_DummyTestForSnippetOnly() {
|
||||
cache.placeholder = imageSource.fromFile(fs.path.join(__dirname, "res/no-image.png"));
|
||||
cache.maxRequests = 5;
|
||||
|
||||
//// Enable download while not scrolling
|
||||
// Enable download while not scrolling
|
||||
cache.enableDownload();
|
||||
|
||||
var imgSouce: imageSource.ImageSource;
|
||||
var url = "https://github.com/NativeScript.png";
|
||||
//// Try to read the image from the cache
|
||||
// Try to read the image from the cache
|
||||
var image = cache.get(url);
|
||||
if (image) {
|
||||
//// If present -- use it.
|
||||
// If present -- use it.
|
||||
imgSouce = imageSource.fromNativeSource(image);
|
||||
}
|
||||
else {
|
||||
//// If not present -- request its download.
|
||||
// If not present -- request its download.
|
||||
cache.push({
|
||||
key: url,
|
||||
url: url,
|
||||
@@ -34,7 +34,7 @@ export function test_DummyTestForSnippetOnly() {
|
||||
});
|
||||
}
|
||||
|
||||
//// Disable download while scrolling
|
||||
// Disable download while scrolling
|
||||
cache.disableDownload();
|
||||
// << image-cache-request-images
|
||||
}
|
||||
@@ -127,9 +127,9 @@ export var test_SettingStretch_AspectFit = function () {
|
||||
// >> img-set-stretch
|
||||
var image = new ImageModule.Image();
|
||||
image.imageSource = ImageSourceModule.fromFile(imagePath);
|
||||
//// There are 4 modes of stretching none, fill, aspectFill, aspectFit
|
||||
//// The default value is aspectFit.
|
||||
//// Image stretch can be set by using ImageModule.stretch enum.
|
||||
// There are 4 modes of stretching none, fill, aspectFill, aspectFit
|
||||
// The default value is aspectFit.
|
||||
// Image stretch can be set by using ImageModule.stretch enum.
|
||||
image.stretch = enumsModule.Stretch.aspectFit;
|
||||
// << img-set-stretch
|
||||
|
||||
|
||||
@@ -235,8 +235,8 @@ export class LabelTest extends testModule.UITest<LabelModule.Label> {
|
||||
// >> label-cssclass
|
||||
label.text = "The quick brown fox jumps over the lazy dog.";
|
||||
label.className = "title";
|
||||
//// after that all we have to do is to set a similar css entry within parent page css property
|
||||
//// label.parentPage.css = ".title {background-color: #C6C6C6; color: #10C2B0; font-size: 14;}";
|
||||
// after that all we have to do is to set a similar css entry within parent page css property
|
||||
// label.parentPage.css = ".title {background-color: #C6C6C6; color: #10C2B0; font-size: 14;}";
|
||||
// << label-cssclass
|
||||
|
||||
var actualTextSize;
|
||||
@@ -298,9 +298,9 @@ export class LabelTest extends testModule.UITest<LabelModule.Label> {
|
||||
|
||||
// >> label-cssclass-type
|
||||
label.text = "The quick brown fox jumps over the lazy dog.";
|
||||
//// in order to style label with a "type style scope" just put a similar css entry
|
||||
//// testLabel.parentPage.css = "label {background-color: #C6C6C6; color: #10C2B0; font-size: 14;}";
|
||||
//// all labels within the parent page will be styled according to css values
|
||||
// in order to style label with a "type style scope" just put a similar css entry
|
||||
// testLabel.parentPage.css = "label {background-color: #C6C6C6; color: #10C2B0; font-size: 14;}";
|
||||
// all labels within the parent page will be styled according to css values
|
||||
// << label-cssclass-type
|
||||
var expectedBackgroundColor = new colorModule.Color(backgroundColor);
|
||||
var actualBackgroundColor = label.style.backgroundColor;
|
||||
@@ -329,8 +329,8 @@ export class LabelTest extends testModule.UITest<LabelModule.Label> {
|
||||
// >> label-css-identifier
|
||||
label.text = "The quick brown fox jumps over the lazy dog.";
|
||||
label.id = "testLabel";
|
||||
//// after that all we have to do is to set a similar css entry within parent page css property
|
||||
//// label.parentPage.css = "#testLabel {background-color: #C6C6C6; color: #10C2B0; font-size: 14;}";
|
||||
// after that all we have to do is to set a similar css entry within parent page css property
|
||||
// label.parentPage.css = "#testLabel {background-color: #C6C6C6; color: #10C2B0; font-size: 14;}";
|
||||
// << label-css-identifier
|
||||
|
||||
var expectedBackgroundColor = new colorModule.Color(backgroundColor);
|
||||
@@ -356,7 +356,7 @@ export class LabelTest extends testModule.UITest<LabelModule.Label> {
|
||||
};
|
||||
label.bind(bindingOptions, sourceModel);
|
||||
sourceModel.set("sourceProperty", expValue);
|
||||
//// console.log(label.text); --> prints: "Expected Value"
|
||||
// console.log(label.text); --> prints: "Expected Value"
|
||||
// << label-observable
|
||||
|
||||
TKUnit.assertEqual(label.text, expValue);
|
||||
|
||||
@@ -23,7 +23,7 @@ export class AbsoluteLayoutTest extends testModule.UITest<absoluteLayoutModule.A
|
||||
absoluteLayout.height = 230;
|
||||
absoluteLayout.style.backgroundColor = new colorModule.Color("LightGray");
|
||||
var label = new labelModule.Label();
|
||||
//// In absolute layout place of an UI element is determined by 4 parameters : left, top, width and height.
|
||||
// In absolute layout place of an UI element is determined by 4 parameters : left, top, width and height.
|
||||
absoluteLayoutModule.AbsoluteLayout.setLeft(label, 10);
|
||||
absoluteLayoutModule.AbsoluteLayout.setTop(label, 10);
|
||||
label.width = 100;
|
||||
|
||||
@@ -592,15 +592,15 @@ export class GridLayoutTest extends testModule.UITest<GridLayout> {
|
||||
// << grid-layout-columnspan
|
||||
|
||||
// >> grid-layout-itemspec
|
||||
//// ItemSpec modes of the column refers to its width.
|
||||
//// Absolute size of the column
|
||||
// ItemSpec modes of the column refers to its width.
|
||||
// Absolute size of the column
|
||||
var firstColumn = new ItemSpec(80, GridUnitType.pixel);
|
||||
//// Star width means that this column will expand to fill the gap left from other columns
|
||||
// Star width means that this column will expand to fill the gap left from other columns
|
||||
var secondColumn = new ItemSpec(1, GridUnitType.star);
|
||||
//// Auto size means that column will expand or shrink in order to give enough place for all child UI elements.
|
||||
// Auto size means that column will expand or shrink in order to give enough place for all child UI elements.
|
||||
var thirdColumn = new ItemSpec(1, GridUnitType.auto);
|
||||
|
||||
//// Star and Auto modes for rows behave like corresponding setting for columns but refer to row height.
|
||||
// Star and Auto modes for rows behave like corresponding setting for columns but refer to row height.
|
||||
var firstRow = new ItemSpec(1, GridUnitType.auto);
|
||||
var secondRow = new ItemSpec(1, GridUnitType.star);
|
||||
// << grid-layout-itemspec
|
||||
|
||||
@@ -68,7 +68,7 @@ export class ListViewTest extends testModule.UITest<listViewModule.ListView> {
|
||||
listView.items = colors;
|
||||
listView.on(listViewModule.ListView.itemLoadingEvent, function (args: listViewModule.ItemEventData) {
|
||||
if (!args.view) {
|
||||
//// Create label if it is not already created.
|
||||
// Create label if it is not already created.
|
||||
args.view = new labelModule.Label();
|
||||
}
|
||||
(<labelModule.Label>args.view).text = colors[args.index];
|
||||
@@ -164,7 +164,7 @@ export class ListViewTest extends testModule.UITest<listViewModule.ListView> {
|
||||
|
||||
// >> article-change-refresh-listview
|
||||
colors.push("yellow");
|
||||
//// Manually trigger the update so that the new color is shown.
|
||||
// Manually trigger the update so that the new color is shown.
|
||||
listView.refresh();
|
||||
// << article-change-refresh-listview
|
||||
TKUnit.waitUntilReady(() => { return this.getNativeViewCount(listView) === listView.items.length; }, ASYNC);
|
||||
@@ -253,7 +253,7 @@ export class ListViewTest extends testModule.UITest<listViewModule.ListView> {
|
||||
listView.items = colors;
|
||||
listView.on(listViewModule.ListView.itemLoadingEvent, function (args: listViewModule.ItemEventData) {
|
||||
if (!args.view) {
|
||||
//// Create label if it is not already created.
|
||||
// Create label if it is not already created.
|
||||
args.view = new labelModule.Label();
|
||||
}
|
||||
(<labelModule.Label>args.view).text = colors.getItem(args.index);
|
||||
@@ -280,7 +280,7 @@ export class ListViewTest extends testModule.UITest<listViewModule.ListView> {
|
||||
|
||||
// >> article-push-in-observablearray
|
||||
colors.push("yellow");
|
||||
//// The ListView will be updated automatically.
|
||||
// The ListView will be updated automatically.
|
||||
// << article-push-in-observablearray
|
||||
TKUnit.waitUntilReady(() => { return this.getNativeViewCount(listView) === listView.items.length; }, ASYNC);
|
||||
TKUnit.assertEqual(this.getNativeViewCount(listView), 4, "getNativeViewCount");
|
||||
@@ -329,7 +329,7 @@ export class ListViewTest extends testModule.UITest<listViewModule.ListView> {
|
||||
listView.on(listViewModule.ListView.itemTapEvent, function (args: listViewModule.ItemEventData) {
|
||||
var tappedItemIndex = args.index;
|
||||
var tappedItemView = args.view;
|
||||
//// Do someting
|
||||
// Do someting
|
||||
// >> (hide)
|
||||
nativeTapRaised = true;
|
||||
itemIndex = args.index;
|
||||
@@ -352,7 +352,7 @@ export class ListViewTest extends testModule.UITest<listViewModule.ListView> {
|
||||
listView.on(listViewModule.ListView.itemLoadingEvent, this.loadViewWithItemNumber);
|
||||
// >> article-loadmoreitems-event
|
||||
listView.on(listViewModule.ListView.loadMoreItemsEvent, function (data: observable.EventData) {
|
||||
//// Do something.
|
||||
// Do something.
|
||||
// >> (hide)
|
||||
loadMoreItemsCount++;
|
||||
// << (hide)
|
||||
@@ -597,8 +597,8 @@ export class ListViewTest extends testModule.UITest<listViewModule.ListView> {
|
||||
//TKUnit.waitUntilReady(() => { return this.getNativeViewCount(this.testView) === this.testView.items.length; }, ASYNC);
|
||||
|
||||
//if (platform.device.os === platform.platformNames.ios) {
|
||||
//// Could cause GC on the next call.
|
||||
//// NOTE: Don't replace this with forceGC();
|
||||
// Could cause GC on the next call.
|
||||
// NOTE: Don't replace this with forceGC();
|
||||
//new ArrayBuffer(4 * 1024 * 1024);
|
||||
//}
|
||||
//utils.GC();
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// >> article-require-page-module
|
||||
import pageModule = require("ui/page");
|
||||
//// FrameModule is needed in order to have an option to navigate to the new page.
|
||||
// FrameModule is needed in order to have an option to navigate to the new page.
|
||||
import frameModule = require("ui/frame");
|
||||
// << article-require-page-module
|
||||
|
||||
@@ -210,7 +210,7 @@ export function test_NavigateTo_WithContext() {
|
||||
var pageFactory = function (): pageModule.Page {
|
||||
testPage = new pageModule.Page();
|
||||
testPage.on(pageModule.Page.navigatedToEvent, function () {
|
||||
////console.log(JSON.stringify(context));
|
||||
//console.log(JSON.stringify(context));
|
||||
});
|
||||
return testPage;
|
||||
};
|
||||
|
||||
@@ -70,7 +70,7 @@ export function test_refresh_after_adding_items_to_array_loads_new_items() {
|
||||
TKUnit.assertEqual(getChildrenCount(repeater), colors.length, "views count.");
|
||||
// >> artcle-array-push-element
|
||||
colors.push("yellow");
|
||||
//// Manually trigger the update so that the new color is shown.
|
||||
// Manually trigger the update so that the new color is shown.
|
||||
repeater.refresh();
|
||||
// << artcle-array-push-element
|
||||
TKUnit.wait(ASYNC);
|
||||
@@ -206,7 +206,7 @@ export function test_add_to_observable_array_refreshes_the_Repeater() {
|
||||
|
||||
// >> article-push-to-observablearray
|
||||
colors.push("yellow");
|
||||
//// The Repeater will be updated automatically.
|
||||
// The Repeater will be updated automatically.
|
||||
// << article-push-to-observablearray
|
||||
TKUnit.wait(ASYNC);
|
||||
TKUnit.waitUntilReady(() => repeater.isLayoutValid);
|
||||
|
||||
@@ -325,12 +325,12 @@ export function test_binding_value_to_model() {
|
||||
targetProperty: "value"
|
||||
};
|
||||
slider.bind(options, model);
|
||||
//// slider.value is now 21
|
||||
// slider.value is now 21
|
||||
// >> (hide)
|
||||
TKUnit.assertEqual(slider.value, 21, "slider.value");
|
||||
// << (hide)
|
||||
model.set("age", 22);
|
||||
//// slider.value is now 22
|
||||
// slider.value is now 22
|
||||
// >> (hide)
|
||||
TKUnit.assertEqual(slider.value, 22, "slider.value");
|
||||
// << (hide)
|
||||
|
||||
@@ -121,12 +121,12 @@ export function test_binding_value_to_model() {
|
||||
targetProperty: "checked"
|
||||
};
|
||||
mySwitch.bind(options, model);
|
||||
//// mySwitch.checked is now true
|
||||
// mySwitch.checked is now true
|
||||
// >> (hide)
|
||||
TKUnit.assertEqual(mySwitch.checked, true, "mySwitch.checked");
|
||||
// << (hide)
|
||||
model.set("enabled", false);
|
||||
//// mySwitch.checked is now false
|
||||
// mySwitch.checked is now false
|
||||
// >> (hide)
|
||||
TKUnit.assertEqual(mySwitch.checked, false, "mySwitch.checked");
|
||||
// << (hide)
|
||||
|
||||
@@ -171,13 +171,13 @@ export var testBindTextDirectlyToModel = function () {
|
||||
targetProperty: "text"
|
||||
}
|
||||
textField.bind(options, model);
|
||||
//// textField.text is now "john"
|
||||
// textField.text is now "john"
|
||||
// >> (hide)
|
||||
TKUnit.assert(textField.text === "john", "Actual: " + textField.text + "; Expected: " + "john");
|
||||
TKUnit.assert(textFieldTestsNative.getNativeText(textField) === "john", "Actual: " + textFieldTestsNative.getNativeText(textField) + "; Expected: " + "john");
|
||||
// << (hide)
|
||||
model.set("username", "mary");
|
||||
//// textField.text is now "mary"
|
||||
// textField.text is now "mary"
|
||||
// >> (hide)
|
||||
TKUnit.assert(textField.text === "mary", "Actual: " + textField.text + "; Expected: " + "mary");
|
||||
TKUnit.assert(textFieldTestsNative.getNativeText(textField) === "mary", "Actual: " + textFieldTestsNative.getNativeText(textField) + "; Expected: " + "mary");
|
||||
@@ -260,13 +260,13 @@ export var testBindHintDirectlyToModel = function () {
|
||||
targetProperty: "hint"
|
||||
}
|
||||
textField.bind(options, model);
|
||||
//// textField.hint is now "type your username here"
|
||||
// textField.hint is now "type your username here"
|
||||
// >> (hide)
|
||||
TKUnit.assert(textField.hint === "type your username here", "Actual: " + textField.text + "; Expected: " + "type your username here");
|
||||
TKUnit.assert(textFieldTestsNative.getNativeHint(textField) === "type your username here", "Actual: " + textFieldTestsNative.getNativeHint(textField) + "; Expected: " + "type your username here");
|
||||
// << (hide)
|
||||
model.set("hint", "type your password here");
|
||||
//// textField.hint is now "type your password here"
|
||||
// textField.hint is now "type your password here"
|
||||
// >> (hide)
|
||||
TKUnit.assert(textField.hint === "type your password here", "Actual: " + textField.text + "; Expected: " + "type your password here");
|
||||
TKUnit.assert(textFieldTestsNative.getNativeHint(textField) === "type your password here", "Actual: " + textFieldTestsNative.getNativeHint(textField) + "; Expected: " + "type your password here");
|
||||
@@ -325,13 +325,13 @@ export var testBindSecureDirectlyToModel = function () {
|
||||
targetProperty: "secure"
|
||||
}
|
||||
textField.bind(options, model);
|
||||
//// textField.secure is now true
|
||||
// textField.secure is now true
|
||||
// >> (hide)
|
||||
TKUnit.assert(textField.secure === true, "Actual: " + textField.secure + "; Expected: " + true);
|
||||
TKUnit.assert(textFieldTestsNative.getNativeSecure(textField) === true, "Actual: " + textFieldTestsNative.getNativeSecure(textField) + "; Expected: " + true);
|
||||
// << (hide)
|
||||
model.set("secure", false);
|
||||
//// textField.secure is now false
|
||||
// textField.secure is now false
|
||||
// >> (hide)
|
||||
TKUnit.assert(textField.secure === false, "Actual: " + textField.secure + "; Expected: " + false);
|
||||
TKUnit.assert(textFieldTestsNative.getNativeSecure(textField) === false, "Actual: " + textFieldTestsNative.getNativeSecure(textField) + "; Expected: " + false);
|
||||
|
||||
@@ -104,13 +104,13 @@ export var testBindTextDirectlyToModel = function () {
|
||||
targetProperty: "text"
|
||||
}
|
||||
textView.bind(options, model);
|
||||
//// textView.text is now "john"
|
||||
// textView.text is now "john"
|
||||
// >> (hide)
|
||||
TKUnit.assert(textView.text === "john", "Actual: " + textView.text + "; Expected: " + "john");
|
||||
TKUnit.assert(textViewTestsNative.getNativeText(textView) === "john", "Actual: " + textViewTestsNative.getNativeText(textView) + "; Expected: " + "john");
|
||||
// << (hide)
|
||||
model.set("username", "mary");
|
||||
//// textView.text is now "mary"
|
||||
// textView.text is now "mary"
|
||||
// >> (hide)
|
||||
TKUnit.assert(textView.text === "mary", "Actual: " + textView.text + "; Expected: " + "mary");
|
||||
TKUnit.assert(textViewTestsNative.getNativeText(textView) === "mary", "Actual: " + textViewTestsNative.getNativeText(textView) + "; Expected: " + "mary");
|
||||
@@ -184,13 +184,13 @@ export var testBindHintDirectlyToModel = function () {
|
||||
targetProperty: "hint"
|
||||
}
|
||||
textView.bind(options, model);
|
||||
//// TextView.hint is now "type your username here"
|
||||
// TextView.hint is now "type your username here"
|
||||
// >> (hide)
|
||||
TKUnit.assert(textView.hint === "type your username here", "Actual: " + textView.hint + "; Expected: " + "type your username here");
|
||||
TKUnit.assert(textViewTestsNative.getNativeHint(textView) === "type your username here", "Actual: " + textViewTestsNative.getNativeHint(textView) + "; Expected: " + "type your username here");
|
||||
// << (hide)
|
||||
model.set("hint", "type your password here");
|
||||
//// TextView.hint is now "type your password here"
|
||||
// TextView.hint is now "type your password here"
|
||||
// >> (hide)
|
||||
TKUnit.assert(textView.hint === "type your password here", "Actual: " + textView.hint + "; Expected: " + "type your password here");
|
||||
TKUnit.assert(textViewTestsNative.getNativeHint(textView) === "type your password here", "Actual: " + textViewTestsNative.getNativeHint(textView) + "; Expected: " + "type your password here");
|
||||
@@ -305,13 +305,13 @@ export var testBindEditableDirectlyToModel = function () {
|
||||
targetProperty: "editable"
|
||||
}
|
||||
textView.bind(options, model);
|
||||
//// textView.editable is now false
|
||||
// textView.editable is now false
|
||||
// >> (hide)
|
||||
TKUnit.assert(textView.editable === false, "Actual: " + textView.text + "; Expected: " + false);
|
||||
TKUnit.assert(textViewTestsNative.getNativeEditable(textView) === false, "Actual: " + textViewTestsNative.getNativeEditable(textView) + "; Expected: " + false);
|
||||
// << (hide)
|
||||
model.set("editable", true);
|
||||
//// textView.editable is now true
|
||||
// textView.editable is now true
|
||||
// >> (hide)
|
||||
TKUnit.assert(textView.editable === true, "Actual: " + textView.text + "; Expected: " + true);
|
||||
TKUnit.assert(textViewTestsNative.getNativeEditable(textView) === true, "Actual: " + textViewTestsNative.getNativeEditable(textView) + "; Expected: " + true);
|
||||
|
||||
Reference in New Issue
Block a user