listmonk/frontend/cypress/integration/dashboard.js

28 lines
785 B
JavaScript
Raw Normal View History

2021-02-20 16:19:14 +08:00
describe('Dashboard', () => {
it('Opens dashboard', () => {
cy.resetDB();
2021-02-20 16:19:14 +08:00
cy.loginAndVisit('/');
// List counts.
cy.get('[data-cy=lists] .title').contains('2');
2021-02-20 16:19:14 +08:00
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');
2021-12-09 23:17:52 +08:00
cy.get('[data-cy=campaigns-draft]').contains('1');
2021-02-20 16:19:14 +08:00
// Subscriber counts.
cy.get('[data-cy=subscribers] .title').contains('2');
2021-02-20 16:19:14 +08:00
cy.get('[data-cy=subscribers]')
.should('contain', '0 Blocklisted')
2021-02-20 16:19:14 +08:00
.and('contain', '0 Orphans');
// Message count.
cy.get('[data-cy=messages] .title').contains('0');
2021-02-20 16:19:14 +08:00
});
});