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

Add Test Cases to Slash Commands in Bolt Apps #1669

Closed
5 of 10 tasks
SyedSibtainRazvi opened this issue Nov 30, 2022 · 4 comments
Closed
5 of 10 tasks

Add Test Cases to Slash Commands in Bolt Apps #1669

SyedSibtainRazvi opened this issue Nov 30, 2022 · 4 comments
Assignees
Labels
auto-triage-stale question M-T: User needs support to use the project tests M-T: Testing work only

Comments

@SyedSibtainRazvi
Copy link

Description

I am working on a Slack app for collecting Standups. And have two branches, main and production. And both branches are deployed and linked with our Slack as separate apps"BOT-Dev" and "BOT-PROD"
We are using two separate slash commands for both of the bots and need to add test cases for the Slash Command.
What are the suitable ways to add test cases to our slash commands file in the bolt app?
Please find the screenshots attached below and let me know if you need any additional details.

What type of issue is this? (place an x in one of the [ ])

  • bug
  • enhancement (feature request)
  • question
  • documentation related
  • example code related
  • testing related
  • discussion

Requirements (place an x in each of the [ ])

  • I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • I've read and agree to the Code of Conduct.
  • I've searched for any related issues and avoided creating a duplicate issue.

Bug Report

Filling out the following details about bugs will help us solve your issue sooner.

Reproducible in:

package version:

node version:

OS version(s):

Steps to reproduce:

Expected result:

What you expected to happen

Actual result:

What actually happened

Attachments:

Logs, screenshots, screencast, sample projects, funny gifs, etc.
Index ts

Standup

@hello-ashleyintech hello-ashleyintech self-assigned this Nov 30, 2022
@hello-ashleyintech
Copy link
Contributor

hello-ashleyintech commented Nov 30, 2022

Hi, @SyedSibtainRazvi! Thanks for writing in! 🙌

From this open issue (#638): currently, Bolt JS does not have any official testing support, but what you could do is use mocking within tests to mock the environments and payloads you need and verify the slash commands are working as expected.

You could find a way to mock the different development and production environments, verify that those are calling the correct slash commands, and then also run tests to verify those dev and prod slash commands are exhibiting expected behavior by verifying the payloads. While we don't have built-in Bolt JS test support, you can view our current unit tests for the Bolt JS framework to get inspiration for how you might be able to test via mimicking payloads that Slack might send.

Aside from the above, this issue (#383) includes some community discussion about testing Bolt JS apps that you might also find helpful! I hope this helps! 🎉

@hello-ashleyintech hello-ashleyintech added question M-T: User needs support to use the project tests M-T: Testing work only labels Nov 30, 2022
@SyedSibtainRazvi
Copy link
Author

Hello @hello-ashleyintech
Thank you for taking the time to respond and share your opinions on this.
I will absolutely read through this and look into how we can include it in our Bolt App.
I appreciate your assistance in this matter.

@github-actions
Copy link

github-actions bot commented Jan 2, 2023

👋 It looks like this issue has been open for 30 days with no activity. We'll mark this as stale for now, and wait 10 days for an update or for further comment before closing this issue out. If you think this issue needs to be prioritized, please comment to get the thread going again! Maintainers also review issues marked as stale on a regular basis and comment or adjust status if the issue needs to be reprioritized.

@github-actions
Copy link

As this issue has been inactive for more than one month, we will be closing it. Thank you to all the participants! If you would like to raise a related issue, please create a new issue which includes your specific details and references this issue number.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
auto-triage-stale question M-T: User needs support to use the project tests M-T: Testing work only
Projects
None yet
Development

No branches or pull requests

2 participants