modaltesting

package
v0.0.0-...-5f5fad8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 11, 2024 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadCallbackFixture

func ReadCallbackFixture(t *testing.T, callback interface{})

func ValidateBlockIds

func ValidateBlockIds(t *testing.T, view slack.ModalViewRequest, fields ...string)

ValidateBlockIds ensures that all the fields are present as block identifiers in the view

func ValidateParameterProcessing

func ValidateParameterProcessing(t *testing.T, parameters modals.JiraIssueParameters, testCases []ProcessTestCase)

func ValidateSubmission

func ValidateSubmission(t *testing.T, handler interactions.Handler, testCases ...SubmissionTestCase)

ValidateSubmission validates a submission flow that files a Jira issue

func WriteCallbackFixture

func WriteCallbackFixture(t *testing.T, data []byte)

Types

type ProcessTestCase

type ProcessTestCase struct {
	Name          string
	ExpectedTitle string
	ExpectedBody  string
}

type SubmissionTestCase

type SubmissionTestCase struct {
	Name            string
	Filer           *jira.Fake
	Updater         *modals.FakeViewUpdater
	ExpectedPayload []byte
	ExpectedError   bool
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL