Skip to content

Commit

Permalink
slack-bot: change tests over to use minimal fixtures
Browse files Browse the repository at this point in the history
Signed-off-by: Steve Kuznetsov <skuznets@redhat.com>
  • Loading branch information
stevekuznetsov committed Oct 13, 2020
1 parent 0b784b9 commit 7440799
Show file tree
Hide file tree
Showing 29 changed files with 694 additions and 53 deletions.
@@ -0,0 +1,43 @@
trigger_id: 1445212076624.1377252349923.6db817174c902b85a7eac0d8f5613d3e
type: view_submission
view:
app_id: A01BJF00CAD
hash: 1602467948.iWjOP1Z9
id: V01BYJ3JXN3
private_metadata: bug
root_view_id: V01BYJ3JXN3
state:
values:
category:
Ceww:
selected_option:
text:
emoji: true
text: Other
type: plain_text
value: Other
type: static_select
expected:
BFSg5:
type: plain_text_input
value: Something right!
impact:
+2dWl:
type: plain_text_input
value: I'm on fire.
optional:
DCgA:
type: plain_text_input
value: My Component
reproduction:
Cv9:
type: plain_text_input
value: Every time, just push the button.
symptom:
G=Vl:
type: plain_text_input
value: Something wrong!
title:
EU7e8:
type: plain_text_input
value: My Title
@@ -0,0 +1,43 @@
trigger_id: 1445212076624.1377252349923.6db817174c902b85a7eac0d8f5613d3e
type: view_submission
view:
app_id: A01BJF00CAD
hash: 1602467948.iWjOP1Z9
id: V01BYJ3JXN3
private_metadata: bug
root_view_id: V01BYJ3JXN3
state:
values:
category:
Ceww:
selected_option:
text:
emoji: true
text: Release Controller
type: plain_text
value: Release Controller
type: static_select
expected:
BFSg5:
type: plain_text_input
value: Something right!
impact:
+2dWl:
type: plain_text_input
value: I'm on fire.
optional:
DCgA:
type: plain_text_input
value: My Component
reproduction:
Cv9:
type: plain_text_input
value: Every time, just push the button.
symptom:
G=Vl:
type: plain_text_input
value: Something wrong!
title:
EU7e8:
type: plain_text_input
value: My Title
@@ -0,0 +1 @@
{"response_action":"update","view":{"type":"modal","title":{"type":"plain_text","text":"Creating Jira Issue..."},"blocks":[{"type":"section","text":{"type":"mrkdwn","text":"A Jira issue is being filed, please do not close this window..."}}],"private_metadata":"jira_pending"}}
@@ -0,0 +1,47 @@
token: Rn1sVT099UjUeKclB3PkLT8t
trigger_id: 1445212076624.1377252349923.6db817174c902b85a7eac0d8f5613d3e
type: view_submission
user:
id: U01B31ARZDG
view:
app_id: A01BJF00CAD
hash: 1602467948.iWjOP1Z9
id: V01BYJ3JXN3
private_metadata: bug
root_view_id: V01BYJ3JXN3
state:
values:
category:
Ceww:
selected_option:
text:
emoji: true
text: Other
type: plain_text
value: Other
type: static_select
value: Other
expected:
BFSg5:
type: plain_text_input
value: Something right!
impact:
+2dWl:
type: plain_text_input
value: I'm on fire.
optional:
DCgA:
type: plain_text_input
value: My Component
reproduction:
Cv9:
type: plain_text_input
value: Every time, just push the button.
symptom:
G=Vl:
type: plain_text_input
value: Something wrong!
title:
EU7e8:
type: plain_text_input
value: My Title
@@ -0,0 +1 @@
{"response_action":"errors","errors":{"optional":"Provide a description of the other component."}}
@@ -0,0 +1,43 @@
trigger_id: 1414625255638.1377252349923.b936c322ff12440681d95c4d9d202a60
type: view_submission
view:
app_id: A01BJF00CAD
hash: 1602467948.iWjOP1Z9
id: V01BYJ3JXN3
private_metadata: bug
root_view_id: V01BYJ3JXN3
state:
values:
category:
Ceww:
selected_option:
text:
emoji: true
text: Other
type: plain_text
value: Other
type: static_select
expected:
BFSg5:
type: plain_text_input
value: input
impact:
+2dWl:
type: plain_text_input
value: input
optional:
DCgA:
type: plain_text_input
value: ""
reproduction:
Cv9:
type: plain_text_input
value: input
symptom:
G=Vl:
type: plain_text_input
value: input
title:
EU7e8:
type: plain_text_input
value: input
@@ -0,0 +1,43 @@
trigger_id: 1414625255638.1377252349923.b936c322ff12440681d95c4d9d202a60
type: view_submission
view:
app_id: A01BJF00CAD
hash: 1602467948.iWjOP1Z9
id: V01BYJ3JXN3
private_metadata: bug
root_view_id: V01BYJ3JXN3
state:
values:
category:
Ceww:
selected_option:
text:
emoji: true
text: Other
type: plain_text
value: Other
type: static_select
expected:
BFSg5:
type: plain_text_input
value: input
impact:
+2dWl:
type: plain_text_input
value: input
optional:
DCgA:
type: plain_text_input
value: component
reproduction:
Cv9:
type: plain_text_input
value: input
symptom:
G=Vl:
type: plain_text_input
value: input
title:
EU7e8:
type: plain_text_input
value: input
@@ -0,0 +1,43 @@
trigger_id: 1414625255638.1377252349923.b936c322ff12440681d95c4d9d202a60
type: view_submission
view:
app_id: A01BJF00CAD
hash: 1602467948.iWjOP1Z9
id: V01BYJ3JXN3
private_metadata: bug
root_view_id: V01BYJ3JXN3
state:
values:
category:
Ceww:
selected_option:
text:
emoji: true
text: Release Controller
type: plain_text
value: Release Controller
type: static_select
expected:
BFSg5:
type: plain_text_input
value: input
impact:
+2dWl:
type: plain_text_input
value: input
optional:
DCgA:
type: plain_text_input
value: ""
reproduction:
Cv9:
type: plain_text_input
value: input
symptom:
G=Vl:
type: plain_text_input
value: input
title:
EU7e8:
type: plain_text_input
value: input
26 changes: 4 additions & 22 deletions pkg/slack/modals/bug/view_test.go

