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:
Thomas Trompette
2025-07-02 17:29:52 +02:00
committed by GitHub
parent 9f0b8809cb
commit b59235409e
11 changed files with 1036 additions and 643 deletions

View File

@ -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 () => {

View File

@ -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);
});
});