Tweaks to cypress suite
All checks were successful
Close stale issues and PRs / stale (push) Successful in 20s

This commit is contained in:
Jamie Curnow
2025-11-18 07:21:06 +10:00
parent 9b4c34915c
commit 316b758455
5 changed files with 54 additions and 35 deletions

View File

@@ -1,21 +1,7 @@
/// <reference types="cypress" />
const SWAGGER_SCHEMA_FILENAME = 'results/swagger-schema.json';
describe('Swagger Schema Linting', () => {
it('Should be a completely valid schema', () => {
// Save the schema to a file and lint it
cy.request('/api/schema')
.then((response) => {
const fileContent = response.body;
cy.writeFile(SWAGGER_SCHEMA_FILENAME, fileContent);
})
.then(() => {
cy.exec(`yarn swagger-lint '${SWAGGER_SCHEMA_FILENAME}'`)
.then((result) => {
cy.log("Swagger Vacuum Results:\n", result.stdout);
expect(result.code).to.eq(0);
});
});
cy.validateSwaggerFile('/api/schema', 'results/swagger-schema.json');
});
});