1
0
mirror of https://github.com/NginxProxyManager/nginx-proxy-manager.git synced 2025-07-29 19:01:13 +03:00

Adds test for dashboard endpoints

This commit is contained in:
Jamie Curnow
2025-03-24 14:34:45 +10:00
parent 79d28f03d0
commit 5e66d677f1
2 changed files with 26 additions and 0 deletions

View File

@ -0,0 +1,25 @@
/// <reference types="cypress" />
describe('Dashboard endpoints', () => {
let token;
before(() => {
cy.getToken().then((tok) => {
token = tok;
});
});
it('Should be able to get host counts', function() {
cy.task('backendApiGet', {
token: token,
path: '/api/reports/hosts'
}).then((data) => {
cy.validateSwaggerSchema('get', 200, '/reports/hosts', data);
expect(data).to.have.property('dead');
expect(data).to.have.property('proxy');
expect(data).to.have.property('redirection');
expect(data).to.have.property('stream');
});
});
});