Advertisement
Guest User

Untitled

a guest
Nov 14th, 2019
110
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.04 KB | None | 0 0
  1. it.only('sends the appropriate action when click on different option (Radio-Button)', async () => {
  2. // const fareTypeElement = wrapper
  3. // .find('div[data-testid="fare-shop-search-fare-types"]')
  4. // .childAt(0);
  5. const privateRadioElement = wrapper
  6. .find('[data-testid="fare-shop-search-fare-types__private"]')
  7. .last();
  8.  
  9. // const test = privateRadioElement
  10. // .find('.RadioButton__root')
  11. // .children()
  12. // .first();
  13.  
  14. console.log(privateRadioElement.debug(), '____XXXX____');
  15.  
  16. privateRadioElement.simulate('change', { target: { value: ':P' } });
  17. privateRadioElement.simulate('click');
  18. const foundAction = await spyMiddleware.getActions();
  19. console.log(foundAction, '-test- foundACTIONN______');
  20. // const foundAction2 = await spyMiddleware.getAction(SET_FARE_SHOP_SEARCH_FARE_TYPE_MODIFIER);
  21. // expect(foundAction2).toEqual({ type: 'setFareShopSearchFareType' });
  22. expect(spyMiddleware.getAction(SET_FARE_SHOP_SEARCH_FARE_TYPE_MODIFIER)).toBeDefined();
  23. });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement