Question

When I add SequenceWaiter step into the SequenceRunner, how can I get event object wich was passed into the event? There is the code from my test function:

var sequence: SequenceRunner = new SequenceRunner(this);
sequence.addStep(new SequenceCaller(manager, function(): void {
    manager.startUpload();
}));
sequence.addStep(new SequenceWaiter(manager, PackageUploadEvent.BEFORE_PACKAGE_UPLOAD, 1000));
sequence.addStep(new SequenceCaller(manager, function(): void {
    // TODO: Get event object from PackageUploadEvent.BEFORE_PACKAGE_UPLOAD event
}));
Was it helpful?

Solution

Answered on flexunit forum. The basic idea is to extend SequenceWaiter class, override setupListeners function to set up additional event listener and save event object to the public field in this listener.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top