diff options
author | Denis Anisimov <denis@vaadin.com> | 2015-01-20 09:20:29 +0200 |
---|---|---|
committer | Sauli Tähkäpää <sauli@vaadin.com> | 2015-01-21 11:04:18 +0200 |
commit | 4428c7dc83d31c7ff4413e3e6301f4588d59dba3 (patch) | |
tree | 39adbea5deea9d45defbf14e41709d7507c33f86 | |
parent | f7516349e187e8cd0eb90f9f5715045653452679 (diff) | |
download | vaadin-framework-4428c7dc83d31c7ff4413e3e6301f4588d59dba3.tar.gz vaadin-framework-4428c7dc83d31c7ff4413e3e6301f4588d59dba3.zip |
Button icon 'icon-align-top' style correction (#15140).
Change-Id: I16bc415596431340e4e4d1944b3927dc3fd6cd96
-rw-r--r-- | uitest/src/com/vaadin/tests/themes/valo/AlignTopIconInButtonTest.java | 10 |
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))); } } |