Skip to content

Commit

Permalink
Merge pull request #4085 from LiskHQ/4084-cherry-pick-e2e-changes-fro…
Browse files Browse the repository at this point in the history
…m-development

Cherry pick e2e test changes from development to release/2.2.0 - Closes #4084
  • Loading branch information
reyraa authored Jan 19, 2022
2 parents 75a68ad + bee62f3 commit 1ff1f40
Show file tree
Hide file tree
Showing 11 changed files with 16 additions and 5 deletions.
5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,8 @@ cypress.log
## Commercial fonts
src/assets/fonts/basier-circle/
src/assets/fonts/gilroy/

## Cypress
test/cypress/cypress
test/cypress/screenshots
test/cypress/videos
2 changes: 1 addition & 1 deletion Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pipeline {
install -D test/dev_config_and_db/genesis_block.json ~/.lisk/lisk-core/config/devnet/genesis_block.json
./lisk-core/bin/lisk-core blockchain:import --force test/dev_config_and_db/tokens_unlocked_dev_blockchain.db.tar.gz
./lisk-core/bin/lisk-core forger-info:import --force test/dev_config_and_db/forger.db.tar.gz
nohup ./lisk-core/bin/lisk-core start --network=devnet --api-ws --api-ws-host=0.0.0.0 --api-ws-port=8080 --enable-forger-plugin --enable-http-api-plugin >lisk-core.out 2>lisk-core.err &
nohup ./lisk-core/bin/lisk-core start --network=devnet --api-ws --api-ws-host=0.0.0.0 --api-ws-port=8080 --enable-http-api-plugin >lisk-core.out 2>lisk-core.err &
echo $! >lisk-core.pid
# wait for core to be up and running
Expand Down
2 changes: 1 addition & 1 deletion src/components/shared/transactionInfo/voteDelegate.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ const VoteDelegate = ({
const addedLength = Object.keys(added).length;
const editedLength = Object.keys(edited).length;
const removedLength = Object.keys(removed).length;
const sentVotes = account.dpos?.sentVotes?.length ?? 0;
const sentVotes = account?.dpos?.sentVotes?.length ?? 0;

return (
<>
Expand Down
2 changes: 1 addition & 1 deletion src/store/actions/blocks.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ export const forgersRetrieved = () => async (dispatch, getState) => {
forgers = data.map((forger, index) => {
forger.rank = delegates.data.find(
delegate => forger.address === delegate.summary.address,
).dpos?.delegate?.rank;
)?.dpos?.delegate?.rank;
indexBook[forger.address] = index;
if (haveForgedInRound.indexOf(forger.username) > -1) {
return { ...forger, state: 'forging' };
Expand Down
4 changes: 2 additions & 2 deletions src/store/actions/voting.js
Original file line number Diff line number Diff line change
Expand Up @@ -49,9 +49,9 @@ export const voteEdited = data => async (dispatch, getState) => {
if (vote.username) {
return vote;
}
const account = await getAccount({
const account = (await getAccount({
network, params: { address: vote.address },
}, settings.token.active);
}, settings.token.active)) || {};
const username = account.dpos?.delegate?.username ?? '';

return { ...vote, username };
Expand Down
1 change: 1 addition & 0 deletions test/cypress/features/bookmark.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Feature: Add bookmark

Background:
Given I login as genesis on devnet
And I wait 5 seconds
Given I am on wallet page
When I click on searchIcon

Expand Down
1 change: 1 addition & 0 deletions test/cypress/features/dashboard.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Feature: Dashboard
Background:
Given I have a bookmark saved
Given I login as genesis on devnet
And I wait 5 seconds
Given I am on wallet page

Scenario: Open last transaction and open a bookmark item
Expand Down
1 change: 1 addition & 0 deletions test/cypress/features/delegateReg.feature
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
Feature: Register delegate
Background:
Given I login as genesis on devnet
And I wait 5 seconds

Scenario: Register delegate + Header balance is affected
Given I am on wallet page
Expand Down
1 change: 1 addition & 0 deletions test/cypress/features/txTable_filtering.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Feature: Transaction table filtering

Background:
Given I login as genesis on devnet
And I wait 5 seconds
Given I am on Wallet page
And I click on filterTransactionsBtn

Expand Down
1 change: 1 addition & 0 deletions test/cypress/features/voting.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Feature: Vote delegate

Background:
Given I login as genesis on devnet
And I wait 5 seconds
Given I am on wallet page
When I click on searchIcon
And I search for account genesis_69
Expand Down
1 change: 1 addition & 0 deletions test/cypress/features/wallet.feature
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ Feature: Wallet

Background:
Given I login as genesis on devnet
And I wait 5 seconds
Given I am on wallet page

Scenario: 30 tx are shown, clicking show more loads more transactions
Expand Down

0 comments on commit 1ff1f40

Please sign in to comment.