chore(token tests): update failing tests (#1995)

* chore: update capsule files

* chore: fix failing staking tests

* chore: move capsule teardown var to cypress config

* chore: update teardown in workdflows
This commit is contained in:
Joe Tsang 2022-11-08 17:44:01 +00:00 committed by GitHub
parent 0d69ffb4a8
commit 3ff6514cf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
12 changed files with 48 additions and 31 deletions

View File

@ -29,6 +29,7 @@ on:
env:
GOBIN: /home/runner/go/bin
VEGA_VERSION: 'v0.58.0'
capsule-teardown: true
jobs:
manual:
@ -57,4 +58,5 @@ jobs:
vega-version: ${{needs.manual.outputs.vega-version}}
gobin: ${{needs.manual.outputs.gobin}}
skip-cache: ${{needs.manual.outputs.skip-cache}}
capsule-teardown: ${{needs.manual.capsule-teardown}}
tags: ${{needs.manual.outputs.tags}}

View File

@ -17,3 +17,4 @@ jobs:
gobin: /home/runner/go/bin
tags: --env.grepTags '[ @smoke, @regression, @slow ]'
night-run: true
capsule-teardown: true

View File

@ -24,6 +24,10 @@ on:
required: false
type: boolean
default: false
capsule-teardown:
required: false
type: boolean
default: false
jobs:
explorer-e2e:
@ -99,7 +103,7 @@ jobs:
CYPRESS_TRADING_TEST_VEGA_WALLET_PASSPHRASE: ${{ secrets.CYPRESS_TRADING_TEST_VEGA_WALLET_PASSPHRASE }}
CYPRESS_SLACK_WEBHOOK: ${{ secrets.CYPRESS_SLACK_WEBHOOK }}
CYPRESS_ETH_WALLET_MNEMONIC: ${{ secrets.CYPRESS_ETH_WALLET_MNEMONIC }}
CYPRESS_TEARDOWN_NETWORK_AFTER_FLOWS: false
CYPRESS_TEARDOWN_NETWORK_AFTER_FLOWS: ${{ inputs.capsule-teardown }}
CYPRESS_NIGHTLY_RUN: ${{ inputs.night-run }}
######

View File

@ -20,6 +20,10 @@ on:
tags:
required: false
type: string
capsule-teardown:
required: false
type: boolean
default: false
jobs:
token-e2e:
@ -95,7 +99,7 @@ jobs:
CYPRESS_TRADING_TEST_VEGA_WALLET_PASSPHRASE: ${{ secrets.CYPRESS_TRADING_TEST_VEGA_WALLET_PASSPHRASE }}
CYPRESS_SLACK_WEBHOOK: ${{ secrets.CYPRESS_SLACK_WEBHOOK }}
CYPRESS_ETH_WALLET_MNEMONIC: ${{ secrets.CYPRESS_ETH_WALLET_MNEMONIC }}
CYPRESS_TEARDOWN_NETWORK_AFTER_FLOWS: false
CYPRESS_TEARDOWN_NETWORK_AFTER_FLOWS: ${{ inputs.capsule-teardown }}
######
## Upload logs

View File

@ -20,6 +20,9 @@ on:
night-run:
required: false
type: boolean
capsule-teardown:
required: false
type: boolean
jobs:
run-console-lite-e2e:
@ -42,6 +45,7 @@ jobs:
skip-cache: ${{ inputs.skip-cache }}
tags: ${{ inputs.tags }}
night-run: ${{ inputs.night-run }}
capsule-teardown: ${{ inputs.capsule-teardown }}
run-liquidity-e2e:
uses: ./.github/workflows/cypress-liquidity-provision-dashboard-e2e.yml
@ -64,6 +68,7 @@ jobs:
gobin: ${{ inputs.gobin }}
skip-cache: ${{ inputs.skip-cache }}
tags: ${{ inputs.tags }}
capsule-teardown: ${{ inputs.capsule-teardown }}
run-trading-e2e:
uses: ./.github/workflows/cypress-trading-e2e.yml

View File

@ -14,4 +14,3 @@ NX_VEGA_WALLET_URL=http://localhost:1789
#Test configuration variables
CYPRESS_FAIRGROUND=false
CYPRESS_TEARDOWN_NETWORK_AFTER_FLOWS=true

View File

@ -51,5 +51,6 @@ module.exports = defineConfig({
grepTags: '@regression @smoke @slow',
grepFilterSpecs: true,
grepOmitFiltered: true,
TEARDOWN_NETWORK_AFTER_FLOWS: false,
},
});

View File

