Turn filter action into conditions (#13005)
Previous logic was using the previous step output and filtering items that were passing filters. What we actually want is: - send filters, right operand being always a step output key, left operand being either a key, either a value - resolve those filter variables - apply the filters to decide whether the condition is passed or not
This commit is contained in:
@ -69,8 +69,16 @@ describe('deleteManyObjectRecordsPermissions', () => {
|
||||
expect(response.body.data).toBeDefined();
|
||||
expect(response.body.data.deletePeople).toBeDefined();
|
||||
expect(response.body.data.deletePeople).toHaveLength(2);
|
||||
expect(response.body.data.deletePeople[0].id).toBe(personId1);
|
||||
expect(response.body.data.deletePeople[1].id).toBe(personId2);
|
||||
expect(
|
||||
response.body.data.deletePeople.some(
|
||||
(person: { id: string }) => person.id === personId1,
|
||||
),
|
||||
).toBe(true);
|
||||
expect(
|
||||
response.body.data.deletePeople.some(
|
||||
(person: { id: string }) => person.id === personId2,
|
||||
),
|
||||
).toBe(true);
|
||||
});
|
||||
|
||||
it('should delete multiple object records when executed by api key', async () => {
|
||||
|
||||
@ -68,7 +68,15 @@ describe('destroyManyObjectRecordsPermissions', () => {
|
||||
expect(response.body.data).toBeDefined();
|
||||
expect(response.body.data.destroyPeople).toBeDefined();
|
||||
expect(response.body.data.destroyPeople).toHaveLength(2);
|
||||
expect(response.body.data.destroyPeople[0].id).toBe(personId1);
|
||||
expect(response.body.data.destroyPeople[1].id).toBe(personId2);
|
||||
expect(
|
||||
response.body.data.destroyPeople.some(
|
||||
(person: { id: string }) => person.id === personId1,
|
||||
),
|
||||
).toBe(true);
|
||||
expect(
|
||||
response.body.data.destroyPeople.some(
|
||||
(person: { id: string }) => person.id === personId2,
|
||||
),
|
||||
).toBe(true);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user