Updated: Comment #N

Problem/Motivation

As identified in #2179081: [meta] Inventory search.module tests. File issues to address test holes., there is not really very good testing of the User search functionality provided by the Core Search/User modules.

Proposed resolution

We need to add tests for the following:

a) Permissions: Verify that users with/without search content/access user profiles permissions can/cannot search users via substrings on user account names, via any configured UserSearch pages via the UI. Verify that users with/without administer users permissions can/cannot search users via email address substrings.

b) Basic functionality: Verify that keyword searching for user account names works via the UI, and that a non-matching query gives an appropriate message.

c) Admin functionality: Verify that keyword searching for user account email addresses works via the UI, and that a non-matching query gives an appropriate message.

Some, but not all, of this is tested in the existing UserSearchTest class under the User module. It just needs to be expanded to make sure all the items are covered.

Remaining tasks

a) Write tests [done, patch is attached]

b) Review patch [Good Novice project? -- see https://drupal.org/contributor-tasks/review ]

User interface changes

None.

API changes

None.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

jhodgdon’s picture

Issue summary: View changes

Updated issue summary (had missed a class in my previous inventory of tests).

jhodgdon’s picture

Status: Active » Needs review
Issue tags: +Quick fix
FileSize
5.19 KB

Here we go. I think this test is now pretty comprehensive. This is a test-only patch, so it should be pretty easy to review, I hope?

jhodgdon’s picture

3: 2183963-new-tests.patch queued for re-testing.

jhodgdon’s picture

Issue summary: View changes
Issue tags: +Novice

Decided this was a good Novice project, and updated summary.

jhodgdon’s picture

3: 2183963-new-tests.patch queued for re-testing.

Status: Needs review » Needs work

The last submitted patch, 3: 2183963-new-tests.patch, failed testing.

jhodgdon’s picture

Status: Needs work » Needs review
FileSize
4.34 KB

Here's a reroll.

webchick’s picture

Status: Needs review » Fixed

These tests look great, nice to see the coverage expanded here.

Committed and pushed to 8.x. Thanks!

  • Commit 2460507 on 8.x by webchick:
    Issue #2183963 by jhodgdon: Add tests for User search.
    

Status: Fixed » Closed (fixed)

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