IRC log of #schooltool for Friday, 2011-05-13

fsufitchaelkner: ping00:14
fsufitchtestbrowser is not behaving correctly. when the "Add" button is clicked on the courseinfo form, the form is not submitted00:15
fsufitchi've looked at examples elsewhere in schooltool, and my code reflects exactly how it's done there, so i don't get it00:15
fsufitchif i try to do it using manager.serve(), it works00:15
aelknerthe diff?00:16
fsufitchbasically the only difference is adding a check that the form actually works00:19
*** menesis has quit IRC00:20
aelknerthe only thing i can think of off-hand is if there were more than one Add button somehow00:22
aelknerfsufitch, go ahead and push so i can test it out00:22
aelkneryou got errors00:28
fsufitchthe problem *is* the broken test :)00:28
aelknerremember i was saing you should printQuery on the errors div?00:28
aelknerthat would maek it easier to see what's up without even needing serve()00:29
aelknerand wondering why the difference00:29
aelkneri know i've gone down that road before, scratching my head00:29
fsufitchwait, there's errors?00:30
aelknerbut now i know that it's always safe to test the form and see what browser thinks it is00:30
fsufitchi used serve() and all i got was an empty form00:30
aelkneryou'd know if you tested for them00:30
fsufitchhmm, oops00:30
aelkneryeah, you see, serve() doesn't remember what you typed in00:30
fsufitchi see00:30
aelknerin other words, it doesn't pass form data, just the url00:31
aelknerwhich leads to the blank form00:31
aelkneryeah, this is why i started relying on printQuery00:31
aelknerplus, you get test writing accomplished at the same time as debugging :)00:31
fsufitchi see00:32
fsufitchokay :)00:32
*** menesis has joined #schooltool00:35
fsufitchaelkner: i'm very hungry, i'm going to grab a bite and finish this when i return00:38
aelknerfsufitch, ok, i'll be around00:42
*** issyl0 has quit IRC01:40
*** issyl0 has joined #schooltool01:45
*** alga has quit IRC02:45
*** th1a has quit IRC02:52
*** replaceafill has quit IRC02:57
fsufitchaelkner: ping03:01
fsufitchforgot to say, but i did return a while ago03:02
fsufitchi made the regular test for adding work, and im now doing the error tests03:02
aelknerfsufitch, got it03:21
fsufitchi had to work around a problem with xpath concerning the "class" attribute03:24
fsufitchsince class can have multiple values, you can't just do [@class='foo']03:24
aelkneryeah, that's a drag03:27
aelknerah, i found the solution03:28
fsufitchyeah i got it03:28
aelkneri think03:28
aelkner/div[contains(@class, 'info-block') and not(contains(@class, 'person-groups'))]03:29
aelkner/div, that is03:29
aelknerthat helps?03:30
fsufitchi had already figured it out :)03:31
fsufitchcurrently im just trying to figure out what is the best way to test these error messages03:31
fsufitchthey're in a "<li> Field name: <div> error text </div> </li>" format03:32
fsufitchi don't get the field names then03:32
fsufitchso i just get a bunch of "Required input is missing." withouth knowing what it was referring to03:33
aelknerwhy no ...//li/text()?03:33
fsufitchbecause then i jsut get the field names, and not the errors03:33
fsufitchit's weird.03:33
aelknerthat makes sense03:34
aelknerwhat you need is both the text and the children03:34
fsufitchso ../li/*/text()?03:34
aelknertry ...//li/*03:35
aelkner has a good guide for xpath03:36
fsufitchaugh! M word!03:36
aelkneri know, bite my tongue using the M word, but it's a really good page :)03:36
fsufitchhmm, nope, li/* only gives the children (the errors), not the li elements themselves03:37
fsufitchmaybe li/text() || li/div/text()03:38
fsufitchalso, when there are <BLANKLINE>s in the printed value, my tests don't have to reflect them, right?03:39
fsufitchas in, i don't have to have a bunch of blank lines in my README.txt03:40
aelknerthat's right, don't worry about them03:40
aelkneri don't know about using || for the two expressions, but they are the right ones03:40
aelkneryou could do one, then the other, it wouldn't be a crime03:41
fsufitchyay, got it03:41
fsufitchit's not ||, it's |03:41
fsufitchbut it works03:41
fsufitchok im done for today03:44
fsufitchim going to commit03:44
fsufitchaelkner: `pushed :)03:45
aelknerfsufitch, wait, what the cleanup method for?03:48
fsufitchi thought i reverted that, did that make it in?03:49
fsufitchno it didnt03:49
fsufitchit was because i thought i had to handle the <BLANKLINE>s manually :)03:49
fsufitchso i had made a quick cleanup method to deal with them03:50
aelknerin your last commit you have it still:03:50
aelknerfrom schooltool.courseinfo.browser.ftests.courseinfo import cleanup_output03:50
fsufitchi need to take that out03:50
aelknerso you're moving on to success tests, right?03:51
fsufitchthere is both a success and a fail test there03:51
fsufitchi need to have another fail one for invalid input instead of just missing input03:51
fsufitchonce i do the other fail test, i think i can move on to other functionaliy03:51
fsufitchchange pushed, btw03:51
aelknersorry, i've been looking at the revisions in launchpad rather than bxr pulling, or i wold have known you had the success test03:52
aelkneryou could remove the hard-coded view now that you have a working add view to use for tests03:57
aelkneralso, i would test failures before the first success test as is the convention03:58
fsufitchah okay03:58
fsufitchbut right now im out of time03:58
fsufitchso those are todo for next time :)03:58
aelknersure thing03:59
aelkneri guess we might as well have you push even if you have failing tests (for now)03:59
aelknerbecause it's faster than emailing diffs, and i can actually run the new code03:59
aelkneri just have this habit in my head from way back when ignas urged us to commit clean tests04:00
fsufitchtis late, i gotta go04:00
fsufitchsee ya!04:00
aelknerok, cya04:00
*** fsufitch has quit IRC04:05
*** klausade has quit IRC04:12
*** klausade has joined #schooltool04:16
*** aks has joined #schooltool06:02
*** aks has joined #schooltool06:02
*** menesis has quit IRC06:20
*** fsufitch has joined #schooltool06:54
*** fsufitch has quit IRC06:54
*** yvl has joined #schooltool09:19
*** aks has quit IRC09:50
*** aks has joined #schooltool09:54
*** alga has joined #schooltool10:46
*** menesis has joined #schooltool11:51
*** menesis has quit IRC12:54
*** menesis has joined #schooltool14:01
*** aks has quit IRC14:03
*** menesis has quit IRC14:06
*** menesis has joined #schooltool14:19
*** th1a has joined #schooltool15:36
*** th1a has quit IRC15:40
*** th1a has joined #schooltool15:43
*** yvl has quit IRC16:10
*** alga has quit IRC17:40
*** th1a has quit IRC18:27
*** th1a has joined #schooltool18:31
*** alga has joined #schooltool18:53
*** replaceafill has joined #schooltool21:14
*** menesis has quit IRC22:31

Generated by 2.15.1 by Marius Gedminas - find it at!