Remaining tests added and passing
This commit is contained in:
parent
de80be7196
commit
615562af54
6
apps/explorer-e2e/src/integration/blocks-page.feature
Normal file
6
apps/explorer-e2e/src/integration/blocks-page.feature
Normal file
@ -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
|
@ -1,4 +1,4 @@
|
|||||||
Feature: Home page
|
Feature: Home page
|
||||||
|
|
||||||
Scenario: Visit Home page
|
Scenario: Visit Home page
|
||||||
Given I go to the homepage
|
Given I am on the homepage
|
||||||
|
6
apps/explorer-e2e/src/integration/markets-page.feature
Normal file
6
apps/explorer-e2e/src/integration/markets-page.feature
Normal file
@ -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
|
6
apps/explorer-e2e/src/integration/network-page.feature
Normal file
6
apps/explorer-e2e/src/integration/network-page.feature
Normal file
@ -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
|
@ -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
|
@ -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');
|
|
||||||
}
|
|
||||||
}
|
|
@ -21,6 +21,8 @@ export default class TransactionsPage extends BasePage {
|
|||||||
.first()
|
.first()
|
||||||
.invoke('text')
|
.invoke('text')
|
||||||
.then((blockHeightTxt) => {
|
.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.refreshBtn).click();
|
||||||
|
|
||||||
cy.getByTestId(this.blockHeight)
|
cy.getByTestId(this.blockHeight)
|
||||||
|
@ -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();
|
||||||
|
});
|
@ -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';
|
import TransactionsPage from '../pages/transactions-page';
|
||||||
const transactionsPage = new TransactionsPage();
|
const transactionsPage = new TransactionsPage();
|
||||||
@ -7,7 +7,16 @@ When('I navigate to the transactions page', () => {
|
|||||||
transactionsPage.navigateToTxs();
|
transactionsPage.navigateToTxs();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
When('I navigate to the blocks page', () => {
|
||||||
|
transactionsPage.navigateToBlocks();
|
||||||
|
});
|
||||||
|
|
||||||
Then('transactions page is correctly displayed', () => {
|
Then('transactions page is correctly displayed', () => {
|
||||||
transactionsPage.validateTransactionsPagedisplayed();
|
transactionsPage.validateTransactionsPagedisplayed();
|
||||||
transactionsPage.validateRefreshBtn();
|
transactionsPage.validateRefreshBtn();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
Then('blocks page is correctly displayed', () => {
|
||||||
|
transactionsPage.validateTransactionsPagedisplayed();
|
||||||
|
transactionsPage.validateRefreshBtn();
|
||||||
|
});
|
||||||
|
@ -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();
|
||||||
|
});
|
@ -17,12 +17,12 @@ export const TxDetails = ({ txData, pubKey }: TxDetailsProps) => {
|
|||||||
<Table>
|
<Table>
|
||||||
<tr>
|
<tr>
|
||||||
<td>Hash</td>
|
<td>Hash</td>
|
||||||
<td>{txData.hash}</td>
|
<td data-testid="hash">{txData.hash}</td>
|
||||||
</tr>
|
</tr>
|
||||||
{pubKey ? (
|
{pubKey ? (
|
||||||
<tr>
|
<tr>
|
||||||
<td>Submitted by</td>
|
<td>Submitted by</td>
|
||||||
<td>
|
<td data-testid="submitted-by">
|
||||||
<Link to={`/${Routes.PARTIES}/${pubKey}`}>{pubKey}</Link>
|
<Link to={`/${Routes.PARTIES}/${pubKey}`}>{pubKey}</Link>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
@ -35,14 +35,14 @@ export const TxDetails = ({ txData, pubKey }: TxDetailsProps) => {
|
|||||||
{txData.height ? (
|
{txData.height ? (
|
||||||
<tr>
|
<tr>
|
||||||
<td>Block</td>
|
<td>Block</td>
|
||||||
<td>
|
<td data-testid="block">
|
||||||
<Link to={`/blocks/${txData.height}`}>{txData.height}</Link>
|
<Link to={`/blocks/${txData.height}`}>{txData.height}</Link>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
) : null}
|
) : null}
|
||||||
<tr>
|
<tr>
|
||||||
<td>Encoded tnx</td>
|
<td>Encoded tnx</td>
|
||||||
<td>{txData.tx}</td>
|
<td data-testid="encoded-tnx">{txData.tx}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</Table>
|
</Table>
|
||||||
);
|
);
|
||||||
|
@ -44,10 +44,12 @@ const Validators = () => {
|
|||||||
return (
|
return (
|
||||||
<section>
|
<section>
|
||||||
<h1>Validators</h1>
|
<h1>Validators</h1>
|
||||||
<h2>Tendermint data</h2>
|
<h2 data-testid="tendermint-header">Tendermint data</h2>
|
||||||
<pre>{JSON.stringify(validators, null, ' ')}</pre>
|
<pre data-testid="tendermint-data">
|
||||||
<h2>Vega data</h2>
|
{JSON.stringify(validators, null, ' ')}
|
||||||
<pre>{JSON.stringify(data, null, ' ')}</pre>
|
</pre>
|
||||||
|
<h2 data-testid="vega-header">Vega data</h2>
|
||||||
|
<pre data-testid="vega-data">{JSON.stringify(data, null, ' ')}</pre>
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user