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 tests and lint #6303

Merged
merged 6 commits into from
Jul 17, 2024
Merged

Fix tests and lint #6303

merged 6 commits into from
Jul 17, 2024

Conversation

charlesBochet
Copy link
Member

@charlesBochet charlesBochet commented Jul 17, 2024

Fixing tests and lint on main!

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

  • Removed setIsLoadedRecords function from useState hook in packages/twenty-front/src/modules/object-record/record-show/hooks/useRecordShowPagePagination.ts
  • Simplified state management for isLoadedRecords variable

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

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

(updates since last review)

  • Enabled logging in Jest configuration (packages/twenty-front/jest.config.ts)
  • Updated GraphQL query variables for pagination in tests (packages/twenty-front/src/modules/activities/hooks/__tests__/useActivityTargetsForTargetableObject.test.tsx)
  • Replaced Person and Company types with ObjectRecord in mock data (packages/twenty-front/src/testing/mock-data/activities.ts)

No major changes found since last review.

3 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

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

(updates since last review)

  • Changed silent option to true in Jest configuration to suppress test output (packages/twenty-front/jest.config.ts)

1 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

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

(updates since last review)

  • Added hasPreviousPage to pageInfo in useActivities.test.tsx for pagination testing (packages/twenty-front/src/modules/activities/hooks/__tests__/useActivities.test.tsx)
  • Included hasPreviousPage in useFetchAllRecordIds.ts for GraphQL pagination logic (packages/twenty-front/src/modules/object-record/hooks/__mocks__/useFetchAllRecordIds.ts)
  • Updated useFindManyRecordsQuery.test.tsx to check for hasPreviousPage in GraphQL query (packages/twenty-front/src/modules/object-record/hooks/__tests__/useFindManyRecordsQuery.test.tsx)

3 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

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

(updates since last review)

  • Adjusted global coverage thresholds for statements and lines in packages/twenty-front/jest.config.ts
  • Enhanced Storybook stories with detailed mock data in packages/twenty-front/src/modules/activities/tasks/__stories__/TaskList.stories.tsx
  • Added __typename field to ActivityTarget properties in packages/twenty-front/src/modules/activities/types/ActivityTarget.ts
  • Simplified mock data structure by removing type definitions in packages/twenty-front/src/testing/mock-data/activities.ts

4 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings

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

(updates since last review)

  • Reordered imports and added SnackBarProviderScope in packages/twenty-front/src/modules/activities/hooks/__tests__/useCreateActivityInDB.test.tsx
  • Updated mocked data structure for tasks and activities in packages/twenty-front/src/testing/mock-data/activities.ts for type safety

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

@@ -71,6 +71,7 @@ const mocks: MockedResponse[] = [
}
pageInfo {
hasNextPage
hasPreviousPage
Copy link
Contributor

@lucasbordeau lucasbordeau Jul 17, 2024

Choose a reason for hiding this comment

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

+1

@charlesBochet charlesBochet merged commit e6f6069 into main Jul 17, 2024
12 of 13 checks passed
@charlesBochet charlesBochet deleted the fix-tests-and-lint branch July 17, 2024 12:52
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.

2 participants