Fix tslint

Revert code that set currentEntry in fragment.transitions.android
Update tests & apps runtime version
Fix broken import in frame-tests
Revert TabView to fire loaded for all TabViewItems
This commit is contained in:
Hristo Hristov
2017-09-27 12:58:18 +03:00
parent af034089ca
commit 38d026a3df
6 changed files with 3 additions and 38 deletions

View File

@@ -1,4 +1,3 @@
/* tslint:disable */
//@private
import * as android from "./frame-tests.android";
import * as iOS from "./frame-tests.ios";
import * as android from "./frame-tests.android";

View File

@@ -187,7 +187,6 @@ export function test_correct_layout_scrollable_content_true_flat_action_bar() {
TKUnit.assertEqual(contentHeight, expectedLabelHeight, "lbl.height !== screenHeight - statusBar - navBarHeight - tabBarHeight");
}
export function test_correct_layout_scrollable_content_true_flat_action_bar_edges_span_under_opaque_bars() {
const page = new Page();
(<any>page).scrollableContent = true;

View File

@@ -168,17 +168,6 @@ export class TabViewTest extends UITest<tabViewModule.TabView> {
TKUnit.assertEqual(actualValue, expectedValue, "selectedIndex");
}
public testSettingNegativeSelectedIndexShouldThrow() {
var tabView = this.testView;
tabView.items = this._createItems(3);
this.waitUntilTestElementIsLoaded();
tabView.items.forEach((item, index, array) => {
const expected = index === tabView.selectedIndex;
TKUnit.assertEqual(item.isLoaded, expected);
});
}
public testBindingToTabEntryWithUndefinedViewShouldThrow = function () {
var tabView = this.testView;
this.waitUntilTestElementIsLoaded();

View File

@@ -6,10 +6,10 @@
"nativescript": {
"id": "org.nativescript.UnitTestApp",
"tns-ios": {
"version": "3.1.0"
"version": "3.2.0"
},
"tns-android": {
"version": "3.1.1"
"version": "3.2.0"
}
},
"dependencies": {

View File

@@ -350,18 +350,6 @@ export class TabView extends TabViewBase {
super.disposeNativeView();
}
public _loadEachChild(): void {
// We load childs once they are added to native parent or Frame
// cannot navigate because its nativeView is not added to window.
const index = this.selectedIndex;
if (index >= 0) {
const item = this.items[index];
if (!item.isLoaded && this.isLoaded) {
item.onLoaded();
}
}
}
private setAdapterItems(items: Array<TabViewItem>) {
(<any>this._pagerAdapter).items = items;
@@ -405,19 +393,12 @@ export class TabView extends TabViewBase {
this._viewPager.setOffscreenPageLimit(value);
}
[selectedIndexProperty.getDefault](): number {
return -1;
}
[selectedIndexProperty.setNative](value: number) {
if (traceEnabled()) {
traceWrite("TabView this._viewPager.setCurrentItem(" + value + ", true);", traceCategory);
}
const item = this.items[value];
this._viewPager.setCurrentItem(value, true);
if (!item.isLoaded && this.isLoaded) {
item.onLoaded();
}
}
[itemsProperty.getDefault](): TabViewItem[] {

View File

@@ -356,9 +356,6 @@ export class TabView extends TabViewBase {
}
}
[selectedIndexProperty.getDefault](): number {
return -1;
}
[selectedIndexProperty.setNative](value: number) {
if (traceEnabled()) {
traceWrite("TabView._onSelectedIndexPropertyChangedSetNativeValue(" + value + ")", traceCategories.Debug);