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