Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complex Journey test 1 #301

Open
4 tasks
abheek9 opened this issue Feb 27, 2024 · 4 comments · May be fixed by #407
Open
4 tasks

Complex Journey test 1 #301

abheek9 opened this issue Feb 27, 2024 · 4 comments · May be fixed by #407
Assignees

Comments

@abheek9
Copy link
Contributor

abheek9 commented Feb 27, 2024

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.
Copy link
Contributor

gitstart-app bot commented Feb 27, 2024

Here is the GitStart Ticket for this issue: https://clients.gitstart.com/laudspeaker/8881/tickets/LAUD-301

@gitstart-laudspeaker
Copy link
Collaborator

gitstart-laudspeaker commented Feb 29, 2024

Hey @abheek9,
We've run into a number of issues that require your feedback.

We've noticed the cypress tests don't pass locally, this is probably because of missing environment variables. Perhaps, you can help us provide these variables
Feb 28 Screenshot from Slack

@gitstart-laudspeaker
Copy link
Collaborator

Hey @abheek9,

I've noticed that the tests make actual API calls. Perhaps you have more context on why we're making the API calls instead of mocking them.

@abheek9
Copy link
Contributor Author

abheek9 commented Mar 3, 2024

@gitstart-laudspeaker which tests dont pass? Is it some of them or all - if youre able can you add this env: TEST_USER_EMAIL='james@bond.com' Also if possible can you share the error logging?

@gitstart-app gitstart-app bot linked a pull request Apr 23, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants