Health.spec.js 518 B

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