Download & Extend

TestingParty08: Main help page

Project:Drupal core
Version:7.x-dev
Component:help.module
Category:task
Priority:normal
Assigned:kscheirer
Status:closed (fixed)
Issue tags:Needs tests

Issue Summary

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>'
?>
text appears.
- Working links appear for all enabled modules that implement hook_help().

Comments

#1

partnered with bloo4u

This patch adds tests for css, help topics text, and links for modules implementing hook_help().

AttachmentSizeStatusTest resultOperations
help.test.patch2.37 KBIdleFailed: 7264 passes, 13 fails, 0 exceptionsView details

#2

Status:active» needs review

changing status

#3

Added full stops to a couple of code comments, ran tests, RTBC. No credit on commit please.

AttachmentSizeStatusTest resultOperations
help.test.patch2.37 KBIdleFailed: 7234 passes, 17 fails, 0 exceptionsView details

#4

Status:needs review» reviewed & tested by the community

#5

Status:reviewed & tested by the community» needs work

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

Status:needs work» needs review

OK, let me dig into it more tonight.

#9

Status:needs review» reviewed & tested by the community

patch applied cleanly and all tests passed.
174 passes, 0 fails, 0 exceptions

#10

Status:reviewed & tested by the community» needs review

#11

Status:needs review» reviewed & tested by the community

#12

Status:reviewed & tested by the community» needs work

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

Status:needs work» needs review

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) . '">')

AttachmentSizeStatusTest resultOperations
help.test_1.patch4.32 KBIdleFailed: Failed to install HEAD.View details

#14

This patch applies, the tests look good, and they all pass.

#15

Status:needs review» needs work

The last submitted patch failed testing.

#16

#17

Category:bug report» task
Status:needs review» needs work

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

Status:needs work» needs review

Re-rolled to remove the extra line mentioned in #17.

AttachmentSizeStatusTest resultOperations
help.test.patch4.43 KBIdleFailed: Failed to apply patch.View details

#19

Component:tests» help.module
Status:needs review» reviewed & tested by the community

Looks good now.

#20

Status:reviewed & tested by the community» needs work

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

Status:needs work» needs review

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

Status:needs review» needs work

The last submitted patch failed testing.

#24

Status:needs work» needs review

Shortened the long text assert to 1 line, and rerolled against HEAD to remove fuzz

AttachmentSizeStatusTest resultOperations
help_test_2.patch3.92 KBIgnored: Check issue status.NoneNone

#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.

AttachmentSizeStatusTest resultOperations
295982_help_test_3.patch4.4 KBIdleFailed: Failed to apply patch.View details

#27

Status:needs review» needs work

#28

Status:needs work» needs review

#29

Status:needs review» reviewed & tested by the community

That last one was a stillborn reroll. This is the right one; Marking RTBC.

AttachmentSizeStatusTest resultOperations
295982_help_test_4.patch4.42 KBIdleFailed: 10328 passes, 1 fail, 0 exceptionsView details

#30

Status:reviewed & tested by the community» needs work

The last submitted patch failed testing.

#31

Category:task» bug report
Status:needs work» reviewed & tested by the community
AttachmentSizeStatusTest resultOperations
295982_help_test_4.patch4.42 KBIdleFailed: 10550 passes, 1 fail, 0 exceptionsView details

#32

Status:reviewed & tested by the community» needs work

The last submitted patch failed testing.

#33

Status:needs work» reviewed & tested by the community

#34

Test slave glitch.

#35

Status:reviewed & tested by the community» needs work

The last submitted patch failed testing.

#36

Status:needs work» needs review

rerolled against HEAD

AttachmentSizeStatusTest resultOperations
295982_help_test_5.patch4.3 KBIdleFailed: 11866 passes, 1 fail, 0 exceptionsView details

#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

Status:needs review» needs work

The following coding style items need to be fixed in help_test.module:

  • Line 10: * Implementation of hook_help - you need to add parentheses and a period.
  • Lines 15, 17: in D7, string concatenation should be formatted with a space separating the operators (dot .) and the surrounding terms

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 need Implement hook_help().

