summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDenis Anisimov <denis@vaadin.com>2015-01-20 09:20:29 +0200
committerVaadin Code Review <review@vaadin.com>2015-01-20 08:50:54 +0000
commit3be687e39f4f6ec25383c090d8badfacf380fec9 (patch)
tree529d15c8166ebb8a96aafe4027fffd8312a6e7ed
parent498d183b01f66ab5b34c6ca56d8b0d5001a45b84 (diff)
downloadvaadin-framework-3be687e39f4f6ec25383c090d8badfacf380fec9.tar.gz
vaadin-framework-3be687e39f4f6ec25383c090d8badfacf380fec9.zip
Button icon 'icon-align-top' style correction (#15140).
Change-Id: I16bc415596431340e4e4d1944b3927dc3fd6cd96
-rw-r--r--uitest/src/com/vaadin/tests/themes/valo/AlignTopIconInButtonTest.java10
1 files changed, 6 insertions, 4 deletions
diff --git a/uitest/src/com/vaadin/tests/themes/valo/AlignTopIconInButtonTest.java b/uitest/src/com/vaadin/tests/themes/valo/AlignTopIconInButtonTest.java
index 287e25d402..02ef886721 100644
--- a/uitest/src/com/vaadin/tests/themes/valo/AlignTopIconInButtonTest.java
+++ b/uitest/src/com/vaadin/tests/themes/valo/AlignTopIconInButtonTest.java
@@ -15,7 +15,10 @@
*/
package com.vaadin.tests.themes.valo;
-import org.junit.Assert;
+import static org.hamcrest.CoreMatchers.is;
+import static org.hamcrest.MatcherAssert.assertThat;
+import static org.hamcrest.Matchers.lessThanOrEqualTo;
+
import org.junit.Test;
import org.openqa.selenium.By;
import org.openqa.selenium.WebElement;
@@ -30,7 +33,7 @@ import com.vaadin.tests.tb3.MultiBrowserTest;
public class AlignTopIconInButtonTest extends MultiBrowserTest {
@Test
- public void testIconPositioninButton() {
+ public void iconIsCenteredInsideButton() {
openTestURL();
WebElement wrapper = findElement(By.className("v-button-wrap"));
@@ -41,7 +44,6 @@ public class AlignTopIconInButtonTest extends MultiBrowserTest {
+ wrapper.getSize().getWidth() - icon.getLocation().getX()
- icon.getSize().getWidth();
- Assert.assertTrue("Icon element is not centered inside button.",
- Math.abs(rightSpace - leftSpace) <= 1);
+ assertThat(Math.abs(rightSpace - leftSpace), is(lessThanOrEqualTo(2)));
}
}