From 9eb45c682ec9298de8bad38ff66071779e5fe1ef Mon Sep 17 00:00:00 2001 From: Fabian Date: Thu, 13 Dec 2018 13:13:44 +0100 Subject: [PATCH] Fabo/gaia 0.28.0 rc2 (#1725) * added e2e tests for balance updates for governance * moved to 0.28.0-rc0 * start nodes with minFee * updated snapshots * fixed test * updated denom specific test errors * remove min fee for now * fixed create-validator command * fixed denoms in e2e tests * fixed denom issues * fixed all e2e tests * fixed tx querying tests * removed commented code * increase timeout on balance check for delegation * incremented timeout more * implemented feedback * fixed bug where the address is not present for the balance header at start * added delegation to update balance * increase timeout for balance check * switched to depositor * testing stake with wait --- CHANGELOG.md | 1 + app/src/main/index.js | 11 ++- .../renderer/components/common/TmBalance.vue | 2 +- .../components/governance/PageGovernance.vue | 4 +- .../components/governance/PageProposal.vue | 8 +- .../renderer/components/wallet/PageWallet.vue | 4 +- app/src/renderer/connectors/lcdClient.js | 23 ++---- app/src/renderer/connectors/lcdClientMock.js | 72 +++++++++--------- app/src/renderer/vuex/modules/config.js | 2 +- app/src/renderer/vuex/modules/delegation.js | 2 +- .../vuex/modules/governance/deposits.js | 2 +- app/src/renderer/vuex/modules/wallet.js | 4 +- tasks/build/Gaia/COMMIT.sh | 2 +- tasks/gaia.js | 17 +++-- test/e2e/delegation.js | 26 +++---- test/e2e/governance.js | 11 ++- test/e2e/wallet.js | 4 +- .../PagePreferences.spec.js.snap | 4 +- .../__snapshots__/TmBalance.spec.js.snap | 4 +- .../__snapshots__/TmOnboarding.spec.js.snap | 2 +- .../governance/PageGovernance.spec.js | 4 +- .../governance/PageProposal.spec.js | 2 +- .../__snapshots__/PageGovernance.spec.js.snap | 16 ++-- .../__snapshots__/PageProposal.spec.js.snap | 10 +-- .../DelegationModal.spec.js.snap | 2 +- .../__snapshots__/PageStaking.spec.js.snap | 8 +- .../__snapshots__/PageValidator.spec.js.snap | 24 +++--- .../__snapshots__/TabParameters.spec.js.snap | 6 +- .../__snapshots__/TabValidators.spec.js.snap | 4 +- .../TableValidators.spec.js.snap | 4 +- .../UndelegationModal.spec.js.snap | 2 +- .../components/wallet/PageWallet.spec.js | 8 +- .../__snapshots__/PageSend.spec.js.snap | 32 ++++---- .../PageTransactions.spec.js.snap | 20 ++--- .../__snapshots__/PageWallet.spec.js.snap | 20 ++--- test/unit/specs/lcdClient.spec.js | 8 +- test/unit/specs/lcdClientMock.spec.js | 76 +++++++++---------- test/unit/specs/main.spec.js | 9 +-- .../__snapshots__/delegation.spec.js.snap | 4 +- .../__snapshots__/transactions.spec.js.snap | 16 ++-- .../specs/store/governance/deposits.spec.js | 2 +- 41 files changed, 241 insertions(+), 241 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a7a1596e23..0254bf6e7a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -46,6 +46,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - [\#1681](https://github.com/cosmos/voyager/issues/1681) Governance: Fixed voting starting date @sabau - [\#1690](https://github.com/cosmos/voyager/issues/1690) Governance: Fixed error messages for maxLength @sabau - [\#1690](https://github.com/cosmos/voyager/issues/1690) Feedbacks when Amount is not between valid thresholds @sabau +- Added compatibility to Gaia/SDK version 0.28.0-rc2 @faboweb - [\#1673](https://github.com/cosmos/voyager/issues/1673) Documentation and single command to run one or all tests with fallback for end to end test @sabau - [\#1683](https://github.com/cosmos/voyager/issues/1683) Governance: block voting twice for the same option @sabau diff --git a/app/src/main/index.js b/app/src/main/index.js index 68d8500542..d56cf98bf9 100644 --- a/app/src/main/index.js +++ b/app/src/main/index.js @@ -272,10 +272,13 @@ async function startLCD(home, nodeURL) { ]) logProcess(child, join(home, `lcd.log`)) - child.stdout.once(`line`, async line => { - const certPath = /\(cert: "(.+?)"/.exec(line)[1] - resolve({ ca: fs.readFileSync(certPath, `utf8`), process: child }) - lcdStarted = true + child.stdout.on(`line`, line => { + if (/\(cert: "(.+?)"/.test(line)) { + const certPath = /\(cert: "(.+?)"/.exec(line)[1] + resolve({ ca: fs.readFileSync(certPath, `utf8`), process: child }) + lcdStarted = true + child.stdout.removeAllListeners(`line`) + } }) child.stderr.on(`line`, error => { diff --git a/app/src/renderer/components/common/TmBalance.vue b/app/src/renderer/components/common/TmBalance.vue index 60831cfc7e..3ae6efc92c 100644 --- a/app/src/renderer/components/common/TmBalance.vue +++ b/app/src/renderer/components/common/TmBalance.vue @@ -13,7 +13,7 @@

{{ unbondedAtoms }}

- +
@@ -79,7 +79,7 @@ export default { type, initial_deposit: [ { - denom: this.bondingDenom.toLowerCase(), + denom: this.bondingDenom, amount: String(amount) } ], diff --git a/app/src/renderer/components/governance/PageProposal.vue b/app/src/renderer/components/governance/PageProposal.vue index a140aa72ca..8c20e967d7 100644 --- a/app/src/renderer/components/governance/PageProposal.vue +++ b/app/src/renderer/components/governance/PageProposal.vue @@ -113,7 +113,7 @@ :show-modal-deposit.sync="showModalDeposit" :proposal-id="proposalId" :proposal-title="proposal.title" - :denom="bondingDenom.toLowerCase()" + :denom="bondingDenom" @submitDeposit="deposit" /> includes(coin.denom.toLowerCase(), query)) + return list.filter(coin => + includes(JSON.stringify(coin).toLowerCase(), query.toLowerCase()) + ) } else { return list } diff --git a/app/src/renderer/connectors/lcdClient.js b/app/src/renderer/connectors/lcdClient.js index 15bda827c1..250ede86cf 100644 --- a/app/src/renderer/connectors/lcdClient.js +++ b/app/src/renderer/connectors/lcdClient.js @@ -80,8 +80,8 @@ const Client = (axios, localLcdURL, remoteLcdURL) => { }, txs: function(addr) { return Promise.all([ - req(`GET`, `/txs?tag=sender_bech32='${addr}'`, true)(), - req(`GET`, `/txs?tag=recipient_bech32='${addr}'`, true)() + req(`GET`, `/txs?sender=${addr}`, true)(), + req(`GET`, `/txs?recipient=${addr}`, true)() ]).then(([senderTxs, recipientTxs]) => [].concat(senderTxs, recipientTxs)) }, tx: argReq(`GET`, `/txs`, ``, true), @@ -199,19 +199,12 @@ const Client = (axios, localLcdURL, remoteLcdURL) => { return req(`POST`, `/gov/proposals/${proposalId}/deposits`, true)(data) }, getGovernanceTxs: async function(address) { - let [depositerTxs, proposerTxs] = await Promise.all([ - req( - `GET`, - `/txs?tag=action='submit-proposal'&tag=proposer='${address}'`, - true - )(), - req( - `GET`, - `/txs?tag=action='deposit'&tag=depositer='${address}'`, - true - )() - ]) - return depositerTxs.concat(proposerTxs) + return await Promise.all([ + req(`GET`, `/txs?action=submit-proposal&proposer=${address}`, true)(), + req(`GET`, `/txs?action=deposit&depositor=${address}`, true)() + ]).then(([depositorTxs, proposerTxs]) => + [].concat(depositorTxs, proposerTxs) + ) } } } diff --git a/app/src/renderer/connectors/lcdClientMock.js b/app/src/renderer/connectors/lcdClientMock.js index bcbf60c03a..cd1cde058c 100644 --- a/app/src/renderer/connectors/lcdClientMock.js +++ b/app/src/renderer/connectors/lcdClientMock.js @@ -35,7 +35,7 @@ let state = { amount: `2300` }, { - denom: `steak`, + denom: `STAKE`, amount: `1000` } ], @@ -135,7 +135,7 @@ let state = { description: `This is a test proposal`, initial_deposit: [ { - denom: `steak`, + denom: `STAKE`, amount: `100` } ] @@ -155,11 +155,11 @@ let state = { { type: `cosmos-sdk/MsgDeposit`, value: { - depositer: `cosmos15ky9du8a2wlstz6fpx3p4mqpjyrm5ctpesxxn9`, + depositor: `cosmos15ky9du8a2wlstz6fpx3p4mqpjyrm5ctpesxxn9`, proposal_id: `1`, amount: [ { - denom: `steak`, + denom: `STAKE`, amount: `100` } ] @@ -180,7 +180,7 @@ let state = { delegator_addr: addresses[0], delegation: { amount: `24`, - denom: `steak` + denom: `STAKE` } } } @@ -304,7 +304,7 @@ let state = { stakingParameters: { unbonding_time: `259200000000000`, max_validators: 100, - bond_denom: `steak` + bond_denom: `STAKE` }, governanceParameters: { deposit: { @@ -340,13 +340,13 @@ let state = { description: `Proposal description`, initial_deposit: [ { - denom: `steak`, + denom: `STAKE`, amount: `100` } ], total_deposit: [ { - denom: `steak`, + denom: `STAKE`, amount: `100` } ], @@ -369,13 +369,13 @@ let state = { description: `custom text proposal description`, initial_deposit: [ { - denom: `steak`, + denom: `STAKE`, amount: `200` } ], total_deposit: [ { - denom: `steak`, + denom: `STAKE`, amount: `200` } ], @@ -398,13 +398,13 @@ let state = { description: `custom text proposal description`, initial_deposit: [ { - denom: `steak`, + denom: `STAKE`, amount: `20` } ], total_deposit: [ { - denom: `steak`, + denom: `STAKE`, amount: `170` } ], @@ -493,24 +493,24 @@ let state = { 1: [ { proposal_id: `1`, - depositer: validators[0], + depositor: validators[0], amount: [ { - denom: `steak`, + denom: `STAKE`, amount: `15` }, { - denom: `steak`, + denom: `STAKE`, amount: `5` } ] }, { proposal_id: `1`, - depositer: validators[1], + depositor: validators[1], amount: [ { - denom: `steak`, + denom: `STAKE`, amount: `5` } ] @@ -519,10 +519,10 @@ let state = { 2: [ { proposal_id: `2`, - depositer: validators[0], + depositor: validators[0], amount: [ { - denom: `steak`, + denom: `STAKE`, amount: `200` } ] @@ -531,20 +531,20 @@ let state = { 5: [ { proposal_id: `5`, - depositer: validators[0], + depositor: validators[0], amount: [ { - denom: `steak`, + denom: `STAKE`, amount: `20` } ] }, { proposal_id: `5`, - depositer: validators[1], + depositor: validators[1], amount: [ { - denom: `steak`, + denom: `STAKE`, amount: `150` } ] @@ -553,10 +553,10 @@ let state = { 6: [ { proposal_id: `6`, - depositer: validators[0], + depositor: validators[0], amount: [ { - denom: `steak`, + denom: `STAKE`, amount: `100` } ] @@ -1035,7 +1035,7 @@ module.exports = { results = await this.submitProposalDeposit({ base_req, proposal_id, - depositer: proposer, + depositor: proposer, amount: initial_deposit }) // remove proposal from state if it fails @@ -1056,13 +1056,13 @@ module.exports = { }, async getProposalDeposit(proposalId, address) { return state.deposits[proposalId].find( - deposit => deposit.depositer === address + deposit => deposit.depositor === address ) }, async submitProposalDeposit({ proposal_id, base_req: { name, sequence }, - depositer, + depositor, amount }) { let results = [] @@ -1098,7 +1098,7 @@ module.exports = { let coin let submittedDeposit = { proposal_id, - depositer, + depositor, amount } @@ -1116,7 +1116,7 @@ module.exports = { return results } - // update depositer's balance + // update depositor's balance coinBalance.amount -= depositCoinAmt // ============= TOTAL PROPOSAL's DEPOSIT ============= @@ -1134,15 +1134,15 @@ module.exports = { } // ============= USER'S DEPOSITS ============= - // check if there's an existing deposit by the depositer + // check if there's an existing deposit by the depositor let prevDeposit = state.deposits[proposal_id] && state.deposits[proposal_id].find( - deposit => deposit.depositer === depositer + deposit => deposit.depositor === depositor ) if (!prevDeposit) { - // if no previous deposit by the depositer, we add it to the existing deposits + // if no previous deposit by the depositor, we add it to the existing deposits if (!state.deposits[proposal_id]) state.deposits[proposal_id] = [] state.deposits[proposal_id].push(submittedDeposit) break // break since no need to iterate over other coins @@ -1155,7 +1155,7 @@ module.exports = { if (!prevDepCoin) { prevDeposit.amount.push(coin) } else { - // there's a previous deposit from the depositer with the same coin + // there's a previous deposit from the depositor with the same coin let newAmt = parseInt(prevDepCoin.amount) + parseInt(coin.amount) prevDepCoin.amount = String(newAmt) } @@ -1168,7 +1168,7 @@ module.exports = { if (proposal.proposal_status === `DepositPeriod`) { // TODO: get min deposit denom from gov params instead of stake params let depositCoinAmt = proposal.total_deposit.find(coin => { - return coin.denom === `steak` + return coin.denom === `STAKE` }).amount // TODO: get min deposit amount from gov params if (parseInt(depositCoinAmt) >= 10) { @@ -1268,7 +1268,7 @@ module.exports = { if (type === `cosmos-sdk/MsgSubmitProposal`) { return tx.tx.value.msg[0].value.proposer === addr } else if (type === `cosmos-sdk/MsgDeposit`) { - return tx.tx.value.msg[0].value.depositer === addr + return tx.tx.value.msg[0].value.depositor === addr } return false diff --git a/app/src/renderer/vuex/modules/config.js b/app/src/renderer/vuex/modules/config.js index d0dac0bf27..f5bd85934d 100644 --- a/app/src/renderer/vuex/modules/config.js +++ b/app/src/renderer/vuex/modules/config.js @@ -12,7 +12,7 @@ export default () => { ? JSON.parse(process.env.PREVIEW) : process.env.NODE_ENV === `development`, // TODO: change to atom - bondingDenom: `Steak`, + bondingDenom: `STAKE`, modals: { error: { active: false }, help: { active: false }, diff --git a/app/src/renderer/vuex/modules/delegation.js b/app/src/renderer/vuex/modules/delegation.js index 4c43b32e47..1621cd41c8 100644 --- a/app/src/renderer/vuex/modules/delegation.js +++ b/app/src/renderer/vuex/modules/delegation.js @@ -168,7 +168,7 @@ export default ({ node }) => { }, { stakingTransactions, password } ) { - const denom = config.bondingDenom.toLowerCase() + const denom = config.bondingDenom const delegatorAddr = wallet.address // delegations = [], unbondings = [], redelegations = [] diff --git a/app/src/renderer/vuex/modules/governance/deposits.js b/app/src/renderer/vuex/modules/governance/deposits.js index 866dac4bc5..13f6ed8ce6 100644 --- a/app/src/renderer/vuex/modules/governance/deposits.js +++ b/app/src/renderer/vuex/modules/governance/deposits.js @@ -45,7 +45,7 @@ export default ({ node }) => { type: `submitProposalDeposit`, to: proposal_id, proposal_id, - depositer: wallet.address, + depositor: wallet.address, amount, password }) diff --git a/app/src/renderer/vuex/modules/wallet.js b/app/src/renderer/vuex/modules/wallet.js index 7512858d5b..b3887c0628 100644 --- a/app/src/renderer/vuex/modules/wallet.js +++ b/app/src/renderer/vuex/modules/wallet.js @@ -71,7 +71,7 @@ export default ({ node }) => { commit(`setAccountNumber`, res.account_number) commit(`setWalletBalances`, coins) for (let coin of coins) { - if (coin.denom === rootState.config.bondingDenom.toLowerCase()) { + if (coin.denom === rootState.config.bondingDenom) { commit(`setAtoms`, parseFloat(coin.amount)) break } @@ -159,7 +159,7 @@ export default ({ node }) => { `tm.event = 'Tx' AND sender = '${state.address}'`, `tm.event = 'Tx' AND recipient = '${state.address}'`, `tm.event = 'Tx' AND proposer = '${state.address}'`, - `tm.event = 'Tx' AND depositer = '${state.address}'`, + `tm.event = 'Tx' AND depositor = '${state.address}'`, `tm.event = 'Tx' AND delegator = '${state.address}'`, `tm.event = 'Tx' AND voter = '${state.address}'` ] diff --git a/tasks/build/Gaia/COMMIT.sh b/tasks/build/Gaia/COMMIT.sh index d3880e959e..f72818a3ce 100755 --- a/tasks/build/Gaia/COMMIT.sh +++ b/tasks/build/Gaia/COMMIT.sh @@ -2,5 +2,5 @@ # This is the commit of the SDK version to use for building Gaia. We use an # explicit hash instead of a tag so we don't have to trust GitHub. -export COMMIT=bb54a0de127e45713f272217f578c0abe53a5b21 +export COMMIT=945803d586b83d65547cd16f4cd5994eac2957ea diff --git a/tasks/gaia.js b/tasks/gaia.js index f52fee8aef..b20f1a36a4 100644 --- a/tasks/gaia.js +++ b/tasks/gaia.js @@ -61,7 +61,7 @@ async function initGenesis( address, coins: [ { - denom: `steak`, + denom: `STAKE`, amount: `150` }, { @@ -74,7 +74,8 @@ async function initGenesis( await makeExecWithInputs( `${nodeBinary} gentx --name ${keyName} --home ${nodeHomeDir} --home-client ${clientHomeDir}`, - [password] + [password], + false ) await makeExec(`${nodeBinary} collect-gentxs --home ${nodeHomeDir}`) @@ -104,7 +105,7 @@ async function makeValidator( ) { let valPubKey = await getValPubKey(nodeHome) let { address: operatorAddress } = await createKey(operatorSignInfo) - await sendTokens(mainSignInfo, `10steak`, operatorAddress) + await sendTokens(mainSignInfo, `10STAKE`, operatorAddress) while (true) { console.log(`Waiting for funds to delegate`) try { @@ -145,10 +146,10 @@ async function declareValidator( operatorAddress ) { let command = - `${cliBinary} tx create-validator` + + `${cliBinary} tx stake create-validator` + ` --home ${clientHomeDir}` + ` --from ${keyName}` + - ` --amount=10steak` + + ` --amount=10STAKE` + ` --pubkey=${valPubKey}` + ` --address-delegator=${operatorAddress}` + ` --moniker=${moniker}` + @@ -185,7 +186,7 @@ function startLocalNode( nodeOneId = `` ) { return new Promise((resolve, reject) => { - let command = `${nodeBinary} start --home ${nodeHome}` + let command = `${nodeBinary} start --home ${nodeHome}` // TODO add --minimum_fees 1STAKE here if (number > 1) { // setup different ports command += ` --p2p.laddr=tcp://0.0.0.0:${defaultStartPort - @@ -216,7 +217,7 @@ function startLocalNode( function listener(data) { let msg = data.toString() - if (msg.includes(`Block{`)) { + if (msg.includes(`Executed block`)) { localnodeProcess.stdout.removeListener(`data`, listener) console.log(`Node ` + number + ` is running`) clearTimeout(timeout) @@ -260,7 +261,7 @@ function makeExecWithInputs(command, inputs = [], json = true) { }) let resolved = false - child.stdout.once(`data`, data => { + child.stderr.once(`data`, data => { if (resolved) return resolved = true resolve(json ? JSON.parse(data) : data) diff --git a/test/e2e/delegation.js b/test/e2e/delegation.js index e3823b200c..c89a1a0219 100644 --- a/test/e2e/delegation.js +++ b/test/e2e/delegation.js @@ -49,16 +49,13 @@ test(`delegation`, async function(t) { .isVisible(), `show validator 3` ) - let myVotesText = await app.client - .$(`.li-validator__delegated-steak`) - .getText() - let myVotes = parseFloat(myVotesText.replace(/,/g, ``)) - await t.equal( - myVotes, - parseFloat(bondedStake), - `show my stake in the validator` - ) + // check if my stake in the validator is correct + await waitForText( + () => app.client.$(`.li-validator__delegated-steak`), + `${bondedStake}.0000…`, + 10 * 10000 + ) t.end() }) @@ -90,19 +87,20 @@ test(`delegation`, async function(t) { `//*[@id = 'delegation-modal']//button//*[. = 'Confirm Delegation']` ) .waitForVisible( - `//*[. = 'You have successfully delegated your Steaks']`, + `//*[. = 'You have successfully delegated your STAKEs']`, 5 * 1000 ) // Go back to Staking page. .click(`//a//*[. = 'Staking']`) - // there was a bug that updated the balances in a way that it would show more atoms, - // then the users has + console.log(`Testing total balance`) await waitForText( () => app.client.$(`.header-balance .total-atoms h2`), - `${totalAtoms}.0000…` + `${totalAtoms}.0000…`, + 10 * 1000 ) + console.log(`Testing unbonded balance`) await waitForText( () => app.client.$(`.header-balance .unbonded-atoms h2`), `${unbondedAtoms - 10}.0000…` @@ -137,7 +135,7 @@ test(`delegation`, async function(t) { .setValue(`#password`, `1234567890`) .click(`//*[@id = 'undelegation-modal']//button//*[. = 'Undelegate']`) .waitForVisible( - `//*[. = 'You have successfully undelegated 5 Steaks.']`, + `//*[. = 'You have successfully undelegated 5 STAKEs.']`, 5 * 1000 ) diff --git a/test/e2e/governance.js b/test/e2e/governance.js index 49f2d5d2fc..a58f127279 100644 --- a/test/e2e/governance.js +++ b/test/e2e/governance.js @@ -64,7 +64,8 @@ test(`Governance`, async function(t) { `shows the newly created proposal` ) await closeNotifications(app) - // check if balance updates accordingly + + console.log(`Testing total balance updated`) await waitForText( () => app.client.$(`.total-atoms__value`), `${balance - 5}.0000…` @@ -105,7 +106,7 @@ test(`Governance`, async function(t) { .$(`#submit-deposit`) .click() .waitForVisible( - `//*[. = 'You have successfully deposited your steaks on proposal #1']`, + `//*[. = 'You have successfully deposited your STAKEs on proposal #1']`, 4 * 1000 ), `successful deposit` @@ -117,10 +118,12 @@ test(`Governance`, async function(t) { `increments the deposit count displayed on the proposal page` ) await closeNotifications(app) - // check if balance updates accordingly + + console.log(`Testing total balance updated`) await waitForText( () => app.client.$(`.total-atoms__value`), - `${balance - 10}.0000…` + `${balance - 10}.0000…`, + 10 * 10000 ) t.end() }) diff --git a/test/e2e/wallet.js b/test/e2e/wallet.js index 1d712ba64f..eb8c0c8946 100644 --- a/test/e2e/wallet.js +++ b/test/e2e/wallet.js @@ -39,8 +39,8 @@ test(`wallet`, async function(t) { t.equal((await app.client.$$(`.li-coin`)).length, 2, `it shows all 2 coins`) // denom await t.ok( - await app.client.$(`.coin-denom=Steak`).isVisible(), - `show coin steak` + await app.client.$(`.coin-denom=Stake`).isVisible(), + `show coin stake` ) await t.ok( await app.client.$(`.coin-denom=Localcoin`).isVisible(), diff --git a/test/unit/specs/components/common/__snapshots__/PagePreferences.spec.js.snap b/test/unit/specs/components/common/__snapshots__/PagePreferences.spec.js.snap index 8724d3338c..fe9927a6f6 100644 --- a/test/unit/specs/components/common/__snapshots__/PagePreferences.spec.js.snap +++ b/test/unit/specs/components/common/__snapshots__/PagePreferences.spec.js.snap @@ -38,7 +38,7 @@ exports[`PagePreferences has the expected html structure if connected 1`] = ` class="total-atoms top-section" >

- Total Steak + Total STAKE

- Available Steak + Available STAKE

diff --git a/test/unit/specs/components/common/__snapshots__/TmBalance.spec.js.snap b/test/unit/specs/components/common/__snapshots__/TmBalance.spec.js.snap index 41b87bb8f4..2e33683cc8 100644 --- a/test/unit/specs/components/common/__snapshots__/TmBalance.spec.js.snap +++ b/test/unit/specs/components/common/__snapshots__/TmBalance.spec.js.snap @@ -8,7 +8,7 @@ exports[`TmBalance has the expected html structure before adding props 1`] = `

- Total Steak + Total STAKE

321.0000… @@ -16,7 +16,7 @@ exports[`TmBalance has the expected html structure before adding props 1`] = `

- Available Steak + Available STAKE

123.0000… diff --git a/test/unit/specs/components/common/__snapshots__/TmOnboarding.spec.js.snap b/test/unit/specs/components/common/__snapshots__/TmOnboarding.spec.js.snap index 8e853a5a18..4db872b397 100644 --- a/test/unit/specs/components/common/__snapshots__/TmOnboarding.spec.js.snap +++ b/test/unit/specs/components/common/__snapshots__/TmOnboarding.spec.js.snap @@ -100,7 +100,7 @@ exports[`TmOnboarding has the expected html structure 2 1`] = `

- You can delegate your Steak to Cosmos Validators to earn even more Steak. + You can delegate your STAKE to Cosmos Validators to earn even more STAKE.
diff --git a/test/unit/specs/components/governance/PageGovernance.spec.js b/test/unit/specs/components/governance/PageGovernance.spec.js index 95ff8a6404..6b2724c035 100644 --- a/test/unit/specs/components/governance/PageGovernance.spec.js +++ b/test/unit/specs/components/governance/PageGovernance.spec.js @@ -72,7 +72,7 @@ describe(`PageGovernance`, () => { `submitProposal`, { description: `a valid description for the proposal`, - initial_deposit: [{ amount: `15`, denom: `steak` }], + initial_deposit: [{ amount: `15`, denom: `STAKE` }], title: `A new text proposal for Cosmos`, type: `Text` } @@ -102,7 +102,7 @@ describe(`PageGovernance`, () => { `submitProposal`, { description: `a valid description for the proposal`, - initial_deposit: [{ amount: `15`, denom: `steak` }], + initial_deposit: [{ amount: `15`, denom: `STAKE` }], title: `A new text proposal for Cosmos`, type: `Text` } diff --git a/test/unit/specs/components/governance/PageProposal.spec.js b/test/unit/specs/components/governance/PageProposal.spec.js index 85ae83e18d..ec47820f00 100644 --- a/test/unit/specs/components/governance/PageProposal.spec.js +++ b/test/unit/specs/components/governance/PageProposal.spec.js @@ -284,7 +284,7 @@ describe(`PageProposal`, () => { [ `notify`, { - body: `You have successfully deposited your steaks on proposal #1`, + body: `You have successfully deposited your STAKEs on proposal #1`, title: `Successful deposit!` } ] diff --git a/test/unit/specs/components/governance/__snapshots__/PageGovernance.spec.js.snap b/test/unit/specs/components/governance/__snapshots__/PageGovernance.spec.js.snap index 2220316dd8..0da7c4bac5 100644 --- a/test/unit/specs/components/governance/__snapshots__/PageGovernance.spec.js.snap +++ b/test/unit/specs/components/governance/__snapshots__/PageGovernance.spec.js.snap @@ -15,7 +15,7 @@ exports[`PageGovernance disables proposal creation if not connected 1`] = `

- Total Steak + Total STAKE

1,337.0000… @@ -23,7 +23,7 @@ exports[`PageGovernance disables proposal creation if not connected 1`] = `

- Available Steak + Available STAKE

1,337.0000… @@ -75,7 +75,7 @@ exports[`PageGovernance disables proposal creation if not connected 1`] = `

- Total Steak + Total STAKE

1,337.0000… @@ -83,7 +83,7 @@ exports[`PageGovernance disables proposal creation if not connected 1`] = `

- Available Steak + Available STAKE

1,337.0000… @@ -150,7 +150,7 @@ exports[`PageGovernance has the expected html structure 1`] = `

- Total Steak + Total STAKE

1,351.0000… @@ -158,7 +158,7 @@ exports[`PageGovernance has the expected html structure 1`] = `

- Available Steak + Available STAKE

1,337.0000… @@ -210,7 +210,7 @@ exports[`PageGovernance has the expected html structure 1`] = `

- Total Steak + Total STAKE

1,351.0000… @@ -218,7 +218,7 @@ exports[`PageGovernance has the expected html structure 1`] = `

- Available Steak + Available STAKE

1,337.0000… diff --git a/test/unit/specs/components/governance/__snapshots__/PageProposal.spec.js.snap b/test/unit/specs/components/governance/__snapshots__/PageProposal.spec.js.snap index 00b9244885..69c3152752 100644 --- a/test/unit/specs/components/governance/__snapshots__/PageProposal.spec.js.snap +++ b/test/unit/specs/components/governance/__snapshots__/PageProposal.spec.js.snap @@ -38,7 +38,7 @@ exports[`PageProposal has the expected html structure 1`] = ` class="total-atoms top-section" >

- Total Steak + Total STAKE

- Available Steak + Available STAKE

@@ -208,7 +208,7 @@ exports[`PageProposal has the expected html structure 1`] = `
- 100 steak + 100 STAKE
@@ -360,7 +360,7 @@ exports[`PageProposal shows an error if the proposal couldn't be found 1`] = ` class="total-atoms top-section" >

- Total Steak + Total STAKE

- Available Steak + Available STAKE

diff --git a/test/unit/specs/components/staking/__snapshots__/DelegationModal.spec.js.snap b/test/unit/specs/components/staking/__snapshots__/DelegationModal.spec.js.snap index 147e41c7d3..6cf985cc2a 100644 --- a/test/unit/specs/components/staking/__snapshots__/DelegationModal.spec.js.snap +++ b/test/unit/specs/components/staking/__snapshots__/DelegationModal.spec.js.snap @@ -46,7 +46,7 @@ exports[`DelegationModal component matches snapshot has the expected html struct diff --git a/test/unit/specs/components/staking/__snapshots__/PageStaking.spec.js.snap b/test/unit/specs/components/staking/__snapshots__/PageStaking.spec.js.snap index 6f92c944aa..ee2100dd2d 100644 --- a/test/unit/specs/components/staking/__snapshots__/PageStaking.spec.js.snap +++ b/test/unit/specs/components/staking/__snapshots__/PageStaking.spec.js.snap @@ -15,7 +15,7 @@ exports[`PageStaking has the expected html structure 1`] = `

- Total Steak + Total STAKE

1,351.0000… @@ -23,7 +23,7 @@ exports[`PageStaking has the expected html structure 1`] = `

- Available Steak + Available STAKE

1,337.0000… @@ -76,7 +76,7 @@ exports[`PageStaking has the expected html structure 1`] = `

- Total Steak + Total STAKE

1,351.0000… @@ -84,7 +84,7 @@ exports[`PageStaking has the expected html structure 1`] = `

- Available Steak + Available STAKE

1,337.0000… diff --git a/test/unit/specs/components/staking/__snapshots__/PageValidator.spec.js.snap b/test/unit/specs/components/staking/__snapshots__/PageValidator.spec.js.snap index 42ef3b4059..ed831fb0dd 100644 --- a/test/unit/specs/components/staking/__snapshots__/PageValidator.spec.js.snap +++ b/test/unit/specs/components/staking/__snapshots__/PageValidator.spec.js.snap @@ -38,7 +38,7 @@ exports[`PageValidator has the expected html structure 1`] = ` class="total-atoms top-section" >

- Total Steak + Total STAKE

- Available Steak + Available STAKE

@@ -240,7 +240,7 @@ exports[`PageValidator has the expected html structure 1`] = ` class="colored_dl" >
- Delegated Steak + Delegated STAKE
@@ -465,7 +465,7 @@ exports[`PageValidator has the expected html structure 1`] = ` class="info_dl" >
- Self Delegated Steak + Self Delegated STAKE
- Minimum Self Delegated Steak + Minimum Self Delegated STAKE
@@ -557,7 +557,7 @@ exports[`PageValidator shows a default avatar 1`] = ` class="total-atoms top-section" >

- Total Steak + Total STAKE

- Available Steak + Available STAKE

@@ -759,7 +759,7 @@ exports[`PageValidator shows a default avatar 1`] = ` class="colored_dl" >
- Delegated Steak + Delegated STAKE
@@ -984,7 +984,7 @@ exports[`PageValidator shows a default avatar 1`] = ` class="info_dl" >
- Self Delegated Steak + Self Delegated STAKE
- Minimum Self Delegated Steak + Minimum Self Delegated STAKE
@@ -1058,7 +1058,7 @@ exports[`PageValidator shows an error if the validator couldn't be found 1`] = ` class="total-atoms top-section" >

- Total Steak + Total STAKE

- Available Steak + Available STAKE

diff --git a/test/unit/specs/components/staking/__snapshots__/TabParameters.spec.js.snap b/test/unit/specs/components/staking/__snapshots__/TabParameters.spec.js.snap index 776c989b39..beac0c3923 100644 --- a/test/unit/specs/components/staking/__snapshots__/TabParameters.spec.js.snap +++ b/test/unit/specs/components/staking/__snapshots__/TabParameters.spec.js.snap @@ -19,7 +19,7 @@ exports[`TabParameters has the expected html structure 1`] = `
- Loose steak info_outline + Loose STAKE info_outline
100.0000000000 @@ -29,7 +29,7 @@ exports[`TabParameters has the expected html structure 1`] = `
- Delegated steak info_outline + Delegated STAKE info_outline
50.0000000000 @@ -59,7 +59,7 @@ exports[`TabParameters has the expected html structure 1`] = ` Current Staking Coin Denomination
- steak + STAKE
diff --git a/test/unit/specs/components/staking/__snapshots__/TabValidators.spec.js.snap b/test/unit/specs/components/staking/__snapshots__/TabValidators.spec.js.snap index 160ad1b7e2..fa2bf4e3c9 100644 --- a/test/unit/specs/components/staking/__snapshots__/TabValidators.spec.js.snap +++ b/test/unit/specs/components/staking/__snapshots__/TabValidators.spec.js.snap @@ -10,7 +10,7 @@ exports[`TabValidators has the expected html structure 1`] = ` Moniker - Delegated Steak + Delegated STAKE Rewards @@ -160,7 +160,7 @@ exports[`TabValidators shows a message if still loading 1`] = ` Moniker - Delegated Steak + Delegated STAKE Rewards diff --git a/test/unit/specs/components/staking/__snapshots__/TableValidators.spec.js.snap b/test/unit/specs/components/staking/__snapshots__/TableValidators.spec.js.snap index b7c8be2f53..4aadd1b261 100644 --- a/test/unit/specs/components/staking/__snapshots__/TableValidators.spec.js.snap +++ b/test/unit/specs/components/staking/__snapshots__/TableValidators.spec.js.snap @@ -9,7 +9,7 @@ exports[`TableValidators has the expected html structure 1`] = ` Moniker - Delegated Steak + Delegated STAKE Rewards @@ -166,7 +166,7 @@ exports[`TableValidators should filter the delegates 1`] = ` - Delegated Steak + Delegated STAKE diff --git a/test/unit/specs/components/wallet/PageWallet.spec.js b/test/unit/specs/components/wallet/PageWallet.spec.js index d48680f955..347e0a9e15 100644 --- a/test/unit/specs/components/wallet/PageWallet.spec.js +++ b/test/unit/specs/components/wallet/PageWallet.spec.js @@ -40,21 +40,21 @@ describe(`PageWallet`, () => { it(`should sort the balances by denom`, () => { expect(wrapper.vm.filteredBalances.map(x => x.denom)).toEqual([ `fermion`, - `mycoin`, - `steak` + `STAKE`, + `mycoin` ]) }) it(`should filter the balances`, async () => { store.commit(`setSearchVisible`, [`balances`, true]) - store.commit(`setSearchQuery`, [`balances`, `steak`]) + store.commit(`setSearchQuery`, [`balances`, `stake`]) // after importing the @tendermint/ui components from modules // the perfect scroll plugin needs a $nextTick and a wrapper.update // to work properly in the tests (snapshots weren't matching) // this has occured across multiple tests await wrapper.vm.$nextTick() wrapper.update() - expect(wrapper.vm.filteredBalances.map(x => x.denom)).toEqual([`steak`]) + expect(wrapper.vm.filteredBalances.map(x => x.denom)).toEqual([`STAKE`]) expect(wrapper.vm.$el).toMatchSnapshot() }) diff --git a/test/unit/specs/components/wallet/__snapshots__/PageSend.spec.js.snap b/test/unit/specs/components/wallet/__snapshots__/PageSend.spec.js.snap index 2d7f8b4805..32de99e2d4 100644 --- a/test/unit/specs/components/wallet/__snapshots__/PageSend.spec.js.snap +++ b/test/unit/specs/components/wallet/__snapshots__/PageSend.spec.js.snap @@ -38,7 +38,7 @@ exports[`PageSend disables sending if not connected 1`] = ` class="total-atoms top-section" >

- Total Steak + Total STAKE

- Available Steak + Available STAKE

@@ -454,7 +454,7 @@ exports[`PageSend has the expected html structure 1`] = ` class="total-atoms top-section" >

- Total Steak + Total STAKE

- Available Steak + Available STAKE

@@ -894,7 +894,7 @@ exports[`PageSend should show address required error 1`] = ` class="total-atoms top-section" >

- Total Steak + Total STAKE

- Available Steak + Available STAKE

@@ -1308,7 +1308,7 @@ exports[`PageSend should show bech32 error when address length is too long 1`] = class="total-atoms top-section" >

- Total Steak + Total STAKE

- Available Steak + Available STAKE

@@ -1722,7 +1722,7 @@ exports[`PageSend should show bech32 error when address length is too short 1`] class="total-atoms top-section" >

- Total Steak + Total STAKE

- Available Steak + Available STAKE

@@ -2136,7 +2136,7 @@ exports[`PageSend should show bech32 error when alphanumeric is wrong 1`] = ` class="total-atoms top-section" >

- Total Steak + Total STAKE

- Available Steak + Available STAKE

@@ -2561,7 +2561,7 @@ exports[`PageSend should trigger confirmation modal if form is correct 1`] = ` class="total-atoms top-section" >

- Total Steak + Total STAKE

- Available Steak + Available STAKE

@@ -3075,7 +3075,7 @@ exports[`PageSend should work without providing a default denom 1`] = ` class="total-atoms top-section" >

- Total Steak + Total STAKE

- Available Steak + Available STAKE

diff --git a/test/unit/specs/components/wallet/__snapshots__/PageTransactions.spec.js.snap b/test/unit/specs/components/wallet/__snapshots__/PageTransactions.spec.js.snap index 842023c07a..0c833562d6 100644 --- a/test/unit/specs/components/wallet/__snapshots__/PageTransactions.spec.js.snap +++ b/test/unit/specs/components/wallet/__snapshots__/PageTransactions.spec.js.snap @@ -38,7 +38,7 @@ exports[`PageTransactions has the expected html structure 1`] = ` class="total-atoms top-section" >

- Total Steak + Total STAKE

- Available Steak + Available STAKE

@@ -169,7 +169,7 @@ exports[`PageTransactions has the expected html structure 1`] = `

- Total Steak + Total STAKE

- Available Steak + Available STAKE

@@ -444,7 +444,7 @@ exports[`PageTransactions should filter the transactions 1`] = `

- Total Steak + Total STAKE

- Available Steak + Available STAKE

@@ -252,7 +252,7 @@ exports[`PageWallet has the expected html structure 1`] = `

- Mycoin + Stake

@@ -268,7 +268,7 @@ exports[`PageWallet has the expected html structure 1`] = `

@@ -329,7 +329,7 @@ exports[`PageWallet has the expected html structure 1`] = `
@@ -586,7 +586,7 @@ exports[`PageWallet should filter the balances 1`] = `