mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-04-25 08:40:51 +00:00
Adds test for dashboard endpoints
All checks were successful
Close stale issues and PRs / stale (push) Successful in 18s
All checks were successful
Close stale issues and PRs / stale (push) Successful in 18s
This commit is contained in:
parent
79d28f03d0
commit
5e66d677f1
@ -18,6 +18,7 @@ services:
|
|||||||
MYSQL_DATABASE: 'npm'
|
MYSQL_DATABASE: 'npm'
|
||||||
MYSQL_USER: 'npm'
|
MYSQL_USER: 'npm'
|
||||||
MYSQL_PASSWORD: 'npmpass'
|
MYSQL_PASSWORD: 'npmpass'
|
||||||
|
MARIADB_AUTO_UPGRADE: '1'
|
||||||
volumes:
|
volumes:
|
||||||
- mysql_vol:/var/lib/mysql
|
- mysql_vol:/var/lib/mysql
|
||||||
networks:
|
networks:
|
||||||
|
25
test/cypress/e2e/api/Dashboard.cy.js
Normal file
25
test/cypress/e2e/api/Dashboard.cy.js
Normal 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');
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
});
|
Loading…
x
Reference in New Issue
Block a user