test(token): added validation for vesting page without wallet connected (#673)

Co-authored-by: Rado <rado@vegaprotocol.io>
This commit is contained in:
Radosław Szpiech 2022-06-29 15:45:36 +02:00 committed by GitHub
parent 288a5d6268
commit 913703e2d8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,34 @@
import navigation from '../locators/navigation.locators';
import vesting from '../locators/vesting.locators';
context('Vesting Page - verify elements on page', function () {
before('navigate to vesting page', function () {
cy.visit('/')
.get(navigation.section)
.within(() => {
cy.get(navigation.vesting).click();
});
});
describe('with wallets disconnected', function () {
it('should have vesting tab highlighted', function () {
cy.get(navigation.section).within(() => {
cy.get(navigation.vesting).should('have.attr', 'aria-current');
});
});
it('should have VESTING header visible', function () {
cy.get(vesting.header).should('be.visible').and('have.text', 'Vesting');
});
it('should have connect Eth wallet info', function () {
cy.get(vesting.connectPrompt).should('be.visible');
});
it('should have connect Eth wallet button', function () {
cy.get(vesting.connectButton)
.should('be.visible')
.and('have.text', 'Connect Ethereum wallet');
});
});
});

View File

@ -0,0 +1,5 @@
export default {
header: 'header h1',
connectPrompt: '[data-testid="eth-connect-prompt"]',
connectButton: '[data-testid="connect-to-eth-btn"]',
};