mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fixed tests
This commit is contained in:
@@ -81,32 +81,36 @@ class ScrollLayoutTest extends testModule.UITest<scrollViewModule.ScrollView> {
|
||||
}
|
||||
}
|
||||
|
||||
public test_scrollabeHeight_vertical_orientation_when_content_is_small() {
|
||||
this.testView.content.height = 100;
|
||||
public test_scrollableHeight_vertical_orientation_when_content_is_small() {
|
||||
this.testView.content.width = layoutHelper.dp(100);
|
||||
this.testView.content.height = layoutHelper.dp(100);
|
||||
this.waitUntilTestElementLayoutIsValid();
|
||||
|
||||
TKUnit.assertEqual(this.testView.scrollableHeight, 0, "this.testView.scrollableHeight");
|
||||
TKUnit.assertEqual(this.testView.scrollableWidth, 0, "this.testView.scrollableWidth");
|
||||
}
|
||||
|
||||
public test_scrollabeHeight_vertical_orientation_when_content_is_big() {
|
||||
public test_scrollableHeight_vertical_orientation_when_content_is_big() {
|
||||
this.testView.content.width = layoutHelper.dp(100);
|
||||
this.waitUntilTestElementLayoutIsValid();
|
||||
|
||||
TKUnit.assertAreClose(layoutHelper.dip(this.testView.scrollableHeight), 200, 0.4, "this.testView.scrollableHeight");
|
||||
TKUnit.assertEqual(this.testView.scrollableWidth, 0, "this.testView.scrollableWidth");
|
||||
}
|
||||
|
||||
public test_scrollabeWidth_horizontal_orientation_when_content_is_small() {
|
||||
public test_scrollableWidth_horizontal_orientation_when_content_is_small() {
|
||||
this.testView.orientation = enums.Orientation.horizontal;
|
||||
this.testView.content.width = 100;
|
||||
this.testView.content.width = layoutHelper.dp(100);
|
||||
this.testView.content.height = layoutHelper.dp(100);
|
||||
this.waitUntilTestElementLayoutIsValid();
|
||||
|
||||
TKUnit.assertEqual(this.testView.scrollableHeight, 0, "this.testView.scrollableHeight");
|
||||
TKUnit.assertEqual(this.testView.scrollableWidth, 0, "this.testView.scrollableWidth");
|
||||
}
|
||||
|
||||
public test_scrollabeWidth_horizontal_orientation_when_content_is_big() {
|
||||
public test_scrollableWidth_horizontal_orientation_when_content_is_big() {
|
||||
this.testView.orientation = enums.Orientation.horizontal;
|
||||
this.testView.content.height = layoutHelper.dp(100);
|
||||
this.waitUntilTestElementLayoutIsValid();
|
||||
|
||||
TKUnit.assertEqual(this.testView.scrollableHeight, 0, "this.testView.scrollableHeight");
|
||||
|
||||
Reference in New Issue
Block a user