test: cleans up fields-relationship test suite (#11003)

The `fields-relationship` test suite is disorganized to the point of
being unusable. This makes it very difficult to digest at a high level
and add new tests.

This PR cleans it up in the following ways:

- Moves collection configs to their own standalone files
- Moves the seed function to its own file
- Consolidates collection slugs in their own file
- Uses generated types instead of defining them statically
- Wraps the `filterOptions` e2e tests within a describe block

Related, there are three distinct test suites where we manage
relationships: `relationships`, `fields-relationship`, and `fields >
relationships`. In the future we ought to consolidate at least two of
these. IMO the `fields > relationship` suite should remain in place for
general _component level_ UI tests for the field itself, whereas the
other suite could run the integration tests and test the more complex UI
patterns that exist outside of the field component.
This commit is contained in:
Jacob Fletcher
2025-02-05 17:03:35 -05:00
committed by GitHub
parent 09721d4c20
commit 694c76d51a
26 changed files with 821 additions and 660 deletions

View File

@@ -1439,6 +1439,8 @@ export interface RelationshipField {
| null;
relationToRow?: (string | null) | RowField;
relationToRowMany?: (string | RowField)[] | null;
disableRelation?: boolean | null;
filteredRelationship?: (string | null) | RelationshipField;
updatedAt: string;
createdAt: string;
}
@@ -3028,6 +3030,8 @@ export interface RelationshipFieldsSelect<T extends boolean = true> {
relationshipWithMinRows?: T;
relationToRow?: T;
relationToRowMany?: T;
disableRelation?: T;
filteredRelationship?: T;
updatedAt?: T;
createdAt?: T;
}