Uploaded image for project: 'stripes-connect'
  1. stripes-connect
  2. STCON-50

Pass dataKey into substitute, so it can pass it through to mockProps

    XMLWordPrintable

Details

    • Bug
    • Status: Closed (View Workflow)
    • P2
    • Resolution: Done
    • None
    • 3.0.0

    Description

      The mockProps function, when it needs to check the prevailing dataKey, is looking in the props. But that no longer works, since we switched from the style:

      const connectedComponent = stripes.connect(Component);
      return <connectionComponent dataKey={val} ... />;
      

      To

      const connectedComponent = stripes.connect(Component, { dataKey: val });
      return <connectionComponent ... />;
      

      Instead, we now need to pass the prevailing dataKey explicitly into mockProps, which means that substitute needs to know it.

      TestRail: Results

        Attachments

          Issue Links

            Activity

              People

                mike Mike Taylor
                mike Mike Taylor
                Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Time Tracking

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0 minutes
                    0m
                    Logged:
                    Time Spent - 1 hour
                    1h

                    TestRail: Runs

                      TestRail: Cases