A click whose handler answers with `modal`, and what the adapter did with it.
(modal: ChatInteraction.OpenModal)
| 1482 | |
| 1483 | /** A click whose handler answers with `modal`, and what the adapter did with it. */ |
| 1484 | openModal(modal: ChatInteraction.OpenModal) { |
| 1485 | return Effect.gen({ self: this }, function*() { |
| 1486 | // A modal opens from a click, on a select when there are no buttons. |
| 1487 | const element = this.has("buttons") || !this.has("selects") |
| 1488 | ? conformanceButton(this.rule) |
| 1489 | : conformanceSelect(this.rule) |
| 1490 | const posted = yield* this.post({ actions: [element] }) |
| 1491 | this.recording.onClick = () => modal |
| 1492 | yield* this.click(posted.id, "conformance") |
| 1493 | return posted |
| 1494 | }) |
| 1495 | } |
| 1496 | |
| 1497 | has(capability: Capability) { |
| 1498 | return this.descriptor.capabilities.has(capability) |
no test coverage detected