Large diffs are not rendered by default.

@@ -0,0 +1,32 @@
trigger_id: 1416756610774.1377252349923.ff1a76bce3db8f1d6f892f75bcb25f58
type: view_submission
view:
app_id: A01BJF00CAD
hash: 1602538261.7V8X4IBr
id: V01CU3D2A73
private_metadata: consultation
root_view_id: V01CU3D2A73
state:
values:
acceptance_criteria:
ec8:
type: plain_text_input
value: |-
something simple is done
I didn't have to do anything to achieve it
additional:
aPFdZ:
type: plain_text_input
value: I'll bug you forever while we work on this.
previous:
XwW0:
type: plain_text_input
value: I have tried nothing and looked at no docs.
requirement:
6v7u:
type: plain_text_input
value: I would like to do something really simple.
title:
xFGTt:
type: plain_text_input
value: Please Help Me
@@ -0,0 +1,30 @@
trigger_id: 1429676731732.1377252349923.55259e6c220e0f2b07ab17ced3a30ea7
type: view_submission
view:
app_id: A01BJF00CAD
hash: 1602539357.f6DHe3XD
id: V01CCCHC7U5
private_metadata: consultation
root_view_id: V01CCCHC7U5
state:
values:
acceptance_criteria:
BCC:
type: plain_text_input
value: Dinner is ordered and tasty
additional:
S47AD:
type: plain_text_input
value: ""
previous:
Y4r7m:
type: plain_text_input
value: Dinner has to be tasty and I can't make up my mind. Help?
requirement:
y1+:
type: plain_text_input
value: I need to order dinner.
title:
8YZh:
type: plain_text_input
value: Give Me a Consult
@@ -0,0 +1 @@
{"response_action":"update","view":{"type":"modal","title":{"type":"plain_text","text":"Creating Jira Issue..."},"blocks":[{"type":"section","text":{"type":"mrkdwn","text":"A Jira issue is being filed, please do not close this window..."}}],"private_metadata":"jira_pending"}}
@@ -0,0 +1,34 @@
trigger_id: 1416756610774.1377252349923.ff1a76bce3db8f1d6f892f75bcb25f58
type: view_submission
user:
id: U01B31ARZDG
view:
app_id: A01BJF00CAD
hash: 1602538261.7V8X4IBr
id: V01CU3D2A73
private_metadata: consultation
root_view_id: V01CU3D2A73
state:
values:
acceptance_criteria:
ec8:
type: plain_text_input
value: |-
something simple is done
I didn't have to do anything to achieve it
additional:
aPFdZ:
type: plain_text_input
value: I'll bug you forever while we work on this.
previous:
XwW0:
type: plain_text_input
value: I have tried nothing and looked at no docs.
requirement:
6v7u:
type: plain_text_input
value: I would like to do something really simple.
title:
xFGTt:
type: plain_text_input
value: Please Help Me

0 comments on commit 7440799

Please sign in to comment.