Hi,
I'm trying to align my tests a little bit more at the moment. I'm using seaside testing for the tests and magritte for most of the model objects. Whenever a model asComponent is rendered every individual MAElementComponent is rendered with an automatically assigned name attribute. Is it hard to resolve the description by this name value? This way it would be possible to set values in a form input fields. This is quite tedious at the moment. The fields that use <label forId=""> it is not too hard but not all of the input fields have labels and not always are they the previous sibling and so on... I know albatross has some clever stuff to detect this but I like to do the tests with seaside testing for the time being. thanks, Norbert _______________________________________________ SmallWiki, Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
> Whenever a model asComponent is rendered every
> individual MAElementComponent is rendered with an > automatically assigned name attribute. Is it hard > to resolve the description by this name value? That's Seaside that assigns the name attributes automatically, this has nothing to do with Magritte. The name attribute is used to generate the keys of a HTTP POST, it should not be used for anything else. > This way it would be possible to set values in a > form input fields. This is quite tedious at the > moment. The fields that use <label forId=""> it > is not too hard but not all of the input fields > have labels and not always are they the previous > sibling and so on... I know albatross has some > clever stuff to detect this but I like to do the > tests with seaside testing for the time being. Give the description a CSS class, that's a reliable way to find things in the DOM: aDescription cssClass: 'nameInputField' Lukas -- Lukas Renggli http://www.lukas-renggli.ch _______________________________________________ SmallWiki, Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
On Fri, 2009-03-06 at 15:06 +0100, Lukas Renggli wrote:
> > Whenever a model asComponent is rendered every > > individual MAElementComponent is rendered with an > > automatically assigned name attribute. Is it hard > > to resolve the description by this name value? > > That's Seaside that assigns the name attributes automatically, this > has nothing to do with Magritte. The name attribute is used to > generate the keys of a HTTP POST, it should not be used for anything > else. > value. But if I have a single test step that just gets the rendered result and that wants to know which component rendered that it is not too bad. At the moment I remember that the display of the markup in the "toggle halos" mode does this. Maybe I should look there. > > This way it would be possible to set values in a > > form input fields. This is quite tedious at the > > moment. The fields that use <label forId=""> it > > is not too hard but not all of the input fields > > have labels and not always are they the previous > > sibling and so on... I know albatross has some > > clever stuff to detect this but I like to do the > > tests with seaside testing for the time being. > > Give the description a CSS class, that's a reliable way to find things > in the DOM: > > aDescription cssClass: 'nameInputField' > to be able to find it while testing. Taken this I find the above approach better and more reliable. thanks, Norbert _______________________________________________ SmallWiki, Magritte, Pier and Related Tools ... https://www.iam.unibe.ch/mailman/listinfo/smallwiki |
Free forum by Nabble | Edit this page |