Hello, Is it possible to test #ahah form elements with simpletest? How to make the function $this->drupalPost() work when some of the elements have dynamically been added with an #ahah callback (e.g. when changing a select value)? Or is this a test scenario that is not yet covered by simpletest? thanks, Augustin.
If it's degradable, then it will work, provided you test the degraded version. To test it manually, turn JS off in your browser. Dmitri On Dec 13, 2008, at 2:37 AM, augustin (beginner) wrote:
Hello,
Is it possible to test #ahah form elements with simpletest? How to make the function $this->drupalPost() work when some of the elements have dynamically been added with an #ahah callback (e.g. when changing a select value)?
Or is this a test scenario that is not yet covered by simpletest?
thanks,
Augustin.
On Sunday 14 December 2008 06:18:27 Dmitri Gaskin wrote:
If it's degradable, then it will work, provided you test the degraded version. To test it manually, turn JS off in your browser.
Yes, thanks. So, in a way, you confirm that there is no way to test the js version. Then, the only way to test the #ahah callback would be through unit testing... Augustin.
You would have to use a unit testing framework design for JavaScript. http://en.wikipedia.org/wiki/List_of_unit_testing_frameworks#JavaScript. Or use something designed for general front-end testing, like Selenium. One of these could theoretically be integrated with Simpletest. -Neil On Sat, Dec 13, 2008 at 6:18 PM, augustin (beginner) <drupal.beginner@wechange.org> wrote:
On Sunday 14 December 2008 06:18:27 Dmitri Gaskin wrote:
If it's degradable, then it will work, provided you test the degraded version. To test it manually, turn JS off in your browser.
Yes, thanks.
So, in a way, you confirm that there is no way to test the js version. Then, the only way to test the #ahah callback would be through unit testing...
Augustin.
-- Neil Drumm http://delocalizedham.com
On Sunday 14 December 2008 11:06:19 Neil Drumm wrote:
You would have to use a unit testing framework design for JavaScript. http://en.wikipedia.org/wiki/List_of_unit_testing_frameworks#JavaScript. Or use something designed for general front-end testing, like Selenium. One of these could theoretically be integrated with Simpletest.
Thanks Neil. I put this information here: http://drupal.org/node/347184 Augustin.
On Saturday 13 December 2008 18:37:06 augustin (beginner) wrote:
Is it possible to test #ahah form elements with simpletest? How to make the function $this->drupalPost() work when some of the elements have dynamically been added with an #ahah callback (e.g. when changing a select value)?
Or is this a test scenario that is not yet covered by simpletest?
And what about multistep forms? The form is evolving according to previous user submitions. Can $this->drupalPost() be somehow used twice in a row, with simpletest remembering the state of the form after the first call? Or are all those scenarios that cannot be tested... ? Augustin.
multi-step can be tested: pass NULL in as the $path. Dmitri On Dec 13, 2008, at 7:00 PM, augustin (beginner) wrote:
On Saturday 13 December 2008 18:37:06 augustin (beginner) wrote:
Is it possible to test #ahah form elements with simpletest? How to make the function $this->drupalPost() work when some of the elements have dynamically been added with an #ahah callback (e.g. when changing a select value)?
Or is this a test scenario that is not yet covered by simpletest?
And what about multistep forms? The form is evolving according to previous user submitions. Can $this->drupalPost() be somehow used twice in a row, with simpletest remembering the state of the form after the first call?
Or are all those scenarios that cannot be tested... ?
Augustin.
On Sun, Dec 14, 2008 at 9:02 AM, Dmitri Gaskin <dmitrig01@gmail.com> wrote:
multi-step can be tested: pass NULL in as the $path.
Dmitri
On Dec 13, 2008, at 7:00 PM, augustin (beginner) wrote:
On Saturday 13 December 2008 18:37:06 augustin (beginner) wrote:
Is it possible to test #ahah form elements with simpletest? How to make the function $this->drupalPost() work when some of the elements have dynamically been added with an #ahah callback (e.g. when changing a select value)?
Or is this a test scenario that is not yet covered by simpletest?
And what about multistep forms? The form is evolving according to previous user submitions. Can $this->drupalPost() be somehow used twice in a row, with simpletest remembering the state of the form after the first call?
Or are all those scenarios that cannot be tested... ?
Augustin.
-- ----------------- Yours.
On Sunday 14 December 2008 11:32:57 Dmitri Gaskin wrote:
multi-step can be tested: pass NULL in as the $path.
Thanks Dmitri. I have not yet had the opportunity to test this. However, it is worthwhile to document this kind of information, so I have added it here: http://drupal.org/node/265762/revisions/view/381426/404000 http://drupal.org/node/265762 API functions Thanks, Augustin.
On Sat, Dec 13, 2008 at 11:37 AM, augustin (beginner) < drupal.beginner@wechange.org> wrote:
Is it possible to test #ahah form elements with simpletest? How to make the function $this->drupalPost() work when some of the elements have dynamically been added with an #ahah callback (e.g. when changing a select value)?
Hi Augustin, Please open an issue in the Drupal Core 7 queue, against the simpletest.module. I'm pretty sure we can build something that emulate some of the functionality of ahah.js in PHP. Damien Tournoud
On Sunday 14 December 2008 21:38:11 Damien Tournoud wrote:
Hi Augustin,
Please open an issue in the Drupal Core 7 queue, against the simpletest.module. I'm pretty sure we can build something that emulate some of the functionality of ahah.js in PHP.
Bonjour Damien, Ok, it is done: http://drupal.org/node/346095 A.
participants (5)
-
augustin (beginner) -
Damien Tournoud -
Dmitri Gaskin -
Mohd Sakib -
Neil Drumm