fix: remove validatingnodes from all queries (#2199)
* fix: remove validatingnodes from all queries * fix(explorer-e2e): remove assertion on validatingnodes
This commit is contained in:
parent
0a0d74dcbd
commit
22c1a4ad6a
@ -18,22 +18,21 @@ context('Home Page', function () {
|
||||
const statTitles = {
|
||||
0: 'Status',
|
||||
1: 'Height',
|
||||
2: 'Validating nodes',
|
||||
3: 'Uptime',
|
||||
4: 'Total nodes',
|
||||
5: 'Inactive nodes',
|
||||
6: 'Total staked',
|
||||
7: 'Backlog',
|
||||
8: 'Trades / second',
|
||||
9: 'Orders / block',
|
||||
10: 'Orders / second',
|
||||
11: 'Transactions / block',
|
||||
12: 'Block time',
|
||||
13: 'Time',
|
||||
14: 'App',
|
||||
15: 'Tendermint',
|
||||
16: 'Up since',
|
||||
17: 'Chain ID',
|
||||
2: 'Uptime',
|
||||
3: 'Total nodes',
|
||||
4: 'Inactive nodes',
|
||||
5: 'Total staked',
|
||||
6: 'Backlog',
|
||||
7: 'Trades / second',
|
||||
8: 'Orders / block',
|
||||
9: 'Orders / second',
|
||||
10: 'Transactions / block',
|
||||
11: 'Block time',
|
||||
12: 'Time',
|
||||
13: 'App',
|
||||
14: 'Tendermint',
|
||||
15: 'Up since',
|
||||
16: 'Chain ID',
|
||||
};
|
||||
|
||||
cy.get('[data-testid="stats-title"]')
|
||||
@ -41,41 +40,40 @@ context('Home Page', function () {
|
||||
cy.wrap($list).should('have.text', statTitles[index]);
|
||||
})
|
||||
.then(($list) => {
|
||||
cy.wrap($list).should('have.length', 18);
|
||||
cy.wrap($list).should('have.length', 17);
|
||||
});
|
||||
|
||||
cy.get(statsValue).eq(0).should('have.text', 'CONNECTED');
|
||||
cy.get(statsValue).eq(1).should('not.be.empty');
|
||||
cy.get(statsValue).eq(2).should('have.text', '2');
|
||||
cy.get(statsValue)
|
||||
.eq(3)
|
||||
.eq(2)
|
||||
.invoke('text')
|
||||
.should('match', /\d+d \d+h \d+m \d+s/i);
|
||||
cy.get(statsValue).eq(4).should('have.text', '2');
|
||||
cy.get(statsValue).eq(5).should('have.text', '0');
|
||||
cy.get(statsValue).eq(3).should('have.text', '2');
|
||||
cy.get(statsValue).eq(4).should('have.text', '0');
|
||||
cy.get(statsValue)
|
||||
.eq(6)
|
||||
.eq(5)
|
||||
.invoke('text')
|
||||
.should('match', /\d+\.\d\d(?!\d)/i);
|
||||
cy.get(statsValue).eq(6).should('have.text', '0');
|
||||
cy.get(statsValue).eq(7).should('have.text', '0');
|
||||
cy.get(statsValue).eq(8).should('have.text', '0');
|
||||
cy.get(statsValue).eq(9).should('have.text', '0');
|
||||
cy.get(statsValue).eq(10).should('have.text', '0');
|
||||
cy.get(statsValue).eq(10).should('not.be.empty');
|
||||
cy.get(statsValue).eq(11).should('not.be.empty');
|
||||
cy.get(statsValue).eq(12).should('not.be.empty');
|
||||
cy.get(statsValue).eq(13).should('not.be.empty');
|
||||
if (Cypress.env('NIGHTLY_RUN') != true) {
|
||||
cy.get(statsValue)
|
||||
.eq(14)
|
||||
.eq(13)
|
||||
.invoke('text')
|
||||
.should('match', /v\d+\.\d+\.\d+/i);
|
||||
}
|
||||
cy.get(statsValue)
|
||||
.eq(15)
|
||||
.eq(14)
|
||||
.invoke('text')
|
||||
.should('match', /\d+\.\d+\.\d+/i);
|
||||
cy.get(statsValue).eq(15).should('not.be.empty');
|
||||
cy.get(statsValue).eq(16).should('not.be.empty');
|
||||
cy.get(statsValue).eq(17).should('not.be.empty');
|
||||
});
|
||||
|
||||
it('Block height should be updating', function () {
|
||||
|
@ -77,7 +77,6 @@ const MOCK_NODES = {
|
||||
stakedTotal: '27842509718651285145924',
|
||||
totalNodes: 3,
|
||||
inactiveNodes: 0,
|
||||
validatingNodes: 3,
|
||||
uptime: 1560.266845703125,
|
||||
__typename: 'NodeData',
|
||||
},
|
||||
@ -177,7 +176,6 @@ describe('Nodes list', () => {
|
||||
stakedTotal: '9618711883996159534058',
|
||||
totalNodes: 1,
|
||||
inactiveNodes: 0,
|
||||
validatingNodes: 1,
|
||||
uptime: 1560.266845703125,
|
||||
__typename: 'NodeData',
|
||||
},
|
||||
|
@ -60,7 +60,6 @@ query Staking($partyId: ID!) {
|
||||
stakedTotal
|
||||
totalNodes
|
||||
inactiveNodes
|
||||
validatingNodes
|
||||
uptime
|
||||
}
|
||||
}
|
||||
|
@ -76,7 +76,6 @@ export const StakingDocument = gql`
|
||||
stakedTotal
|
||||
totalNodes
|
||||
inactiveNodes
|
||||
validatingNodes
|
||||
uptime
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,6 @@ query Stats {
|
||||
stakedTotal
|
||||
totalNodes
|
||||
inactiveNodes
|
||||
validatingNodes
|
||||
}
|
||||
statistics {
|
||||
status
|
||||
|
@ -15,7 +15,6 @@ export const StatsDocument = gql`
|
||||
stakedTotal
|
||||
totalNodes
|
||||
inactiveNodes
|
||||
validatingNodes
|
||||
}
|
||||
statistics {
|
||||
status
|
||||
|
@ -48,13 +48,6 @@ export const statsFields: { [key in keyof Stats]: StatFields[] } = {
|
||||
description: t('The total number of nodes registered on the network'),
|
||||
},
|
||||
],
|
||||
validatingNodes: [
|
||||
{
|
||||
title: t('Validating nodes'),
|
||||
promoted: true,
|
||||
description: t('Nodes participating in consensus'),
|
||||
},
|
||||
],
|
||||
inactiveNodes: [
|
||||
{
|
||||
title: t('Inactive nodes'),
|
||||
|
@ -1,11 +1,7 @@
|
||||
import type { Schema } from '@vegaprotocol/types';
|
||||
import type { StatsQuery } from '../components/stats-manager/__generated__/Stats';
|
||||
|
||||
type NodeDataKeys =
|
||||
| 'stakedTotal'
|
||||
| 'totalNodes'
|
||||
| 'inactiveNodes'
|
||||
| 'validatingNodes';
|
||||
type NodeDataKeys = 'stakedTotal' | 'totalNodes' | 'inactiveNodes';
|
||||
|
||||
export type Stats = Pick<Schema.NodeData, NodeDataKeys> &
|
||||
Omit<StatsQuery['statistics'], '__typename'>;
|
||||
|
2
libs/types/src/__generated__/types.ts
generated
2
libs/types/src/__generated__/types.ts
generated
@ -1947,8 +1947,6 @@ export type NodeData = {
|
||||
totalNodes: Scalars['Int'];
|
||||
/** Total uptime for all epochs across all nodes. Or specify a number of epochs */
|
||||
uptime: Scalars['Float'];
|
||||
/** Number of nodes validating */
|
||||
validatingNodes: Scalars['Int'];
|
||||
};
|
||||
|
||||
/** Edge type containing the node and cursor information returned by a NodesConnection */
|
||||
|
Loading…
Reference in New Issue
Block a user