Author: vrockai
Date: 2009-01-29 12:10:50 -0500 (Thu, 29 Jan 2009)
New Revision: 12705
Modified:
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java
Log:
filling file content
Modified:
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java
===================================================================
---
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java 2009-01-29
16:59:21 UTC (rev 12704)
+++
branches/Enterprise_Portal_Platform_4_3/testsuite/ui-tests/src/org/jboss/portal/test/selenium/cms/CMSFileTestCase.java 2009-01-29
17:10:50 UTC (rev 12705)
@@ -16,6 +16,7 @@
private static final String TBL_CMS_FILEVER =
"//div[@id='center']/div/div/table";
public static final String TBL_CMS_FILE =
"//div[@id='center']/div/div/div[3]/table";
public static final String TBL_FILE_PENDING =
"//div[@id='center']/div/div/table[2]";
+ public static final String EDITOR_CONTENT = "mce_editor_0";
@BeforeMethod(groups = { "log" })
public void loginBeforeTest() {
@@ -110,6 +111,9 @@
selenium.type("description", "newFile description");
selenium.type("title", "newFile title");
selenium.select("language", "label=Czech");
+
+ fillInEditor(EDITOR_CONTENT,"now i'm not empty!");
+
selenium.click("save");
selenium.waitForPageToLoad(PAGE_LOAD);
/*
@@ -148,6 +152,9 @@
selenium.type("description", "file2edit description");
selenium.type("title", "file2edit title");
selenium.select("language", "label=Czech");
+
+ fillInEditor(EDITOR_CONTENT,"edit me, please!");
+
selenium.click("save");
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -190,6 +197,9 @@
selenium.type("description", "existingFile description");
selenium.type("title", "existingFile title");
selenium.select("language", "label=Czech");
+
+ fillInEditor(EDITOR_CONTENT,"i already exist!");
+
selenium.click("save");
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertEquals("Czech", selenium.getText("link=Czech"));
@@ -217,6 +227,9 @@
selenium.type("description", "fileToMove description");
selenium.type("title", "fileToMove title");
selenium.select("language", "label=Czech");
+
+ fillInEditor(EDITOR_CONTENT,"move on!");
+
selenium.click("save");
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertEquals("Czech", selenium.getText("link=Czech"));
@@ -261,6 +274,9 @@
selenium.type("description", "file2copy description");
selenium.type("title", "file2copy title");
selenium.select("language", "label=Czech");
+
+ fillInEditor(EDITOR_CONTENT,"want to be a copy?");
+
selenium.click("save");
selenium.waitForPageToLoad(PAGE_LOAD);
@@ -351,6 +367,9 @@
selenium.type("description", name + " description");
selenium.type("title", "existingFile title");
selenium.select("language", "label=Czech");
+
+ fillInEditor(EDITOR_CONTENT,"contemporary content");
+
selenium.click("save");
selenium.waitForPageToLoad(PAGE_LOAD);
Assert.assertEquals("Czech", selenium.getText("link=Czech"));
@@ -383,4 +402,8 @@
selenium.waitForPageToLoad(PAGE_LOAD);
logout();login("admin","admin");
}
+
+ private void fillInEditor(String locator, String content){
+ selenium.getEval("selenium.fillInEditor(\"" + locator +
"\",\"" + content + "\")");
+ }
}