Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix all broken CIs #7439

Merged
merged 31 commits into from
Oct 4, 2024
Merged

Fix all broken CIs #7439

merged 31 commits into from
Oct 4, 2024

Conversation

charlesBochet
Copy link
Member

@charlesBochet charlesBochet commented Oct 4, 2024

Fix all the broken CIs :p

image

This includes an ongoing effort to simplify test maintenance by having 1 unique source of truth about metadata and data mocks (that will later be generated from a unique source of seeds: dev = demo = test)

Regressions:

  • Unit line coverage: 60 > 55
  • Storybook Pages branch coverage: 40 > 35
    We will need to write tests to increase those coverage
  • RelationFieldDisplay perf: 0.2ms to 0.22ms > We might have a regression here
  • Removed perf story about RawJSON > We will need to re-add it

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

PR Summary

This pull request focuses on refactoring and improving test files across multiple modules, with a particular emphasis on standardizing test setups and updating GraphQL fragments.

  • Introduced getJestMetadataAndApolloMocksWrapper utility function to simplify and standardize test setups across multiple test files
  • Updated GraphQL fragments in personFragments.ts, replacing PERSON_FRAGMENT with more specific PERSON_FRAGMENT_WITH_DEPTH_ZERO_RELATIONS and PERSON_FRAGMENT_WITH_DEPTH_ONE_RELATIONS
  • Modified mapObjectMetadataToGraphQLQuery in packages/twenty-front/src/modules/object-metadata/utils/mapObjectMetadataToGraphQLQuery.ts to sort fields alphabetically for consistent query generation
  • Improved object metadata matching in getRecordNodeFromRecord function within packages/twenty-front/src/modules/object-record/cache/utils/getRecordNodeFromRecord.ts
  • Removed unnecessary imports and simplified test structures across multiple test files, improving maintainability and readability

30 file(s) reviewed, 2 comment(s)
Edit PR Review Bot Settings

id
intro
jobTitle
linkedinLink{
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

syntax: There's an inconsistent space after 'linkedinLink'

}
`

export const PERSON_FRAGMENT_WITH_DEPTH_ONE_RELATIONS = `
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

style: This fragment is quite large and may impact query performance. Consider splitting it into smaller, more focused fragments

@charlesBochet charlesBochet merged commit 33f5ef7 into main Oct 4, 2024
17 checks passed
@charlesBochet charlesBochet deleted the fix-tests-n branch October 4, 2024 22:22
charlesBochet added a commit that referenced this pull request Oct 4, 2024
Fix all the broken CIs :p

This includes an ongoing effort to simplify test maintenance by having 1
unique source of truth about metadata and data mocks (that will later be
generated from a unique source of seeds: dev = demo = test)

Regressions:
- Unit line coverage: 60 > 55
- Storybook Pages branch coverage: 40 > 35
We will need to write tests to increase those coverage
- RelationFieldDisplay perf: 0.2ms to 0.22ms > We might have a
regression here
- Removed perf story about RawJSON > We will need to re-add it
@charlesBochet charlesBochet changed the title Fix tests n Fix all broken CIs Oct 4, 2024
harshit078 pushed a commit to harshit078/twenty that referenced this pull request Oct 14, 2024
Fix all the broken CIs :p

This includes an ongoing effort to simplify test maintenance by having 1
unique source of truth about metadata and data mocks (that will later be
generated from a unique source of seeds: dev = demo = test)

Regressions:
- Unit line coverage: 60 > 55
- Storybook Pages branch coverage: 40 > 35
We will need to write tests to increase those coverage
- RelationFieldDisplay perf: 0.2ms to 0.22ms > We might have a
regression here
- Removed perf story about RawJSON > We will need to re-add it
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant