Dashboard.cy.js 590 B

1234567891011121314151617181920212223242526
  1. /// <reference types="cypress" />
  2. describe('Dashboard endpoints', () => {
  3. let token;
  4. before(() => {
  5. cy.resetUsers();
  6. cy.getToken().then((tok) => {
  7. token = tok;
  8. });
  9. });
  10. it('Should be able to get host counts', () => {
  11. cy.task('backendApiGet', {
  12. token: token,
  13. path: '/api/reports/hosts'
  14. }).then((data) => {
  15. cy.validateSwaggerSchema('get', 200, '/reports/hosts', data);
  16. expect(data).to.have.property('dead');
  17. expect(data).to.have.property('proxy');
  18. expect(data).to.have.property('redirection');
  19. expect(data).to.have.property('stream');
  20. });
  21. });
  22. });