fix: network params query name clash which was blocking type generation (#1490)
This commit is contained in:
parent
69db3fdecb
commit
3aca9207ed
@ -5,9 +5,9 @@ import { mockWalletContext } from '../../test-helpers/mocks';
|
||||
import { AppStateProvider } from '../../../../contexts/app-state/app-state-provider';
|
||||
import { VegaWalletContext } from '@vegaprotocol/wallet';
|
||||
import { MemoryRouter as Router } from 'react-router-dom';
|
||||
import { gql } from '@apollo/client';
|
||||
import type { NetworkParamsQuery } from '@vegaprotocol/web3';
|
||||
import type { MockedResponse } from '@apollo/client/testing';
|
||||
import { NETWORK_PARAMETERS_QUERY } from '@vegaprotocol/react-helpers';
|
||||
|
||||
jest.mock('@vegaprotocol/environment', () => ({
|
||||
useEnvironment: () => ({
|
||||
@ -17,14 +17,7 @@ jest.mock('@vegaprotocol/environment', () => ({
|
||||
|
||||
const updateMarketNetworkParamsQueryMock: MockedResponse<NetworkParamsQuery> = {
|
||||
request: {
|
||||
query: gql`
|
||||
query NetworkParams {
|
||||
networkParameters {
|
||||
key
|
||||
value
|
||||
}
|
||||
}
|
||||
`,
|
||||
query: NETWORK_PARAMETERS_QUERY,
|
||||
},
|
||||
result: {
|
||||
data: {
|
||||
|
@ -5,9 +5,9 @@ import { mockWalletContext } from '../../test-helpers/mocks';
|
||||
import { AppStateProvider } from '../../../../contexts/app-state/app-state-provider';
|
||||
import { VegaWalletContext } from '@vegaprotocol/wallet';
|
||||
import { MemoryRouter as Router } from 'react-router-dom';
|
||||
import { gql } from '@apollo/client';
|
||||
import type { NetworkParamsQuery } from '@vegaprotocol/web3';
|
||||
import type { MockedResponse } from '@apollo/client/testing';
|
||||
import { NETWORK_PARAMETERS_QUERY } from '@vegaprotocol/react-helpers';
|
||||
|
||||
jest.mock('@vegaprotocol/environment', () => ({
|
||||
useEnvironment: () => ({
|
||||
@ -17,14 +17,7 @@ jest.mock('@vegaprotocol/environment', () => ({
|
||||
|
||||
const updateMarketNetworkParamsQueryMock: MockedResponse<NetworkParamsQuery> = {
|
||||
request: {
|
||||
query: gql`
|
||||
query NetworkParams {
|
||||
networkParameters {
|
||||
key
|
||||
value
|
||||
}
|
||||
}
|
||||
`,
|
||||
query: NETWORK_PARAMETERS_QUERY,
|
||||
},
|
||||
result: {
|
||||
data: {
|
||||
|
@ -5,9 +5,9 @@ import { VegaWalletContext } from '@vegaprotocol/wallet';
|
||||
import { AppStateProvider } from '../../../../contexts/app-state/app-state-provider';
|
||||
import { mockWalletContext } from '../../test-helpers/mocks';
|
||||
import { ProposeNewAsset } from './propose-new-asset';
|
||||
import { gql } from '@apollo/client';
|
||||
import type { NetworkParamsQuery } from '@vegaprotocol/web3';
|
||||
import type { MockedResponse } from '@apollo/client/testing';
|
||||
import { NETWORK_PARAMETERS_QUERY } from '@vegaprotocol/react-helpers';
|
||||
|
||||
jest.mock('@vegaprotocol/environment', () => ({
|
||||
useEnvironment: () => ({
|
||||
@ -17,14 +17,7 @@ jest.mock('@vegaprotocol/environment', () => ({
|
||||
|
||||
const updateMarketNetworkParamsQueryMock: MockedResponse<NetworkParamsQuery> = {
|
||||
request: {
|
||||
query: gql`
|
||||
query NetworkParams {
|
||||
networkParameters {
|
||||
key
|
||||
value
|
||||
}
|
||||
}
|
||||
`,
|
||||
query: NETWORK_PARAMETERS_QUERY,
|
||||
},
|
||||
result: {
|
||||
data: {
|
||||
|
@ -1,4 +1,3 @@
|
||||
import { gql } from '@apollo/client';
|
||||
import { render, screen, waitFor } from '@testing-library/react';
|
||||
import { ProposeNewMarket } from './propose-new-market';
|
||||
import { MockedProvider } from '@apollo/client/testing';
|
||||
@ -8,6 +7,7 @@ import { VegaWalletContext } from '@vegaprotocol/wallet';
|
||||
import { BrowserRouter as Router } from 'react-router-dom';
|
||||
import type { MockedResponse } from '@apollo/client/testing';
|
||||
import type { NetworkParamsQuery } from '@vegaprotocol/web3';
|
||||
import { NETWORK_PARAMETERS_QUERY } from '@vegaprotocol/react-helpers';
|
||||
|
||||
jest.mock('@vegaprotocol/environment', () => ({
|
||||
useEnvironment: () => ({
|
||||
@ -17,14 +17,7 @@ jest.mock('@vegaprotocol/environment', () => ({
|
||||
|
||||
const newMarketNetworkParamsQueryMock: MockedResponse<NetworkParamsQuery> = {
|
||||
request: {
|
||||
query: gql`
|
||||
query NetworkParams {
|
||||
networkParameters {
|
||||
key
|
||||
value
|
||||
}
|
||||
}
|
||||
`,
|
||||
query: NETWORK_PARAMETERS_QUERY,
|
||||
},
|
||||
result: {
|
||||
data: {
|
||||
|
@ -9,18 +9,11 @@ import { ProposeUpdateMarket } from './propose-update-market';
|
||||
import type { NetworkParamsQuery } from '@vegaprotocol/web3';
|
||||
import { MARKETS_QUERY } from './propose-update-market';
|
||||
import type { ProposalMarketsQuery } from './__generated__/ProposalMarketsQuery';
|
||||
import { gql } from '@apollo/client';
|
||||
import { NETWORK_PARAMETERS_QUERY } from '@vegaprotocol/react-helpers';
|
||||
|
||||
const updateMarketNetworkParamsQueryMock: MockedResponse<NetworkParamsQuery> = {
|
||||
request: {
|
||||
query: gql`
|
||||
query NetworkParams {
|
||||
networkParameters {
|
||||
key
|
||||
value
|
||||
}
|
||||
}
|
||||
`,
|
||||
query: NETWORK_PARAMETERS_QUERY,
|
||||
},
|
||||
result: {
|
||||
data: {
|
||||
|
Loading…
Reference in New Issue
Block a user