------------------------8<------------------------
java.lang.AssertionError: expected:<ChangeStatusPreview> but
was:<ChangeStatus>
at org.testng.Assert.fail(Assert.java:84)
at org.testng.Assert.failNotEquals(Assert.java:438)
at org.testng.Assert.assertEquals(Assert.java:108)
at org.testng.Assert.assertEquals(Assert.java:129)
at org.testng.Assert.assertEquals(Assert.java:139)
at
org.mifos.test.acceptance.framework.AbstractPage.verifyPage(AbstractPage.java:65)
at
org.mifos.test.acceptance.framework.loan.EditAccountStatusConfirmationPage.verifyPage(EditAccountStatusConfirmationPage.java:35)
at
org.mifos.test.acceptance.framework.testhelpers.LoanTestHelper.changeLoanAccountStatus(LoanTestHelper.java:93)
at
org.mifos.test.acceptance.loan.ClientLoanStatusChangeTest.pendingApprovalToApplicationRejected(ClientLoanStatusChangeTest.java:95)
------------------------>8------------------------
When I debugged the test, I saw the part that was failing was
selenium.fireEvent("name=newStatusId value=10", "click");
in
EditLoanAccountStatusPage#submitAndNavigateToEditStatusConfirmationPage().
It just plain wasn't firing the event to toggle the dropdown on.
This was in Firefox 2 (for some reason Selenium RC can't fire off
Firefox 3). When I tried
fireEvent | name=newStatusId value=10 | click
in the Selenium IDE in Firefox 3, it worked.
Yet, Hudson uses Firefox 2, and this test passes on Hudson.
Moving to Firefox 3 solved my issues, but I couldn't use the default
selenium.browser.start.command (*firefox). For some reason, the
acceptance tests would just hang while "Preparing Firefox profile..."
So I changed it to
selenium.browser.start.command=*custom firefox -P sel -no-remote
Following the guide here:
http://mzhaqs.blogspot.com/2009/06/selenium-tests-with-firefox-on-ubuntu.html
Also, on about:config I changed browser.sessionstore.enabled to false to
stop some annoyances, and made sure the selenium profile allowed
proxying for localhost.
It was almost /too/ easy. :-P
Now all tests pass ("acceptanceTests", "application", etc.) and the
build takes around 45 minutes on my laptop. Yep, 45 minutes.