@ -414,8 +414,6 @@ context(
.should('be.visible');
}
);
// 3001-VOTE-043
cy.contains('3 days left to vote').should('be.visible');
});
it('Newly created proposal details - shows default status set to fail', function () {
@ -425,7 +423,6 @@ context(
cy.get_submitted_proposal_from_proposal_list().within(() =>
cy.get(viewProposalButton).click()
);
cy.contains('currently set to fail').should('be.visible');
cy.contains('Participation: Not Met 0.00 0.00%(0.00% Required)').should(
'be.visible'
);

View File

@ -365,7 +365,7 @@ context(
.contains(2.0, epochTimeout)
.should('be.visible');
cy.get(totalStake, epochTimeout).should('have.text', '2');
cy.get(totalStake, epochTimeout).should('contain.text', '2');
cy.get(stakeShare, epochTimeout).should('have.text', '100%');
cy.navigate_to('staking');
@ -543,6 +543,7 @@ context(
txTimeout
);
cy.close_staking_dialog();
cy.staking_page_disassociate_all_tokens('wallet');
cy.get(ethWalletContainer).within(() => {
@ -596,7 +597,7 @@ context(
2.0,
txTimeout
);
cy.close_staking_dialog();
cy.staking_page_disassociate_all_tokens('contract');
cy.get(ethWalletContainer).within(() => {
@ -648,7 +649,7 @@ context(
2.0,
txTimeout
);
cy.close_staking_dialog();
cy.staking_page_disassociate_tokens('1');
cy.get(ethWalletTotalAssociatedBalance, txTimeout)
@ -696,7 +697,7 @@ context(
3.0,
txTimeout
);
cy.close_staking_dialog();
cy.staking_page_associate_tokens('4');
cy.get(vegaWalletUnstakedBalance, txTimeout).should(
@ -732,7 +733,7 @@ context(
3.0,
txTimeout
);
cy.close_staking_dialog();
cy.staking_page_associate_tokens('4', { type: 'contract' });
cy.get(vegaWalletUnstakedBalance, txTimeout).should(
@ -768,7 +769,7 @@ context(
3.0,
txTimeout
);
cy.close_staking_dialog();
cy.staking_page_associate_tokens('4', { type: 'contract' });
cy.get(vegaWalletUnstakedBalance, txTimeout).should(
@ -804,8 +805,7 @@ context(
0.0,
txTimeout
);
cy.navigate_to('staking');
cy.close_staking_dialog();
cy.click_on_validator_from_list(1);
@ -816,7 +816,7 @@ context(
0.0,
txTimeout
);
cy.close_staking_dialog();
cy.staking_page_associate_tokens('6');
cy.get(vegaWallet).within(() => {
@ -860,8 +860,7 @@ context(
1.0,
txTimeout
);
cy.navigate_to('staking');
cy.close_staking_dialog();
cy.click_on_validator_from_list(0);

View File

@ -216,3 +216,13 @@ Cypress.Commands.add(
});
}
);
Cypress.Commands.add('close_staking_dialog', () => {
cy.getByTestId('dialog-title').should(
'contain.text',
'At the beginning of the next epoch'
);
cy.getByTestId('dialog-content').within(() => {
cy.get('a').should('have.text', 'Back to Staking').click();
});
});

View File

@ -61,19 +61,6 @@ EOT
POSTGRES_DBS="vega0,vega1,vega2,vega3,vega4,vega5,vega6,vega7,vega8"
}
volume_mounts = concat(
[
for ns in generated.node_sets:
"${ns.data_node.service.home_dir}/dehistory/snapshotsCopyTo:/snapshotsCopyTo${ns.index}"
if ns.data_node != null
],
[
for ns in generated.node_sets:
"${ns.data_node.service.home_dir}/dehistory/snapshotsCopyFrom:/snapshotsCopyFrom${ns.index}"
if ns.data_node != null
]
)
static_port {
value = 5232
to = 5432
@ -83,6 +70,8 @@ EOT
memory = 900
}
volume_mounts = ["${network_home_path}:${network_home_path}"]
auth_soft_fail = true
}
}

View File

@ -3,9 +3,12 @@ GatewayEnabled = true
[SQLStore]
Enabled = true
[SQLStore.ConnectionConfig]
Database = "vega{{.NodeNumber}}"
Host = "localhost"
Password = "vega"
Port = 5232
UseTransactions = true
Database = "vega{{.NodeNumber}}"
Username = "vega"
[API]
@ -38,3 +41,6 @@ GatewayEnabled = true
UseEventFile = false
[Broker.SocketConfig]
Port = 30{{.NodeNumber}}5
[DeHistory]
Enabled = true