Fixing tests that use email submission #356

Closed
wants to merge 5 commits into
from

Projects

None yet

1 participant

@halkyon
Member
halkyon commented Apr 20, 2012

submitForm() used through simpletest doesn't understand HTML5 inputs like <input type="email" ...> and results in test failures, as we recently changed EmailField to use type "email" instead of "text".

I've fixed these tests by using post() instead, removing the need to use simpletest in these cases.

Since we only use submitForm() in a handful of locations, we could probably replace these with post() too and remove the need to use simpletest. Opened a new ticket here: http://open.silverstripe.org/ticket/7185

EDIT: Updated this pull request to remove simpletest, and replace all uses of submitForm() with post()

halkyon added some commits Apr 19, 2012
@halkyon halkyon ENHANCEMENT GridFieldExportButton allows an anon function to return the
value of a related object. Useful for handling has_many/many_many data
in a single CSV column.
234cf85
@halkyon halkyon Fixing tests b729756
@halkyon halkyon MINOR Using post() for FormTest::testDisableSecurityTokenAcceptsSubmi…
…ssionWithoutToken()
fed9a20
@halkyon halkyon API CHANGE Removing simpletest, and removing submitForm() from
FunctionalTest. Please use post() directly, instead.

MINOR Fixing tests to use post() instead of submitForm()
485e2ea
@halkyon halkyon MINOR Re-adding submitForm, but removing reliance on simpletest ea2db27
@halkyon halkyon closed this Apr 20, 2012
@halkyon
Member
halkyon commented Apr 20, 2012

I need to fix this up properly, closing pull request for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment