Author: lfryc(a)redhat.com
Date: 2010-07-10 17:04:35 -0400 (Sat, 10 Jul 2010)
New Revision: 17895
Modified:
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/AbstractTestappTestCase.java
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/a4jLog/A4JLogTestCase.java
Log:
RFPL-466
* added one more check into tests
* method invalidateSession refactored
Modified:
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/AbstractTestappTestCase.java
===================================================================
---
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/AbstractTestappTestCase.java 2010-07-10
21:04:01 UTC (rev 17894)
+++
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/AbstractTestappTestCase.java 2010-07-10
21:04:35 UTC (rev 17895)
@@ -118,9 +118,7 @@
* Invalidates session by clicking on a button on tested page.
*/
public void invalidateSession() {
- JQueryLocator invalidateButton = new JQueryLocator("input[value=Invalidate
Session]");
- selenium.click(invalidateButton);
- selenium.waitForPageToLoad(TIMEOUT);
+ selenium.deleteAllVisibleCookies();
}
/**
Modified:
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/a4jLog/A4JLogTestCase.java
===================================================================
---
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/a4jLog/A4JLogTestCase.java 2010-07-10
21:04:01 UTC (rev 17894)
+++
root/tests/metamer/trunk/ftest/test-source/src/main/java/org/richfaces/tests/testapp/a4jLog/A4JLogTestCase.java 2010-07-10
21:04:35 UTC (rev 17895)
@@ -22,17 +22,14 @@
package org.richfaces.tests.testapp.a4jLog;
+import static org.jboss.test.selenium.locator.LocatorFactory.jq;
import static org.jboss.test.selenium.utils.URLUtils.buildUrl;
-import static org.jboss.test.selenium.locator.LocatorFactory.jq;
import static org.testng.Assert.assertEquals;
import static org.testng.Assert.assertFalse;
import static org.testng.Assert.assertTrue;
import java.net.URL;
-import org.jboss.test.selenium.dom.Event;
-import org.jboss.test.selenium.locator.Attribute;
-import org.jboss.test.selenium.locator.AttributeLocator;
import org.jboss.test.selenium.locator.ElementLocator;
import org.jboss.test.selenium.locator.JQueryLocator;
import org.richfaces.tests.testapp.AbstractTestappTestCase;
@@ -213,6 +210,9 @@
selenium.click(levelInput);
selenium.waitForPageToLoad(TIMEOUT);
}
+
+ String selectedLevel = selenium.getSelectedLabel(levelSelect);
+ assertEquals(selectedLevel, filterLevel.toString().toLowerCase(), "Log level
in select wasn't changed.");
selenium.typeKeys(input, logLevel.toString());
selenium.click(logButton);
@@ -224,7 +224,7 @@
if (count == 0) {
return;
}
-
+
String output = selenium.getText(msgType).replaceAll("\\[.*\\]:$",
"");
assertEquals(output, logLevel.toString().toLowerCase(), "Message type in
log.");
output = selenium.getText(msgContent);