Health.cy.js 494 B

1234567891011121314151617181920
  1. /// <reference types="cypress" />
  2. describe('Basic API checks', () => {
  3. it('Should return a valid health payload', () => {
  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', () => {
  12. cy.task('backendApiGet', {
  13. path: `/api/schema?ts=${Date.now()}`,
  14. }).then((data) => {
  15. expect(data.openapi).to.be.equal('3.1.0');
  16. });
  17. });
  18. });