mirror of
https://github.com/NginxProxyManager/nginx-proxy-manager.git
synced 2025-11-13 05:45:15 +00:00
- Added frontend translation for english - Moved frontend api logic to hook and backend api space - Added swagger schema for the new api endpoint - Moved backend logic to its own internal file - Added user agent header to github api check - Added cypress integration test for version check api - Added a memory cache item from github check to avoid hitting it too much
29 lines
733 B
JavaScript
29 lines
733 B
JavaScript
/// <reference types="cypress" />
|
|
|
|
describe('Basic API checks', () => {
|
|
it('Should return a valid health payload', () => {
|
|
cy.task('backendApiGet', {
|
|
path: '/api/',
|
|
}).then((data) => {
|
|
// Check the swagger schema:
|
|
cy.validateSwaggerSchema('get', 200, '/', data);
|
|
});
|
|
});
|
|
|
|
it('Should return a valid schema payload', () => {
|
|
cy.task('backendApiGet', {
|
|
path: `/api/schema?ts=${Date.now()}`,
|
|
}).then((data) => {
|
|
expect(data.openapi).to.be.equal('3.1.0');
|
|
});
|
|
});
|
|
|
|
it('Should return a valid payload for version check', () => {
|
|
cy.task('backendApiGet', {
|
|
path: `/api/version/check?ts=${Date.now()}`,
|
|
}).then((data) => {
|
|
cy.validateSwaggerSchema('get', 200, '/version/check', data);
|
|
});
|
|
});
|
|
});
|