Uploaded image for project: 'Fluid Infusion'
  1. Fluid Infusion
  2. FLUID-5145

Boiled events can halt IoC Testing framework

    XMLWordPrintable

Details

    Description

      Trying to test boiled events will halt at the test sequence where the listener is bound to the original event location. For example in the test setup below, the test will not continue past the first listener sequence.

      fluid.defaults("fluid.tests.boiledEventTree", {
      gradeNames: ["fluid.test.testEnvironment", "autoInit"],
      components: {
      boiledEventComp: {
      type: "fluid.eventedComponent",
      options: {
      events:

      { testEvent: null }

      ,
      invokers: {
      trigger: {
      func: "

      {that}.events.testEvent.fire"
      }
      },
      components: {
      child: {
      type: "fluid.eventedComponent",
      options: {
      events: { testEvent: null },
      listeners: {
      "{boiledEventComp}.events.testEvent": {
      listener: "{that}

      .events.testEvent"
      }
      }
      }
      }
      }
      }
      },
      boiledEventTester:

      { type: "fluid.tests.boiledEventTester" }

      }
      });

      fluid.defaults("fluid.tests.boiledEventTester", {
      gradeNames: ["fluid.test.testCaseHolder", "autoInit"],
      modules: [ {
      name: "Boiled Event test case",
      tests: [{
      name: "Boiled Event sequence",
      expect: 2,
      sequence: [{
      func: "

      {boiledEventComp}.trigger"
      }, {
      listener: "fluid.tests.checkEvent",
      event: "{boiledEventComp}

      .events.testEvent"
      }, {
      listener: "fluid.tests.checkEvent",
      event: "

      {boiledEventComp}

      .child.events.testEvent"
      }]
      }]
      }]
      });

      Attachments

        Activity

          People

            antranig Antranig Basman
            jobara Justin Obara
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: