Dashboard.cy.js 571 B

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