UNPKG

@textback/notification-widget

Version:

TODO: Give a short introduction of your project. Let this section explain the objectives or the motivation behind this project.

22 lines (17 loc) 956 B
fixture `Notification widget growfood tests` .page `http://localhost:3000/tests/gf.html`; test('Post initialization deeplink request', async t => { const initialization = new Promise(resolve => { setTimeout(resolve, 3000); }); await initialization; const requests = await t.eval(() => window.fetch.calls); const deeplinkRequests = requests.filter(call => { return call.url === 'https://api.textback.io/api/endUserNotifications/deepLinks'; }); await t.expect(JSON.parse(deeplinkRequests[1].options.body)).eql({ "accountId": "ee9ae30b-cc4a-4e57-ac52-9ff09122dd81", "insecureContext": {"insecureOrderId": "testId"}, "secureContextToken": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJvcmRlcklkIjoiNDU2OCIsImlhdCI6MTQ5MTMzMzM0OCwiZXhwIjoxNDkyMTk3MzQ4LCJpc3MiOiJlZTlhZTMwYi1jYzRhLTRlNTctYWM1Mi05ZmYwOTEyMmRkODEiLCJzdWIiOiIxMjM0NSJ9._3FnsIV0atJ9F8_vmDZlzz5S0Qo6-tn7GP597Rxphm8=" }); });