Closed (outdated)
Project:
Drupal core
Version:
7.x-dev
Component:
profile.module
Priority:
Normal
Category:
Task
Assigned:
Issue tags:
Reporter:
Created:
2 Jun 2009 at 00:21 UTC
Updated:
3 Jan 2014 at 00:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
catchMoving this out of the critical bugs queue - see #607038: Meta issue: fix gaps in code coverage.
Comment #2
sreynen commentedI added tests for field visibility, required fields, and fields on registration form. Looks like someone else already did profile browsing. The only one left is "Test updating fields," which I didn't do because I'm not sure what should be tested on that beyond the existing updateProfileField(). Maybe that's already done and just wasn't removed from the list?
Comment #3
craigmc commentedRedacted
Comment #4
craigmc commentedComment #5
bleen commentedYou dont need "$content =" it can just be "$this->drupalGet..."
white space
I think we need to check through the other possible visibility settings (aren't there 3 or 4?)
Here are a few quick notes ... still looking at the patch in #2
Powered by Dreditor.
Comment #6
bleen commentedThis still needs to be done ... I think the intent here is to test that I can create a profile field called "favorite color" and then later on change the filed to be "Most Awesomest Color Ever"
Current tests only test that if an end-user changes favorite color from "red" to "blue" that it works
Powered by Dreditor.
Comment #7
craigmc commentedGoing through code comments, "updating field" test, and remaining visibility settings.
Comment #8
craigmc commentedAdded tests for all visibility permutations. Incorporated comments from #5.
#6 still needs to be implemented.
Comment #9
craigmc commentedMore time for sprint! adding Update field test case
Comment #10
craigmc commentedComment #11
bleen commentedcraigmc: when creating a patch you need to use -up (ex: cvs diff -up >path/to/file.patch)
Comment #13
craigmc commented@bleen18 Sadly my computer seems to be the one that can't hang with the Drupal 7 CVS distro. Will post the full file so you can do the diff yrself. Working on getting it sorted out.
Comment #14
bleen commentedthis is the patch that includes craigmc's changes ... I haven't looked through it yet,
Comment #15
bleen commentedstatus
Comment #17
craigmc commentedFYI-- the reason this patch is not passing testing is related to the issue I posted here http://drupal.org/node/774866
If a Field is set to Hidden, it does not appear on the user/uid page when viewed by an administrator, only on the user/uid/edit page. Currently, my test code tests for what I understand the functionality to mean, where the field is/should be viewable by an admin. Requires a refinement of the requirement and/or description before we can complete this.
BTW managed to address build issue so will be able to create grown-up patches. thx for the assist bleen18
Comment #18
bleen commentedI'm playing with these errors (and white space formatting issues)
Comment #19
bleen commentedOk ... this patch shows several errors and several warnings... I believe that the tests are correct, but that they are revealing a few problems. I need someone to confirm though:
Here is the warning that appears on /profile after a new field has been added:
"Strict warning: Creating default object from empty value in template_preprocess_profile_listing() (line 573 of /.../d7/modules/profile/profile.module)."
The error is a bit trickier... I'm not sure if its an error or if its expected behavior. When a new field is added to profiles, should that new field show up in the list when you go to /profile? If so then these errors are actual errors ... if not, then the tests need to change.
Anyone know?
For now I am making this critical since we are getting a PHP warning... once we figure this out, we can put it back to normal
Comment #20
sreynen commentedIf the test demonstrates an actual error, that error should be in a separate issue to keep issues focused. I'm pretty sure tests are never considered critical issues, so changing that priority.
Comment #21
bleen commentedI have created an issue and submitted patch at #776936: PHP Warning when viewing /profile after adding field... once that lands, we can keep going on these tests
Comment #22
gowriabhaya commentedCode sprint tag
Comment #23
bleen commentedreuploading the patch from #19 to see what testbot has to say