(
id: string,
operation: 'read' | 'write',
overrides: Partial<BlockState> = {}
)
| 59 | } |
| 60 | |
| 61 | function createJiraBlock( |
| 62 | id: string, |
| 63 | operation: 'read' | 'write', |
| 64 | overrides: Partial<BlockState> = {} |
| 65 | ): BlockState { |
| 66 | return createBlock(id, { |
| 67 | type: 'jira', |
| 68 | position: { x: 100, y: 100 }, |
| 69 | height: 100, |
| 70 | layout: { measuredWidth: 250, measuredHeight: 100 }, |
| 71 | subBlocks: { |
| 72 | operation: { |
| 73 | id: 'operation', |
| 74 | type: 'dropdown', |
| 75 | value: operation, |
| 76 | }, |
| 77 | domain: { |
| 78 | id: 'domain', |
| 79 | type: 'short-input', |
| 80 | value: 'company.atlassian.net', |
| 81 | }, |
| 82 | credential: { |
| 83 | id: 'credential', |
| 84 | type: 'oauth-input', |
| 85 | value: 'credential-1', |
| 86 | }, |
| 87 | }, |
| 88 | ...overrides, |
| 89 | }) |
| 90 | } |
| 91 | |
| 92 | describe('applyTargetedLayout', () => { |
| 93 | beforeEach(() => { |
no test coverage detected