fsufitch | aelkner: ping | 00:14 |
---|---|---|
aelkner | pong | 00:14 |
fsufitch | testbrowser is not behaving correctly. when the "Add" button is clicked on the courseinfo form, the form is not submitted | 00:15 |
fsufitch | i've looked at examples elsewhere in schooltool, and my code reflects exactly how it's done there, so i don't get it | 00:15 |
fsufitch | if i try to do it using manager.serve(), it works | 00:15 |
aelkner | the diff? | 00:16 |
fsufitch | sent | 00:19 |
fsufitch | basically the only difference is adding a check that the form actually works | 00:19 |
*** menesis has quit IRC | 00:20 | |
aelkner | the only thing i can think of off-hand is if there were more than one Add button somehow | 00:22 |
aelkner | fsufitch, go ahead and push so i can test it out | 00:22 |
fsufitch | ok | 00:22 |
fsufitch | pushed | 00:23 |
aelkner | testing... | 00:25 |
aelkner | you got errors | 00:28 |
fsufitch | the problem *is* the broken test :) | 00:28 |
aelkner | remember i was saing you should printQuery on the errors div? | 00:28 |
aelkner | that would maek it easier to see what's up without even needing serve() | 00:29 |
aelkner | and wondering why the difference | 00:29 |
aelkner | i know i've gone down that road before, scratching my head | 00:29 |
fsufitch | wait, there's errors? | 00:30 |
aelkner | but now i know that it's always safe to test the form and see what browser thinks it is | 00:30 |
fsufitch | i used serve() and all i got was an empty form | 00:30 |
aelkner | you'd know if you tested for them | 00:30 |
fsufitch | hmm, oops | 00:30 |
aelkner | yeah, you see, serve() doesn't remember what you typed in | 00:30 |
fsufitch | i see | 00:30 |
aelkner | in other words, it doesn't pass form data, just the url | 00:31 |
aelkner | which leads to the blank form | 00:31 |
aelkner | yeah, this is why i started relying on printQuery | 00:31 |
aelkner | plus, you get test writing accomplished at the same time as debugging :) | 00:31 |
fsufitch | i see | 00:32 |
fsufitch | okay :) | 00:32 |
*** menesis has joined #schooltool | 00:35 | |
fsufitch | aelkner: i'm very hungry, i'm going to grab a bite and finish this when i return | 00:38 |
aelkner | fsufitch, ok, i'll be around | 00:42 |
*** issyl0 has quit IRC | 01:40 | |
*** issyl0 has joined #schooltool | 01:45 | |
*** alga has quit IRC | 02:45 | |
*** th1a has quit IRC | 02:52 | |
*** replaceafill has quit IRC | 02:57 | |
fsufitch | aelkner: ping | 03:01 |
fsufitch | forgot to say, but i did return a while ago | 03:02 |
fsufitch | i made the regular test for adding work, and im now doing the error tests | 03:02 |
aelkner | fsufitch, got it | 03:21 |
fsufitch | i had to work around a problem with xpath concerning the "class" attribute | 03:24 |
fsufitch | since class can have multiple values, you can't just do [@class='foo'] | 03:24 |
aelkner | yeah, that's a drag | 03:27 |
aelkner | ah, i found the solution | 03:28 |
fsufitch | yeah i got it | 03:28 |
aelkner | i think | 03:28 |
aelkner | /div[contains(@class, 'info-block') and not(contains(@class, 'person-groups'))] | 03:29 |
aelkner | /div, that is | 03:29 |
fsufitch | yeah | 03:29 |
aelkner | that helps? | 03:30 |
fsufitch | i had already figured it out :) | 03:31 |
fsufitch | currently im just trying to figure out what is the best way to test these error messages | 03:31 |
fsufitch | they're in a "<li> Field name: <div> error text </div> </li>" format | 03:32 |
aelkner | ...//li/div/text() | 03:32 |
fsufitch | i don't get the field names then | 03:32 |
fsufitch | so i just get a bunch of "Required input is missing." withouth knowing what it was referring to | 03:33 |
aelkner | why no ...//li/text()? | 03:33 |
aelkner | not | 03:33 |
fsufitch | because then i jsut get the field names, and not the errors | 03:33 |
fsufitch | it's weird. | 03:33 |
aelkner | that makes sense | 03:34 |
aelkner | what you need is both the text and the children | 03:34 |
fsufitch | so ../li/*/text()? | 03:34 |
aelkner | try ...//li/* | 03:35 |
aelkner | http://msdn.microsoft.com/en-us/library/ms256122.aspx has a good guide for xpath | 03:36 |
fsufitch | augh! M word! | 03:36 |
fsufitch | :) | 03:36 |
aelkner | i know, bite my tongue using the M word, but it's a really good page :) | 03:36 |
fsufitch | hmm, nope, li/* only gives the children (the errors), not the li elements themselves | 03:37 |
fsufitch | maybe li/text() || li/div/text() | 03:38 |
fsufitch | also, when there are <BLANKLINE>s in the printed value, my tests don't have to reflect them, right? | 03:39 |
fsufitch | as in, i don't have to have a bunch of blank lines in my README.txt | 03:40 |
aelkner | that's right, don't worry about them | 03:40 |
fsufitch | ok | 03:40 |
aelkner | i don't know about using || for the two expressions, but they are the right ones | 03:40 |
aelkner | you could do one, then the other, it wouldn't be a crime | 03:41 |
fsufitch | yay, got it | 03:41 |
fsufitch | it's not ||, it's | | 03:41 |
fsufitch | but it works | 03:41 |
aelkner | cool | 03:43 |
fsufitch | ok im done for today | 03:44 |
fsufitch | im going to commit | 03:44 |
fsufitch | aelkner: `pushed :) | 03:45 |
aelkner | looking | 03:46 |
aelkner | nice | 03:47 |
aelkner | fsufitch, wait, what the cleanup method for? | 03:48 |
fsufitch | i thought i reverted that, did that make it in? | 03:49 |
fsufitch | no it didnt | 03:49 |
fsufitch | it was because i thought i had to handle the <BLANKLINE>s manually :) | 03:49 |
fsufitch | so i had made a quick cleanup method to deal with them | 03:50 |
aelkner | in your last commit you have it still: | 03:50 |
aelkner | from schooltool.courseinfo.browser.ftests.courseinfo import cleanup_output | 03:50 |
fsufitch | oh | 03:50 |
fsufitch | i need to take that out | 03:50 |
aelkner | so you're moving on to success tests, right? | 03:51 |
fsufitch | there is both a success and a fail test there | 03:51 |
fsufitch | i need to have another fail one for invalid input instead of just missing input | 03:51 |
fsufitch | once i do the other fail test, i think i can move on to other functionaliy | 03:51 |
fsufitch | change pushed, btw | 03:51 |
aelkner | sorry, i've been looking at the revisions in launchpad rather than bxr pulling, or i wold have known you had the success test | 03:52 |
fsufitch | np | 03:56 |
aelkner | you could remove the hard-coded view now that you have a working add view to use for tests | 03:57 |
aelkner | also, i would test failures before the first success test as is the convention | 03:58 |
fsufitch | ah okay | 03:58 |
fsufitch | but right now im out of time | 03:58 |
fsufitch | so those are todo for next time :) | 03:58 |
aelkner | sure thing | 03:59 |
aelkner | i guess we might as well have you push even if you have failing tests (for now) | 03:59 |
aelkner | because it's faster than emailing diffs, and i can actually run the new code | 03:59 |
aelkner | i just have this habit in my head from way back when ignas urged us to commit clean tests | 04:00 |
fsufitch | yeah | 04:00 |
fsufitch | anyway | 04:00 |
fsufitch | tis late, i gotta go | 04:00 |
fsufitch | see ya! | 04:00 |
aelkner | ok, cya | 04:00 |
*** fsufitch has quit IRC | 04:05 | |
*** klausade has quit IRC | 04:12 | |
*** klausade has joined #schooltool | 04:16 | |
*** aks has joined #schooltool | 06:02 | |
*** aks has joined #schooltool | 06:02 | |
*** menesis has quit IRC | 06:20 | |
*** fsufitch has joined #schooltool | 06:54 | |
*** fsufitch has quit IRC | 06:54 | |
*** yvl has joined #schooltool | 09:19 | |
*** aks has quit IRC | 09:50 | |
*** aks has joined #schooltool | 09:54 | |
*** alga has joined #schooltool | 10:46 | |
*** menesis has joined #schooltool | 11:51 | |
*** menesis has quit IRC | 12:54 | |
*** menesis has joined #schooltool | 14:01 | |
*** aks has quit IRC | 14:03 | |
*** menesis has quit IRC | 14:06 | |
*** menesis has joined #schooltool | 14:19 | |
*** th1a has joined #schooltool | 15:36 | |
*** th1a has quit IRC | 15:40 | |
*** th1a has joined #schooltool | 15:43 | |
*** yvl has quit IRC | 16:10 | |
*** alga has quit IRC | 17:40 | |
*** th1a has quit IRC | 18:27 | |
*** th1a has joined #schooltool | 18:31 | |
*** alga has joined #schooltool | 18:53 | |
*** replaceafill has joined #schooltool | 21:14 | |
*** menesis has quit IRC | 22:31 |
Generated by irclog2html.py 2.15.1 by Marius Gedminas - find it at mg.pov.lt!