test(governance): check proposals on homepage (#2908)

This commit is contained in:
Joe Tsang 2023-02-17 15:17:04 +00:00 committed by GitHub
parent ea4c7a4a37
commit 196f1914a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 4 deletions

View File

@ -63,6 +63,39 @@ context('Home Page - verify elements on page', { tags: '@smoke' }, function () {
.and('have.text', 'Browse, vote, and propose'); .and('have.text', 'Browse, vote, and propose');
}); });
}); });
it('should show open or enacted proposals with proposal summary', function () {
cy.get('body').then(($body) => {
if (!$body.find('[data-testid="proposals-list-item"]').length) {
cy.createMarket();
cy.reload();
cy.wait_for_spinner();
}
});
cy.getByTestId('proposals-list-item')
.should('have.length.at.least', 1)
.first()
.within(() => {
cy.getByTestId('proposal-title')
.invoke('text')
.should('not.be.empty');
cy.getByTestId('proposal-type')
.invoke('text')
.should('not.be.empty');
cy.getByTestId('proposal-description')
.invoke('text')
.should('not.be.empty');
cy.getByTestId('proposal-details')
.invoke('text')
.should('not.be.empty');
cy.getByTestId('proposal-status')
.invoke('text')
.should('not.be.empty');
cy.getByTestId('vote-details')
.invoke('text')
.should('not.be.empty');
cy.getByTestId('view-proposal-btn').should('be.visible');
});
});
it('should have external link for governance', function () { it('should have external link for governance', function () {
cy.getByTestId('home-proposals').within(() => { cy.getByTestId('home-proposals').within(() => {
cy.getByTestId('external-link') cy.getByTestId('external-link')

View File

@ -30,11 +30,11 @@ context('Staking Page - verify elements on page', function () {
describe('with wallets disconnected', { tags: '@smoke' }, function () { describe('with wallets disconnected', { tags: '@smoke' }, function () {
describe('description section', function () { describe('description section', function () {
it('Should have staking tab highlighted', function () { it('Should have validators tab highlighted', function () {
cy.verify_tab_highlighted('validators'); cy.verify_tab_highlighted('validators');
}); });
it('Should have STAKING ON VEGA header visible', function () { it('Should have validators ON VEGA header visible', function () {
cy.verify_page_header('Validators'); cy.verify_page_header('Validators');
}); });

View File

@ -338,8 +338,8 @@ context(
.contains(currency.id) .contains(currency.id)
.parent() .parent()
.siblings() .siblings()
.within(() => cy.contains_exactly('10.00').should('be.visible')); .invoke('text')
.should('not.be.empty');
cy.get(vegaWalletCurrencyTitle) cy.get(vegaWalletCurrencyTitle)
.contains(currency.id) .contains(currency.id)
.parent() .parent()