Refactor tests command menu (#1702)

* Fix tests

* Refactor tests command menu

* Improve tests

* Fix optimistic render breaking tests
This commit is contained in:
Charles Bochet
2023-09-21 11:53:36 -07:00
committed by GitHub
parent b5b46f923a
commit 7ce03ffdd1
10 changed files with 100 additions and 464 deletions

View File

@ -28,6 +28,8 @@ export const BASE_ACCOUNT_OWNER_FRAGMENT = gql`
`;
export const COMPANY_FIELDS_FRAGMENT = gql`
${BASE_COMPANY_FIELDS_FRAGMENT}
${BASE_ACCOUNT_OWNER_FRAGMENT}
fragment companyFieldsFragment on Company {
accountOwner {
...baseAccountOwnerFragment

View File

@ -1,9 +1,11 @@
import { Company, GetCompaniesDocument } from '~/generated/graphql';
import { Company } from '~/generated/graphql';
import { GET_COMPANIES } from '../queries/getCompanies';
export const getCompaniesOptimisticEffectDefinition = {
key: 'generic-entity-table-data-companies',
typename: 'Company',
query: GetCompaniesDocument,
query: GET_COMPANIES,
resolver: ({
currentData,
newData,

View File

@ -1,6 +1,9 @@
import { gql } from '@apollo/client';
import { COMPANY_FIELDS_FRAGMENT } from '../fragments/companyFieldsFragment';
export const GET_COMPANIES = gql`
${COMPANY_FIELDS_FRAGMENT}
query GetCompanies(
$orderBy: [CompanyOrderByWithRelationInput!]
$where: CompanyWhereInput