vega-frontend-monorepo/apps/explorer-e2e/src/integration/validator.cy.js
Joe Tsang ee747aa12d
Test/694 block explorer refactor (#728)
* test: home page tests done

* test: asset and block tests added

* test: txs, market and network tests added

* chore: remove old test files

* test: remove Cypress command functions

* fix: failing block explorer tests in CI

* test: add wait for blocks

* test: re-add cypress functions

* chore: resolved PR comment
2022-07-13 11:17:10 +01:00

29 lines
874 B
JavaScript

import '../support/common.functions';
context('Validator page', function () {
describe('Verify elements on page', function () {
const validatorNavigation = 'a[href="/validators"]';
it('Validator page is displayed', function () {
cy.visit('/');
cy.get(validatorNavigation).click();
validateValidatorsDisplayed();
});
it('Validator page is displayed on mobile', function () {
cy.common_switch_to_mobile_and_click_toggle();
cy.get(validatorNavigation).click();
validateValidatorsDisplayed();
});
function validateValidatorsDisplayed() {
cy.get('[data-testid="tendermint-header"]').should(
'have.text',
'Tendermint data'
);
cy.get('[data-testid="vega-header"]').should('have.text', 'Vega data');
cy.get('[data-testid="vega-data"]').should('not.be.empty');
}
});
});