Cloudkibo / KiboPush

0 stars 1 forks source link

test button willn't work properly if chatbot is not published #9648

Open arveenkumar55 opened 4 years ago

arveenkumar55 commented 4 years ago

Describe the bug When I try to click on the test button without bot published I am getting only the first block, not other blocks.

To Reproduce Steps to reproduce the behavior:

  1. Go to chatbot
  2. disable chatbot
  3. click on test button you will get the first message with quick replies
  4. click on quick reply and it didn't send a response on messenger

Expected behavior test button should work properly if a chatbot is not published

Front End or Backend End issue? Backend How was the issue found the automated test or manual test? Manual

When was this issues last working? Not tested this scenario

Screenshots Screenshot from 2020-09-02 16-05-56 test

Paper Trail logs There were no paper trails logs here

Browser logs There was no browser logs here

Sentry Links and Screenshots There were no sentry links here

Desktop (please complete the following information):

Additional context Add any other context about the problem here.

sojharo commented 4 years ago

I have completed the work on this. @arveenkumar55 please test.

Identify what broke the code?

This was not broken by any change in code. This worked like this that test button sent the first welcome message to admin. The next messages have condition that they should only go when the bot is published. I have introduced the testSession time window so that when admin clicks on test button when bot is unpublished, it will start test session so that other messages will go if test session is open and bot is unpublished.

Identify the commit and developer who is responsible for that change.

This used to work like this and test only worked correctly when bot was in published state. No change broke it.

What is the way that we can ensure that this code doesn’t break again.

I have introduced the timed test session so that when the session is enabled for testing, then all messages of that bot will go towards the admin even if the bot is disabled.

arveenkumar55 commented 4 years ago

working fine on staging

sojharo commented 4 years ago

@arveenkumar55 please test this on production as well.

arveenkumar55 commented 3 years ago

working fine on production

AnishaChhatwani commented 3 years ago

From https://github.com/Cloudkibo/KiboPush/issues/10095 Test chatbot is not working as expected.

sojharo commented 3 years ago

on test, I am getting hello while my welcome block contains some other text

Please share the chatbot and credentials for this.

bot is not published but i’m still getting the chatbot responses on messenger when I enter a trigger word. This is happening when I click test.

Let's discuss this as this is expected functionality. You will get it as you are added as tester of chatbot.

AnishaChhatwani commented 3 years ago

email: anisha@cloudkibo.com password: 1234567 Page: Get Started

sojharo commented 3 years ago

I have worked on this and added the test session time so that it will expire and you will not get the unpublished message again.

AnishaChhatwani commented 3 years ago

I tested this on staging. It was working for me for page 'Test'. But on Page 'Test 3', when I click on the test button, nothing happened and I also didn't get the response on messenger.

sojharo commented 3 years ago

This is found for new type of chatbots i.e. (commerce and airlines) in our team testing today. We need to do this for new chatbots as well.

As I am not able to give much time to this task so I am reassigning it. This is fixed for the problem it was opened for. @AnishaChhatwani The issue you are reporting is on the client side, I have opened a separate issue for that.

However, as we have new chatbots (commerce & airlines) created now, so we need to do the same work done in this task for these chatbots.

@saniasiddiqui Please use the logic I have written in this task for these new types of chatbots as well.