Author: lfryc(a)redhat.com
Date: 2009-12-10 06:23:56 -0500 (Thu, 10 Dec 2009)
New Revision: 16104
Modified:
branches/sandbox/rf-demo-ftest-iexplore/src/test/java/org/jboss/richfaces/integrationTest/style/StyleTestCase.java
Log:
* StyleTestCase - use ColorUtils.convertToAWTColor to compare background-colors
Modified:
branches/sandbox/rf-demo-ftest-iexplore/src/test/java/org/jboss/richfaces/integrationTest/style/StyleTestCase.java
===================================================================
---
branches/sandbox/rf-demo-ftest-iexplore/src/test/java/org/jboss/richfaces/integrationTest/style/StyleTestCase.java 2009-12-10
11:12:18 UTC (rev 16103)
+++
branches/sandbox/rf-demo-ftest-iexplore/src/test/java/org/jboss/richfaces/integrationTest/style/StyleTestCase.java 2009-12-10
11:23:56 UTC (rev 16104)
@@ -21,12 +21,14 @@
*******************************************************************************/
package org.jboss.richfaces.integrationTest.style;
+import java.awt.Color;
import java.util.LinkedHashMap;
import java.util.Map;
import static org.testng.Assert.*;
import org.jboss.richfaces.integrationTest.AbstractSeleniumRichfacesTestCase;
+import org.jboss.test.selenium.utils.ColorUtils;
import org.jboss.test.selenium.waiting.Wait;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -69,8 +71,10 @@
selenium.waitForPageToLoad(Long.toString(Wait.DEFAULT_TIMEOUT));
scrollIntoView(LOC_FIELDSET_HEADER, true);
- assertEquals(msgColor, getStyle(LOC_PANEL, "background-color"), format(
- "background-color for '{0}' skin does not match",
selenium.getText(locLink)));
+ Color expected = ColorUtils.convertToAWTColor(msgColor);
+ Color actual = ColorUtils.convertToAWTColor(getStyle(LOC_PANEL,
"background-color"));
+ assertEquals(actual, expected, format("background-color for '{0}' skin
does not match", selenium
+ .getText(locLink)));
}
}