Skip to content

Complex Journey test 1 #301

Open
@abheek9

Description

Creating a complex journey with multisplit attribute, multisplit event, experiment and webhooks

Context:

We have a large number of journey features now, and need to make sure they are working as intended. One way end to end tests can help us is with an adapted real life journey.

To Do list:

  • in the test after signing up, upload a csv using the test helper function previously used, and using this csv:
    correctness_testing.csv

  • Create a new test helper function called simulatedEvents that fires a few events to the events endpoint, if this is done correctly you will see the results in the event tracker:

Screenshot 2024-02-27 at 12 16 04 AM You will need to use the accounts api key found here: Screenshot 2024-02-27 at 12 19 42 AM the request will look something like but with a different url, api, key and event name/payload:
var request = require('request');
var options = {
  'method': 'POST',
  'url': 'https://api.laudspeaker.com/events/',
  'headers': {
    'Authorization': 'Api-Key 9mm0MUF6f5du4jTry9nK7kCreJ6t2Y1fZvtezS04',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    "correlationKey": "user_id",
    "correlationValue": "[example_user_id]",
    "source": "custom",
    "event": "your_event",
    "payload": {
      "example": 4
    }
  })

};
request(options, function (error, response) {
  if (error) throw new Error(error);
  console.log(response.body);
});

  • the events fired should correspond to some users from the csv that was uploaded
  • Please create a cypress test that recreates this journey from scratch, use webhooks instead of push. The message content doesnt matter, but pay attention to the multisplit conditions, if the csv doesnt have a property shown in the loom, use a property that is in the csv but has the same type as shown in the video ie replace boolean with boolean.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions