You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am trying to test an AdaptiveCard. I am using the example from the documentation to create the card.
varmsg=newbuilder.Message(session);msg.attachmentLayout(builder.AttachmentLayout.carousel)msg.attachments([newbuilder.HeroCard(session).title("Classic White T-Shirt").subtitle("100% Soft and Luxurious Cotton").text("Price is $25 and carried in sizes (S, M, L, and XL)").images([builder.CardImage.create(session,'http://petersapparel.parseapp.com/img/whiteshirt.png')]).buttons([builder.CardAction.imBack(session,"buy classic white t-shirt","Buy")]),newbuilder.HeroCard(session).title("Classic Gray T-Shirt").subtitle("100% Soft and Luxurious Cotton").text("Price is $25 and carried in sizes (S, M, L, and XL)").images([builder.CardImage.create(session,'http://petersapparel.parseapp.com/img/grayshirt.png')]).buttons([builder.CardAction.imBack(session,"buy classic gray t-shirt","Buy")])]);
The example in the BotTester documentation says to test against an adaptive card object refrenece. My problem is I can't create the Adaptive card because I don't have a session object.
Good catch. The adaptive cards tests were a bit harder for me to work through because of how little I had interacted with them. Would you be interested in working with me on a solution?
&/also you should be able to mock the full adaptive card state without the session object. If I'm recalling correctly, the BotTester does a deep comparison and ignores anything that isn't expected
Activity
ihachani commentedon Feb 27, 2018
Another issue is the
BotTestertests forundefinedwhen a card is returnedThe bot returns the message in the example above.
This passes when it should fail.
microsoftly commentedon Feb 27, 2018
Good catch. The adaptive cards tests were a bit harder for me to work through because of how little I had interacted with them. Would you be interested in working with me on a solution?
microsoftly commentedon Feb 27, 2018
&/also you should be able to mock the full adaptive card state without the session object. If I'm recalling correctly, the
BotTesterdoes a deep comparison and ignores anything that isn't expected