Index: lams_tool_assessment/test/java/org/lamsfoundation/lams/tool/assessment/selenium/TestAssessment.java =================================================================== diff -u -r202c85695972dc0f230095e3b9cf8c7b18f08911 -r5f3c17d15a4d4d5b5daeec8841adb3bb752905c7 --- lams_tool_assessment/test/java/org/lamsfoundation/lams/tool/assessment/selenium/TestAssessment.java (.../TestAssessment.java) (revision 202c85695972dc0f230095e3b9cf8c7b18f08911) +++ lams_tool_assessment/test/java/org/lamsfoundation/lams/tool/assessment/selenium/TestAssessment.java (.../TestAssessment.java) (revision 5f3c17d15a4d4d5b5daeec8841adb3bb752905c7) @@ -114,7 +114,6 @@ selenium.type("optionFeedback2__lamstextarea", "Tt could be so, on Mars"); selenium.click("link=Add Multiple Choice"); - // TODO may be get rid of this thing selenium.selectWindow("openToolId"); waitForElementPresent("link=Save"); } @@ -149,7 +148,7 @@ public void testLearning() throws InterruptedException { setUpLearning(); - // assertEquals("Assessment Learning", selenium.getTitle()); + assertEquals("Assessment Learning", selenium.getTitle()); assertTrue(selenium.isTextPresent("Only for clever")); verifyFalse(selenium.isTextPresent("Started on")); verifyTrue(selenium.isElementPresent("question0")); @@ -168,19 +167,19 @@ verifyTrue(selenium.isTextPresent("You're ready to become a cook if you know this")); selenium.click("link=Next Activity"); - selenium.waitForPageToLoad("30000"); + waitForLearning(); assertTrue(selenium.isTextPresent("Congratulations, you have finished.")); verifyFalse(selenium.isElementPresent("Only for clever")); tearDownLearning(); setUpLearning(); assertTrue(selenium.isTextPresent("Congratulations, you have finished.")); assertFalse(selenium.isTextPresent("Only for clever")); - tearDownLearning(); } public void testMonitoring() throws InterruptedException { setUpMonitoring(); + selenium.setSpeed("600"); assertTrue(selenium.isTextPresent("Assessment Tool")); verifyTrue(selenium.isTextPresent("Summary")); @@ -225,8 +224,6 @@ selenium.click("link=Ok"); selenium.selectWindow("monitorId"); waitForElementPresent("link=Export summary"); - - tearDownMonitoring(); } } Index: lams_tool_forum/test/java/org/lamsfoundation/lams/tool/forum/selenium/TestForum.java =================================================================== diff -u -r202c85695972dc0f230095e3b9cf8c7b18f08911 -r5f3c17d15a4d4d5b5daeec8841adb3bb752905c7 --- lams_tool_forum/test/java/org/lamsfoundation/lams/tool/forum/selenium/TestForum.java (.../TestForum.java) (revision 202c85695972dc0f230095e3b9cf8c7b18f08911) +++ lams_tool_forum/test/java/org/lamsfoundation/lams/tool/forum/selenium/TestForum.java (.../TestForum.java) (revision 5f3c17d15a4d4d5b5daeec8841adb3bb752905c7) @@ -142,8 +142,6 @@ // Testing creating a topic testCreateTopicLearner(TOPIC4_TITLE, TOPIC4_MESSAGE); - - tearDownLearning(); } catch (Exception e) { Log.error(e); fail(e.getMessage()); @@ -159,9 +157,6 @@ // TODO: Work out how to access the forum page, which is opened in a _blank page - selenium.close(); - selenium.selectWindow(null); - tearDownMonitoring(); } catch (Exception e) { fail(e.getMessage()); } Index: lams_tool_notebook/test/java/org/lamsfoundation/lams/tool/notebook/selenium/TestNotebook.java =================================================================== diff -u -r202c85695972dc0f230095e3b9cf8c7b18f08911 -r5f3c17d15a4d4d5b5daeec8841adb3bb752905c7 --- lams_tool_notebook/test/java/org/lamsfoundation/lams/tool/notebook/selenium/TestNotebook.java (.../TestNotebook.java) (revision 202c85695972dc0f230095e3b9cf8c7b18f08911) +++ lams_tool_notebook/test/java/org/lamsfoundation/lams/tool/notebook/selenium/TestNotebook.java (.../TestNotebook.java) (revision 5f3c17d15a4d4d5b5daeec8841adb3bb752905c7) @@ -24,11 +24,6 @@ package org.lamsfoundation.lams.tool.notebook.selenium; -import java.lang.reflect.InvocationTargetException; -import java.util.Map; - -import junit.framework.Test; -import junit.framework.TestCase; import junit.framework.TestSuite; import org.lamsfoundation.lams.selenium.AbstractSeleniumTestCase; @@ -72,27 +67,25 @@ public void testLearning() throws Exception { setUpLearning(); - // assertEquals("Notebook", selenium.getTitle()); + assertEquals("Notebook", selenium.getTitle()); assertEquals("LAMS Learner", selenium.isElementPresent("//a[@id='finishButton']")); selenium.type("entryText", "have fun"); selenium.click("//a[@id='finishButton']/span"); - selenium.waitForPageToLoad("30000"); - // assertTrue(selenium.isTextPresent("Congratulations")); + waitForLearning(); + + assertTrue(selenium.isTextPresent("Congratulations")); assertFalse(selenium.isElementPresent("entryText")); tearDownLearning(); setUpLearning(); - // assertTrue(selenium.isTextPresent("Congratulations")); + assertTrue(selenium.isTextPresent("Congratulations")); assertFalse(selenium.isElementPresent("entryText")); - tearDownLearning(); } public void testMonitoring() { setUpMonitoring(); assertEquals("Notebook", selenium.getTitle()); - - tearDownMonitoring(); } } Index: lams_tool_wiki/test/java/org/lamsfoundation/lams/tool/wiki/selenium/TestWiki.java =================================================================== diff -u -r202c85695972dc0f230095e3b9cf8c7b18f08911 -r5f3c17d15a4d4d5b5daeec8841adb3bb752905c7 --- lams_tool_wiki/test/java/org/lamsfoundation/lams/tool/wiki/selenium/TestWiki.java (.../TestWiki.java) (revision 202c85695972dc0f230095e3b9cf8c7b18f08911) +++ lams_tool_wiki/test/java/org/lamsfoundation/lams/tool/wiki/selenium/TestWiki.java (.../TestWiki.java) (revision 5f3c17d15a4d4d5b5daeec8841adb3bb752905c7) @@ -99,6 +99,7 @@ storeLearningDesign(); } catch (Exception e) { + e.fillInStackTrace(); fail(e.getMessage()); } @@ -111,6 +112,7 @@ try { createNewLesson(); } catch (Exception e) { + e.fillInStackTrace(); fail(e.getMessage()); } } @@ -149,9 +151,8 @@ // Removing the wiki page so it can be made again in the next test testRemove(WIKI_TITLE3, true); - - tearDownLearning(); } catch (Exception e) { + e.fillInStackTrace(); fail(e.getMessage()); } } @@ -187,11 +188,8 @@ // Removing a page testRemove(WIKI_TITLE4, true); - - selenium.close(); - selenium.selectWindow(null); - tearDownMonitoring(); } catch (Exception e) { + e.fillInStackTrace(); fail(e.getMessage()); } }