Get help with testing, discuss unit testing strategies etc.


Post by jflowers45 »

I think the type for clearExisting is Boolean, not String
https://www.bryntum.com/docs/siesta/#!/ ... arExisting

Post by mats »

Fixed, thanks for the heads up :)

Post by jflowers45 »

Anytime. If I come across anything similar, do you prefer this kind of feedback in the forums or elsewhere?

Post by mats »

Here's is great, keep it coming :)

Post by jflowers45 »

https://www.bryntum.com/docs/siesta/#!/ ... rAssertion

Type is listed as Date/String, should be boolean

Post by nickolay »

Thanks for the report, fixed!

Post by jflowers45 »

The examples for 'rightclick' show calls to t.click

https://www.bryntum.com/docs/siesta/#!/ ... rightClick

Post by nickolay »

Thanks for pointing! Fixed for "doubleClick" as well :)

Post by jflowers45 »

This is a suggestion rather than an error, but I've been using BDD a little bit more, and I stumbled across this post. viewtopic.php?f=20&t=4146&p=24672&hilit=iit#p24672
Well, think of every "t.it()" and "t.describe()" section as a small subtest. That subtest is just like the top test - can have own "t.chain" in it, waits, "beginAsync/endAsync" etc. The "firesOk/willFireNTimes" assertions are also "local" to that test. These sub tests are executed in order. This means Siesta waits until all the chains/asyncs are completed in the 1st "t.it()" then it proceeds to the 2nd, etc.

Best practice will be to make every section more or less standalone. And usually your test will look like: ... (code)

This makes the test more readable and limits the scope of every testing scenario. You can also easily test just one section (iit) or exclude some section (xit). In the "setup" function you can also for example render some components or do something else (like clear the DB) - same concepts apply.
I found that super helpful - could be cool if some of that language was on this BDD conventions page. https://www.bryntum.com/docs/siesta/#!/ ... onventions

Also, you might mention that you support ddescribe - it's called fdescribe in newer Jasmine so it took me some time to realize it was available.

Post by nickolay »

Good suggestion, thank you. I'll update the guide.

Post Reply