Health.spec.js 489 B

1234567891011121314151617181920
  1. /// <reference types="Cypress" />
  2. describe('Basic API checks', () => {
  3. it('Should return a valid health payload', function () {
  4. cy.task('backendApiGet', {
  5. path: '/api/',
  6. }).then((data) => {
  7. // Check the swagger schema:
  8. cy.validateSwaggerSchema('get', 200, '/', data);
  9. });
  10. });
  11. it('Should return a valid schema payload', function () {
  12. cy.task('backendApiGet', {
  13. path: '/api/schema',
  14. }).then((data) => {
  15. expect(data.openapi).to.be.equal('3.0.0');
  16. });
  17. });
  18. });