listmonk/frontend/cypress/integration/dashboard.js
Kailash Nadh e0bf1f1b77 Fix broken Cypress tests.
- DOM / UI / JS spaghetti state management is just ...
2021-09-25 18:05:15 +05:30

27 lines
785 B
JavaScript

describe('Dashboard', () => {
it('Opens dashboard', () => {
cy.resetDB();
cy.loginAndVisit('/');
// List counts.
cy.get('[data-cy=lists] .title').contains('2');
cy.get('[data-cy=lists]')
.and('contain', '1 Public')
.and('contain', '1 Private')
.and('contain', '1 Single opt-in')
.and('contain', '1 Double opt-in');
// Campaign counts.
cy.get('[data-cy=campaigns] .title').contains('1');
cy.get('[data-cy=campaigns]').contains('1 draft');
// Subscriber counts.
cy.get('[data-cy=subscribers] .title').contains('2');
cy.get('[data-cy=subscribers]')
.should('contain', '0 Blocklisted')
.and('contain', '0 Orphans');
// Message count.
cy.get('[data-cy=messages] .title').contains('0');
});
});