While I originally planned to rather remove all the entity-specific tests and to replace them with tests based on mollom_test.module, recent manual testing and debugging revealed that all of the supported core forms come with their own special requirements. Basically, when considering all of the supported core forms as package, then one could say that they mimic all of the supported scenarios:

* User forms: CAPTCHA-only + Fallback behavior

* Contact forms: Mail integration, reporting of sessions without real entity mapping

* Comment form: Textual analysis without fields, but post mapping of static form elements

* Node form: Textual analysis with fieldable forms and post mapping of fields

For D6, we only use mollom_test to test forms with nested form elements (and proper mapping of those fields) as well as the to-be-done automated post_id mapping (and mollom session saving).

Thus, to complete the test suite, we should extend MollomReportTestCase with tests for protecting and reporting a single node but also mass-operations (mostly identical to comment reporting tests).

Comments

sun’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Component: Code » Tests
dave reid’s picture

Assigned: Unassigned » dave reid
sun’s picture

This test should also verify node's field UI and configuring a custom weight. (#826832: mollom_field_extra_fields() only works for nodes, needlessly loads $mollom_forms)

sun’s picture

Assigned: dave reid » Unassigned

Ensure that mollom_test module is enabled for this test, to verify whether a bogus/non-existing field entity+bundle registered via mollom_field_extra_fields() triggers any errors.

P.S.: Doesn't look like you're working on this, Dave ;)

sun’s picture

We should've done this earlier... #1117298-11: Verify that comments can be updated

sun’s picture

Title: Tests for node form » Node module integration tests
Category: task » bug
Status: Active » Needs review
StatusFileSize
new3.03 KB
new1.8 KB

Attached patch adds a new Node module integration test case. And additionally, fixes the kinda major bug of not storing any Mollom session data for newly created nodes.

sun’s picture

Status: Needs review » Reviewed & tested by the community
dries’s picture

Yuck. Can we create a core issue for this? I'd include the issue number in the @TODO in this patch.

sun’s picture

sun’s picture

Version: 7.x-1.x-dev » 6.x-1.x-dev

Committed to master. Actually, this patch should apply to 6.x-1.x, too...

sun’s picture

#9: mollom.node-data.9.patch queued for re-testing.

Status: Reviewed & tested by the community » Needs work

The last submitted patch, mollom.node-data.9.patch, failed testing.

sun’s picture

Status: Needs work » Needs review
StatusFileSize
new3.27 KB

mmm, some differences in D6.

sun’s picture

Status: Needs review » Fixed

Committed to 6.x-1.x.

sun’s picture

Status: Fixed » Needs review
StatusFileSize
new1.26 KB

I've enhanced the Node integration test case to specifically test the reported bug of the support ticket.

While proper saving of Mollom data is closely related, it's not 100% identical. The added test verifies that a node containing profanity is actually retained as unpublished.

Tests are passing for me; should be part of the upcoming release.

sun’s picture

Status: Needs review » Reviewed & tested by the community
sun’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for reporting, reviewing, and testing! Committed to all branches.

A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.

Status: Fixed » Closed (fixed)

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

  • Commit 3e9b5e7 on master, fai6, 8.x-2.x, fbajs, actions by sun:
    Issue #674692 by sun: Fixed Node module integration.
    
    
  • Commit 51aec93 on master, fai6, 8.x-2.x, fbajs, actions by sun:
    Issue #674692 by sun: Added test for retaining nodes containing...

  • Commit 3e9b5e7 on master, fai6, 8.x-2.x, fbajs, actions by sun:
    Issue #674692 by sun: Fixed Node module integration.
    
    
  • Commit 51aec93 on master, fai6, 8.x-2.x, fbajs, actions by sun:
    Issue #674692 by sun: Added test for retaining nodes containing...