Skip to content

Commit

Permalink
fix: REST getForm returns a flattened shape of the form compared to G…
Browse files Browse the repository at this point in the history
…raphQL
  • Loading branch information
pepopowitz committed Dec 7, 2023
1 parent 0c28feb commit 58ec6d1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,10 +85,10 @@ describe('TasklistRESTClient', () => {
expect(task.id).toBe(id)
})

it('can retrieve an embedded form', async () => {
it.only('can retrieve an embedded form', async () => {
const tasklist = new TasklistRESTClient()
const res = await tasklist.getForm('userTaskForm_3r97fja', def.processes[0].processDefinitionKey)
expect(res.form.id).toBe('userTaskForm_3r97fja')
expect(res.id).toBe('userTaskForm_3r97fja')
})

it('can claim a task', async () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ export class TasklistRESTClient {
* @param formId
* @param processDefinitionKey
*/
public async getForm(formId: string, processDefinitionKey: string): Promise<{ form: Form }> {
public async getForm(formId: string, processDefinitionKey: string): Promise<Form> {
const headers = await this.getHeaders()
return this.rest
.get(`forms/${formId}`, {
Expand Down

0 comments on commit 58ec6d1

Please sign in to comment.