feat(governance): change status labels for network upgrade proposals (#3711)
This commit is contained in:
parent
2d430710ab
commit
efeac49d58
@ -788,9 +788,9 @@
|
|||||||
"homeVegaTokenButtonText": "Manage tokens",
|
"homeVegaTokenButtonText": "Manage tokens",
|
||||||
"downloadProposalJson": "Download proposal as JSON",
|
"downloadProposalJson": "Download proposal as JSON",
|
||||||
"networkUpgrade": "Network Upgrade",
|
"networkUpgrade": "Network Upgrade",
|
||||||
"PROTOCOL_UPGRADE_PROPOSAL_STATUS_APPROVED": "Approved",
|
"PROTOCOL_UPGRADE_PROPOSAL_STATUS_APPROVED": "Approved by validators",
|
||||||
"PROTOCOL_UPGRADE_PROPOSAL_STATUS_PENDING": "Pending",
|
"PROTOCOL_UPGRADE_PROPOSAL_STATUS_PENDING": "Waiting for validator votes",
|
||||||
"PROTOCOL_UPGRADE_PROPOSAL_STATUS_REJECTED": "Rejected",
|
"PROTOCOL_UPGRADE_PROPOSAL_STATUS_REJECTED": "Declined by validators",
|
||||||
"PROTOCOL_UPGRADE_PROPOSAL_STATUS_UNSPECIFIED": "Unspecified",
|
"PROTOCOL_UPGRADE_PROPOSAL_STATUS_UNSPECIFIED": "Unspecified",
|
||||||
"vegaRelease{release}": "Vega Release {{release}}",
|
"vegaRelease{release}": "Vega Release {{release}}",
|
||||||
"upgradeBlockHeight": "Upgrade block height",
|
"upgradeBlockHeight": "Upgrade block height",
|
||||||
|
@ -32,7 +32,9 @@ describe('ProtocolUpgradeProposalDetailInfo', () => {
|
|||||||
|
|
||||||
it('should render the state', () => {
|
it('should render the state', () => {
|
||||||
const { getByTestId } = renderComponent();
|
const { getByTestId } = renderComponent();
|
||||||
expect(getByTestId('protocol-upgrade-state')).toHaveTextContent('Pending');
|
expect(getByTestId('protocol-upgrade-state')).toHaveTextContent(
|
||||||
|
'Waiting for validator votes'
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
it('should render the vega release tag', () => {
|
it('should render the vega release tag', () => {
|
||||||
|
@ -26,28 +26,34 @@ describe('ProtocolUpgradeProposalsListItem', () => {
|
|||||||
status:
|
status:
|
||||||
ProtocolUpgradeProposalStatus.PROTOCOL_UPGRADE_PROPOSAL_STATUS_REJECTED,
|
ProtocolUpgradeProposalStatus.PROTOCOL_UPGRADE_PROPOSAL_STATUS_REJECTED,
|
||||||
icon: 'protocol-upgrade-proposal-status-icon-rejected',
|
icon: 'protocol-upgrade-proposal-status-icon-rejected',
|
||||||
|
text: 'Declined by validators',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
status:
|
status:
|
||||||
ProtocolUpgradeProposalStatus.PROTOCOL_UPGRADE_PROPOSAL_STATUS_PENDING,
|
ProtocolUpgradeProposalStatus.PROTOCOL_UPGRADE_PROPOSAL_STATUS_PENDING,
|
||||||
icon: 'protocol-upgrade-proposal-status-icon-pending',
|
icon: 'protocol-upgrade-proposal-status-icon-pending',
|
||||||
|
text: 'Waiting for validator votes',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
status:
|
status:
|
||||||
ProtocolUpgradeProposalStatus.PROTOCOL_UPGRADE_PROPOSAL_STATUS_APPROVED,
|
ProtocolUpgradeProposalStatus.PROTOCOL_UPGRADE_PROPOSAL_STATUS_APPROVED,
|
||||||
icon: 'protocol-upgrade-proposal-status-icon-approved',
|
icon: 'protocol-upgrade-proposal-status-icon-approved',
|
||||||
|
text: 'Approved by validators',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
status:
|
status:
|
||||||
ProtocolUpgradeProposalStatus.PROTOCOL_UPGRADE_PROPOSAL_STATUS_UNSPECIFIED,
|
ProtocolUpgradeProposalStatus.PROTOCOL_UPGRADE_PROPOSAL_STATUS_UNSPECIFIED,
|
||||||
icon: 'protocol-upgrade-proposal-status-icon-unspecified',
|
icon: 'protocol-upgrade-proposal-status-icon-unspecified',
|
||||||
|
text: 'Unspecified',
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
statuses.forEach(({ status, icon }) => {
|
statuses.forEach(({ status, icon, text }) => {
|
||||||
renderComponent({ ...proposal, status });
|
renderComponent({ ...proposal, status });
|
||||||
const statusIcon = screen.getByTestId(icon);
|
const statusIcon = screen.getByTestId(icon);
|
||||||
|
const textContent = screen.getByText(text);
|
||||||
expect(statusIcon).toBeInTheDocument();
|
expect(statusIcon).toBeInTheDocument();
|
||||||
|
expect(textContent).toBeInTheDocument();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user