#41

Status:needs work» needs review

thanks stella, all those changes incorporated.

AttachmentSizeStatusTest resultOperations
295982_help_test_6.patch4.34 KBIdleFailed: 11866 passes, 1 fail, 0 exceptionsView details

#42

Status:needs review» reviewed & tested by the community

Looks good.

#43

Status:reviewed & tested by the community» needs work

The last submitted patch failed testing.

#44

Status:needs work» needs review

Patch re-roll because #475596: [meta-issue] Fix the unholy abomination that is the welcome screen was committed.

AttachmentSizeStatusTest resultOperations
295982_help_test.patch5.7 KBIdleFailed: 11836 passes, 0 fails, 3 exceptionsView details

#45

Status:needs review» needs work

The last submitted patch failed testing.

#46

Status:needs work» needs review
AttachmentSizeStatusTest resultOperations
295982_help_test.patch3.05 KBIdleFailed: 11836 passes, 0 fails, 3 exceptionsView details

#47

Status:needs review» needs work

The last submitted patch failed testing.

#48

Status:needs work» needs review

rerolled against HEAD and incorporated the change stella noted from #475596: [meta-issue] Fix the unholy abomination that is the welcome screen

AttachmentSizeStatusTest resultOperations
295982_help_test_7.patch4.38 KBIdleFailed: Failed to apply patch.View details

#49

Status:needs review» reviewed & tested by the community

setting back to RTBC

#50

Status:reviewed & tested by the community» needs work

The last submitted patch failed testing.

#51

Assigned to:Anonymous» kscheirer
Status:needs work» needs review

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.

AttachmentSizeStatusTest resultOperations
295982_help_test_8.patch5.56 KBIdleFailed: Failed to apply patch.View details

#52

Status:needs review» needs work

The last submitted patch failed testing.

#53

Status:needs work» needs review

resetting for testbot

#54

Status:needs review» needs work

The last submitted patch failed testing.

#55

Status:needs work» needs review

rerolled to keep up with HEAD, someone review and rtbc please? :)

AttachmentSizeStatusTest resultOperations
295982_help_test_9.patch5.55 KBIdleFailed: Failed to apply patch.View details

#56

Status:needs review» needs work

Is this a stray comment?

// Loading these (and other?) modules will result in failures?

#57

Status:needs work» needs review

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

AttachmentSizeStatusTest resultOperations
295982_help_test_10.patch5.79 KBIdleFailed: Failed to apply patch.View details

#58

Status:needs review» reviewed & tested by the community

Still looks good! Somebody commit this puppy, quick

#59

Status:reviewed & tested by the community» needs work

The last submitted patch failed testing.

#60

Status:needs work» reviewed & tested by the community

bad trial run of new testing bot

#61

Status:reviewed & tested by the community» needs work

The last submitted patch failed testing.

#62

Status:needs work» needs review

Try this AutoBot one more time...

#63

Status:needs review» needs work

The last submitted patch failed testing.

#64

Status:needs work» needs review

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:

  • updated the page title html we're looking for
  • stop checking for breadcrumbs, since seven doesn't use them

#65

patch attached, doh.

AttachmentSizeStatusTest resultOperations
295982_help_test_11.patch3.92 KBIdleFailed: Failed to apply patch.View details

#66

Status:needs review» needs work

The last submitted patch failed testing.

#67

Status:needs work» needs review

hrm, rerolled against HEAD.

AttachmentSizeStatusTest resultOperations
295982_help_test_12.patch3.93 KBIdlePassed: 12026 passes, 0 fails, 0 exceptionsView details

#68

Category:bug report» task
Priority:critical» normal
Status:needs review» reviewed & tested by the community

This is nice cleanup, lots of commented out lines removed, saner test.

#69

Status:reviewed & tested by the community» fixed

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

Status:fixed» closed (fixed)

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