message: Tested Refresh click and deferred click
diff: @@ -1838,4 +1838,54 @@ describe('RefreshLinkTest', function () {
  assert.equal(stateNavigator.stateContext.data.y, null);
  })
  });
  +
  + describe('Click Refresh', function () {
  + it('should navigate', function(){
  + var stateNavigator = new StateNavigator([
  + { key: 's', route: 'r' }
  + ]);
  + stateNavigator.navigate('s');
  + var container = document.createElement('div');
  + ReactDOM.render(
  + <NavigationHandler stateNavigator={stateNavigator}>
  + <NavigationContext.Consumer>
  + {({stateNavigator}) => (
  + <div onClick={() => stateNavigator.refresh({x: 'a'}, undefined, false)} />
  + )}
  + </NavigationContext.Consumer>
  + </NavigationHandler>,
  + container
  + );
  + var div = container.querySelector<HTMLAnchorElement>('div');
  + Simulate.click(div);
  + assert.equal(stateNavigator.stateContext.data.x, 'a');
  + })
  + });
  +
  + describe('Click Deferred Refresh Link', function () {
  + it('should navigate async', function(done){
  + var stateNavigator = new StateNavigator([
  + { key: 's', route: 'r' }
  + ]);
  + stateNavigator.navigate('s');
  + var container = document.createElement('div');
  + ReactDOM.render(
  + <NavigationHandler stateNavigator={stateNavigator}>
  + <RefreshLink
  + navigationData={{x: 'a'}}
  + defer={true}>
  + link text
  + </RefreshLink>
  + </NavigationHandler>,
  + container
  + );
  + var link = container.querySelector<HTMLAnchorElement>('a');
  + Simulate.click(link);
  + assert.equal(stateNavigator.stateContext.data.x, null);
  + stateNavigator.onNavigate(() => {
  + assert.equal(stateNavigator.stateContext.data.x, 'a');
  + done();
  + })
  + })
  + });
  });
  