fixed tests

This commit is contained in:
Hristo Hristov
2016-02-11 15:07:57 +02:00
parent 85ff011e19
commit f208791770
2 changed files with 21 additions and 12 deletions

View File

@@ -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");