TestingParty08: Main help page
cwgordon7 - August 16, 2008 - 02:18
| Project: | Drupal |
| Version: | 7.x-dev |
| Component: | help.module |
| Category: | task |
| Priority: | normal |
| Assigned: | kscheirer |
| Status: | closed |
| Issue tags: | Needs tests |
Description
We need to test the main administration help page (admin/help) to make sure it works properly.
Suggested assertions:
- CSS is added.
-
<?php
'<h2>' . t('Help topics') . '</h2><p>' . t('Help is available on the following items:') . '</p>'
?>- Working links appear for all enabled modules that implement hook_help().

#1
partnered with bloo4u
This patch adds tests for css, help topics text, and links for modules implementing hook_help().
#2
changing status
#3
Added full stops to a couple of code comments, ran tests, RTBC. No credit on commit please.
#4
#5
Hm. This causes a bunch of failures for me:
Link properly added to Block (admin/help/block) Other help.test 55 HelpTestCase->testHelp()Link properly added to Blog (admin/help/blog) Other help.test 55 HelpTestCase->testHelp()
Link properly added to Color (admin/help/color) Other help.test 55 HelpTestCase->testHelp()
Link properly added to Comment (admin/help/comment) Other help.test 55 HelpTestCase->testHelp()
Link properly added to Database logging (admin/help/dblog) Other help.test 55 HelpTestCase->testHelp()
Link properly added to Filter (admin/help/filter) Other help.test 55 HelpTestCase->testHelp()
Link properly added to Help (admin/help/help) Other help.test 55 HelpTestCase->testHelp()
Link properly added to Menu (admin/help/menu) Other help.test 55 HelpTestCase->testHelp()
Link properly added to Node (admin/help/node) Other help.test 55 HelpTestCase->testHelp()
Link properly added to Poll (admin/help/poll) Other help.test 55 HelpTestCase->testHelp()
Link properly added to System (admin/help/system) Other help.test 55 HelpTestCase->testHelp()
Link properly added to Taxonomy (admin/help/taxonomy) Other help.test 55 HelpTestCase->testHelp()
Link properly added to User (admin/help/user) Other help.test 55 HelpTestCase->testHelp()
#6
Hmm, weird. I applied this again and it didn't fail for me.
#7
I also re-applied the patch and the tests are passing.
#8
OK, let me dig into it more tonight.
#9
patch applied cleanly and all tests passed.
174 passes, 0 fails, 0 exceptions
#10
#11
#12
good mystery! This patch worked great on my test server, and failed with the same errors webchick saw on my neighbor's server. Good thing we were at the BADCamp testing party and able to check things out pretty quick.
this patch is testing for
<a href="/admin/help/$module">links, but depending on your server settings, the links might not come out like this.checking against something like
<a href="'.url('admin/help/' . $module) . '">allows the tests to pass on our setups.flobruit and chx also mentioned that having a help_test module that just enables hook_help might be more appropriate to test that help links appear, and actually clicking the link and getting a positive response would be more specific.
I will try to post a new patch soon, unless someone beats me to it :)
#13
rolled a new patch.
changes:
added a help_test module that just enables hook_help
added a test for the intro text on admin/help, according to http://acquia.com/files/test-results/modules_help_help.module.html this was the only untested code in the help module.
changed the tests that were failing to assertLink()s. Not sure if thats considered preferential to
assertRaw('<a href="'.url('admin/help/' . $module) . '">')#14
This patch applies, the tests look good, and they all pass.
#15
The last submitted patch failed testing.
#16
See: #335122: Test clean HEAD after every commit and http://pastebin.ca/1258476
#17
Test looks good, there's an extra empty line after the long assertion though which needs removing - should be a very quick re-roll.
#18
Re-rolled to remove the extra line mentioned in #17.
#19
Looks good now.
#20
Mmm, the text in the asserts can be made shorter. We don't need to assert on the entire 3 line paragraph.
I'm not sure we need the test module. We can use any of the core modules do perform the same test.
There is some code commented out in an odd way.
#21
Yeah that all makes sense. Except the oddly commented code is actually being removed by the patch rather than put in, I had to double check that a few times.
#22
I think we do need the test module. We are testing the functionality of hook_help(), we aren't testing whether poll or some other core module implements it correctly. The assert could check against shorter text though.
#23
The last submitted patch failed testing.
#24
Shortened the long text assert to 1 line, and rerolled against HEAD to remove fuzz
#25
testbot not updating, but patch passed all tests
http://testing.drupal.org/pifr/file/1/help.test_2.patch
(here's the issue for testbot not updating : http://drupal.org/node/372947)
#26
I caught a typo in the test's description, and also tried to change the help.css test to xpath for actual verification that the HTML was, in, fact, there. That didn't work so good, so I left it alone. All looks good.
#27
#28
#29
That last one was a stillborn reroll. This is the right one; Marking RTBC.
#30
The last submitted patch failed testing.
#31
#32
The last submitted patch failed testing.
#33
#34
Test slave glitch.
#35
The last submitted patch failed testing.
#36
rerolled against HEAD
#37
I don't quite understand the significance of the test module - why can't we just test existing core modules? What does the test module add to the test?
#38
I think my comments from #22 still apply - we want to test the functionality of hook_help(), not whether a particular module like poll or blog implements it. But if the consensus is that we don't need it, I'm fine with removing it.
#39
The following coding style items need to be fixed in help_test.module:
* Implementation of hook_help- you need to add parentheses and a period.There's also some trailing spaces and indentation issues in help.test.
#40
Actually #472642: Remove "implementation of" nominalizations from Docblocks just got committed, so instead of
Implementation of hook_help().you needImplement hook_help().#41
thanks stella, all those changes incorporated.
#42
Looks good.
#43
The last submitted patch failed testing.
#44
Patch re-roll because #475596: [meta-issue] Fix the unholy abomination that is the welcome screen was committed.
#45
The last submitted patch failed testing.
#46
#47
The last submitted patch failed testing.
#48
rerolled against HEAD and incorporated the change stella noted from #475596: [meta-issue] Fix the unholy abomination that is the welcome screen
#49
setting back to RTBC
#50
The last submitted patch failed testing.
#51
keeping up with HEAD and #372743: Body and teaser as fields, which accidentally added a duplicate assertion. Trimmed the list of modules we test to only include ones that actually implement hook_help() - some of the new Fields modules (list, number) don't bother. I think it's fine, since their parent field.module has help.
#52
The last submitted patch failed testing.
#53
resetting for testbot
#54
The last submitted patch failed testing.
#55
rerolled to keep up with HEAD, someone review and rtbc please? :)
#56
Is this a stray comment?
// Loading these (and other?) modules will result in failures?#57
yeah, that and
// 'administer blocks', 'administer site configuration',a few lines below.attached patch also removes those, and adds the required newline at the end of help.test
#58
Still looks good! Somebody commit this puppy, quick
#59
The last submitted patch failed testing.
#60
bad trial run of new testing bot
#61
The last submitted patch failed testing.
#62
Try this AutoBot one more time...
#63
The last submitted patch failed testing.
#64
Rerolled against HEAD with a few changes.
I got rid of the help_test.module, since no one seems to like it. I still think it's a little silly to require poll and blog module's help, but it works. No other barriers to getting committed have been posted to this issue.
D7 now uses the seven theme so:
#65
patch attached, doh.
#66
The last submitted patch failed testing.
#67
hrm, rerolled against HEAD.
#68
This is nice cleanup, lots of commented out lines removed, saner test.
#69
Cool. I always get a little nervous about these assertions that are so tied to our user interface text, but OTOH, this new code is light-years beyond the code that's there now.
Committed to HEAD! Great work! :)
#70
Automatically closed -- issue fixed for 2 weeks with no activity.