There are 3 remaining reasons for test failures of the existing Webform tests in HEAD:

1) Checkboxes don't work when #options has '0' as a key.
2) The tests assume that webform nodes have a body field, but don't ensure it.
3) D7 HEAD recently changed the filter_format table to use machine name instead of numeric ids.

#1 is fixed by a core patch: #654796-89: Identify fix bugs with checkbox element
#2 and #3 are fixed by the attached patch.

Test failures without either patch: 46 fails, 21 exceptions
Test failures with only the core patch: 6 fails, 0 exceptions
Test failures with the core patch and the attached webform patch: 0 fails, 0 exceptions (yay!)

Comments

quicksketch’s picture

Status: Needs review » Needs work

Thanks effulgentsia. I don't understand why "confirmation_format" would need to be a varchar, isn't the column its referencing still an integer in Drupal 7? Regarding the body field, the proper fix would be to add the body field as part of hook_install(), since the body field is missing entirely on Drupal 7, not just in the tests.

effulgentsia’s picture

Assigned: Unassigned » effulgentsia
I don't understand why "confirmation_format" would need to be a varchar, isn't the column its referencing still an integer in Drupal 7?

Not as of Oct. 19: #934050-55: Change format into string. Note, that issue has had a lot of follow-ups since then, but that was the original change from int to machine_name to better support exportables.

Regarding the body field, the proper fix would be to add the body field as part of hook_install(), since the body field is missing entirely on Drupal 7, not just in the tests.

Ok, on it.

effulgentsia’s picture

Assigned: Unassigned » effulgentsia
StatusFileSize
new1.62 KB

This adds the body field in hook_install() only. I don't know if it makes sense to add it in an update function. Does a D6 to D7 core update handle this automatically for contrib node types (along with ensuring the data is moved from the body column to the body field)?

effulgentsia’s picture

Assigned: effulgentsia » Unassigned
Status: Needs work » Needs review

Oh, and BTW, the core patch referenced in the OD is in D7 HEAD now.

quicksketch’s picture

Assigned: effulgentsia » Unassigned

/me grumbles about API changes

David_Rothstein’s picture

Title: Fix confirmation format, node body field, and get remaining tests to pass » Fix node body field and get some of the remaining tests to pass
StatusFileSize
new523 bytes

The database updates for the confirmation format in the above patch actually aren't entirely complete. I wrote a patch at #976102: Drupal 7 version of Webform not updated for text format changes to update Webform for a variety of D7 changes to text formats that should take care of it correctly, so it's probably best to do all the text format changes there, in a dedicated issue.

So, here is a reroll that just contains the node body field change.

quicksketch’s picture

Title: Fix node body field and get some of the remaining tests to pass » Add the default body field to new D7 Webform installations
Version: 7.x-3.x-dev » 7.x-3.6
Status: Needs review » Fixed

I've committed this patch finally. Thanks David.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.