Get help with testing, discuss unit testing strategies etc.


Post by rchloupe »

Is there a way to access the running test (StartTest) from within a waitFor (isa: Siesta.Test.ExtJS)? There's a function I'd like to call on many tests. I can't find anything under scopeProvider or harness...

Thanks

Post by nickolay »

Please elaborate, your question is unclear.

Post by rchloupe »

In my test class I have:
t.it('Logging into application', function(t) {
    t.chain(
	    { waitForAppLogin: true },
		...
What I would like to do in the testClass is:
Class('My.test.Desktop', {
    isa: Siesta.Test.ExtJS,

    methods: {
        waitForAppLogin: function(options, callback, scope, timeout) {
		    var creds = REFERENCE_TO_CALLING_TEST.getLoginCredentials();
			...
Is there a way to get the "REFERENCE_TO_CALLING_TEST" when in testClass from the harness or somewhere? It would be a great deal of work to change all the tests to pass this data to the testClass.

Post by nickolay »

If you are about test instance - Its just "this". If you are about the context of test - it is "this.global". Check this guide: https://bryntum.com/docs/siesta/#!/guide ... test_class

Post Reply