diff --git a/apps/explorer-e2e/src/integration/blocks-page.feature b/apps/explorer-e2e/src/integration/blocks-page.feature new file mode 100644 index 000000000..53b8e74b4 --- /dev/null +++ b/apps/explorer-e2e/src/integration/blocks-page.feature @@ -0,0 +1,6 @@ +Feature: Blocks Page + +Scenario: Navigate to blocks page + Given I am on the homepage + When I navigate to the blocks page + Then blocks page is correctly displayed diff --git a/apps/explorer-e2e/src/integration/home-page.feature b/apps/explorer-e2e/src/integration/home-page.feature index 2db9db79a..d3c471fc3 100644 --- a/apps/explorer-e2e/src/integration/home-page.feature +++ b/apps/explorer-e2e/src/integration/home-page.feature @@ -1,4 +1,4 @@ Feature: Home page Scenario: Visit Home page - Given I go to the homepage + Given I am on the homepage diff --git a/apps/explorer-e2e/src/integration/markets-page.feature b/apps/explorer-e2e/src/integration/markets-page.feature new file mode 100644 index 000000000..181e72461 --- /dev/null +++ b/apps/explorer-e2e/src/integration/markets-page.feature @@ -0,0 +1,6 @@ +Feature: Markets Page + +Scenario: Navigate to markets page + Given I am on the homepage + When I navigate to the markets page + Then markets page is correctly displayed diff --git a/apps/explorer-e2e/src/integration/network-page.feature b/apps/explorer-e2e/src/integration/network-page.feature new file mode 100644 index 000000000..7e96fd86f --- /dev/null +++ b/apps/explorer-e2e/src/integration/network-page.feature @@ -0,0 +1,6 @@ +Feature: Network parameters Page + +Scenario: Navigate to network parameters page + Given I am on the homepage + When I navigate to the transactions page + Then transactions page is correctly displayed diff --git a/apps/explorer-e2e/src/integration/validators-page.feature b/apps/explorer-e2e/src/integration/validators-page.feature new file mode 100644 index 000000000..75cff836d --- /dev/null +++ b/apps/explorer-e2e/src/integration/validators-page.feature @@ -0,0 +1,6 @@ +Feature: Validators Page + +Scenario: Navigate to validators page + Given I am on the homepage + When I navigate to the validators page + Then validators page is correctly displayed diff --git a/apps/explorer-e2e/src/support/pages/blocks-page.js b/apps/explorer-e2e/src/support/pages/blocks-page.js deleted file mode 100644 index f8ee84de2..000000000 --- a/apps/explorer-e2e/src/support/pages/blocks-page.js +++ /dev/null @@ -1,25 +0,0 @@ -import BasePage from './base-page'; - -export default class BlocksPage extends BasePage { - blocksFrmHeader = 'blocks-frm-header'; - blocksStreamedHeader = 'blocks-streamed-header'; - blockHeight = 'block-height'; - blockchainBlocks = 'blockchain-blocks'; - streamedBlocks = 'streamed-blocks'; - - validateBlocksPageDisplayed() { - cy.getByTestId(this.blocksFrmHeader).should( - 'have.text', - 'Blocks from blockchain' - ); - cy.getByTestId(this.blocksStreamedHeader).should( - 'have.text', - 'Blocks streamed in' - ); - cy.getByTestId(this.blockHeight) - .should('contain.text', 'Height: ') - .and('have.length.greaterThan', 10); - cy.getByTestId(this.blockchainBlocks).should('not.be.empty'); - cy.getByTestId(this.streamedBlocks).should('not.be.empty'); - } -} diff --git a/apps/explorer-e2e/src/support/pages/transactions-page.js b/apps/explorer-e2e/src/support/pages/transactions-page.js index 2db75ef58..0efc0d367 100644 --- a/apps/explorer-e2e/src/support/pages/transactions-page.js +++ b/apps/explorer-e2e/src/support/pages/transactions-page.js @@ -21,6 +21,8 @@ export default class TransactionsPage extends BasePage { .first() .invoke('text') .then((blockHeightTxt) => { + cy.wait(1000); // eslint-disable-line cypress/no-unnecessary-waiting + //Wait needed to allow blocks to change cy.getByTestId(this.refreshBtn).click(); cy.getByTestId(this.blockHeight) diff --git a/apps/explorer-e2e/src/support/step_definitions/markets-page-step.js b/apps/explorer-e2e/src/support/step_definitions/markets-page-step.js new file mode 100644 index 000000000..d0d9d77cb --- /dev/null +++ b/apps/explorer-e2e/src/support/step_definitions/markets-page-step.js @@ -0,0 +1,12 @@ +import { Given, Then, When } from 'cypress-cucumber-preprocessor/steps'; + +import MarketsPage from '../pages/markets-page'; +const marketsPage = new MarketsPage(); + +When('I navigate to the markets page', () => { + marketsPage.navigateToMarkets(); +}); + +Then('markets page is correctly displayed', () => { + marketsPage.validateMarketDataDisplayed(); +}); diff --git a/apps/explorer-e2e/src/support/step_definitions/transaction-page.step.js b/apps/explorer-e2e/src/support/step_definitions/transaction-page.step.js index aa4065c49..35f60ae78 100644 --- a/apps/explorer-e2e/src/support/step_definitions/transaction-page.step.js +++ b/apps/explorer-e2e/src/support/step_definitions/transaction-page.step.js @@ -1,4 +1,4 @@ -import { Given, Then, When } from 'cypress-cucumber-preprocessor/steps'; +import { Then, When } from 'cypress-cucumber-preprocessor/steps'; import TransactionsPage from '../pages/transactions-page'; const transactionsPage = new TransactionsPage(); @@ -7,7 +7,16 @@ When('I navigate to the transactions page', () => { transactionsPage.navigateToTxs(); }); +When('I navigate to the blocks page', () => { + transactionsPage.navigateToBlocks(); +}); + Then('transactions page is correctly displayed', () => { transactionsPage.validateTransactionsPagedisplayed(); transactionsPage.validateRefreshBtn(); }); + +Then('blocks page is correctly displayed', () => { + transactionsPage.validateTransactionsPagedisplayed(); + transactionsPage.validateRefreshBtn(); +}); diff --git a/apps/explorer-e2e/src/support/step_definitions/validators-page-step.js b/apps/explorer-e2e/src/support/step_definitions/validators-page-step.js new file mode 100644 index 000000000..40b325157 --- /dev/null +++ b/apps/explorer-e2e/src/support/step_definitions/validators-page-step.js @@ -0,0 +1,12 @@ +import { Then, When } from 'cypress-cucumber-preprocessor/steps'; + +import ValidatorPage from '../pages/validators-page'; +const validatorsPage = new ValidatorPage(); + +When('I navigate to the validators page', () => { + validatorsPage.navigateToValidators(); +}); + +Then('validators page is correctly displayed', () => { + validatorsPage.validateValidatorsDisplayed(); +}); diff --git a/apps/explorer/src/app/components/txs/id/tx-details.tsx b/apps/explorer/src/app/components/txs/id/tx-details.tsx index b25dbeaef..a33db0856 100644 --- a/apps/explorer/src/app/components/txs/id/tx-details.tsx +++ b/apps/explorer/src/app/components/txs/id/tx-details.tsx @@ -17,12 +17,12 @@ export const TxDetails = ({ txData, pubKey }: TxDetailsProps) => {
Hash | -{txData.hash} | +{txData.hash} |
Submitted by | -+ | {pubKey} |
Block | -+ | {txData.height} |
Encoded tnx | -{txData.tx} | +{txData.tx} |
{JSON.stringify(validators, null, ' ')}-
{JSON.stringify(data, null, ' ')}+
+ {JSON.stringify(validators, null, ' ')} ++
{JSON.stringify(data, null, ' ')}