rooibos icon indicating copy to clipboard operation
rooibos copied to clipboard

tests.BaseTestSuite - setup not getting called when using @SGNode

Open waaadim opened this issue 2 years ago • 0 comments

Not sure if it's caused by @only because without it I'm getting this error

namespace tests
    @only
    @SGNode("GqlTask")
    @suite
    class GqlTaskTests extends tests.BaseTestSuite
        @describe("runGqlTask")
        @it("calls the success/finish callbacks when the task succeeds")
        function _()
            m.assertEqual(true, true)
        end function
    end class
end namespace

BaseTestSuite

namespace tests
    class BaseTestSuite extends rooibos.BaseTestSuite
        private appController

        protected override function setup()
            ? "### BaseTestSuite init"
            m.global.addFields({
                "rooibosInitSetupBug": false
            })
        end function
    end class
end namespace

GqlTask - the node I want to test

sub init()
    m.top.functionName = "execute"
    ? "### test" type(m.global.rooibosInitSetupBug)

Output

Starting test using test scene with name TestsSceneTestsScene
scene is ready; running tests now

> SUITE: GqlTaskTests>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
 +++++RUNNING NODE TEST
 node type is GqlTaskTests
### testInvalid

waaadim avatar Dec 20 '22 13:12 waaadim