We need to test the functionality of Drupal's filter tips. This issue focuses on the "short" filter tips - the ones that appear in an unordered list on the node/add page.

Suggested assertions:
- Create a filter with all of the core filters enabled, make sure the proper tips show up on the node/add page.
- Create several filters, and make sure each has its proper tips show up on the node/add page.
- Make sure the link to the longer tips shows up on the node/add page.

Comments

neurovation.kiwi’s picture

hi folks,

we just are onto it - expect a patch in the next days ;)

neurovation.kiwi’s picture

Status: Active » Needs review
StatusFileSize
new3.8 KB

hi folks,

so here i got some test that does what is described above.

and i found a bug as well - "Correct broken HTML" does not have a help tip.

will file a bug report as well.

neurovation.kiwi’s picture

StatusFileSize
new3.54 KB

well, ok - just found out i was a little bit too rigid.

so here is now a complete patch for the test class, which ignores missing help texts.

cu

catch’s picture

Status: Needs review » Needs work

Test runs fine and passes but there's a few code style issues - tabs instead of spaces, munging together of variable names (should be $foo_bar), and code comments should read as full sentences.

lilou’s picture

Component: tests » filter.module
Status: Needs work » Needs review
StatusFileSize
new3.57 KB

Few code style corrections.

lilou’s picture

StatusFileSize
new3.57 KB

Status: Needs review » Needs work

The last submitted patch failed testing.

lilou’s picture

StatusFileSize
new3.72 KB

Re-roll.

Fail :

        $this->assertEqual(htmlentities((string)$fields[0]->ul->li[$filter->delta - $missingHelpCount]), $tips[$filter->delta], t('Filter help text match !filter', array('!filter' => $filter->name)));
lilou’s picture

Status: Needs work » Needs review
lilou’s picture

StatusFileSize
new125.88 KB

Only local images are allowed.

Status: Needs review » Needs work

The last submitted patch failed testing.

lilou’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch failed testing.

catch’s picture

Category: bug » task
Priority: Critical » Normal

Moving this out of the critical bugs queue - see #607038: Meta issue: fix gaps in code coverage.

sun’s picture

Version: 7.x-dev » 8.x-dev
wim leers’s picture

Issue summary: View changes
Status: Needs work » Closed (won't fix)

Filter module's test coverage has been expanded quite a bit since 2010, but does not yet include this. However, filter tips have become less important now that Drupal 8 has a WYSIWYG editor, which has allowed us to *hide* the filter tips whenever a text editor is enabled.

So not only was this already pretty trivial code, it now also is less visible, less important.

As soon as a regression occurs in this area, we'll probably want to add test coverage, but for now, we probably don't want to bother with it. Closing.