Merge pull request #44449 from rhcs-dashboard/api-docs-e2e-test

mgr/dashboard: add test coverage for API docs (SwaggerUI)

Reviewed-by: Avan Thakkar <athakkar@redhat.com>
Reviewed-by: Nizamudeen A <nia@redhat.com>
Reviewed-by: Pere Diaz Bou <pdiazbou@redhat.com>
This commit is contained in:
Alfonso Martínez 2022-01-04 17:19:48 +01:00 committed by GitHub
commit 74cd6245b8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,15 @@
import { ApiDocsPageHelper } from 'cypress/integration/ui/api-docs.po';
describe('Api Docs Page', () => {
const apiDocs = new ApiDocsPageHelper();
beforeEach(() => {
cy.login();
Cypress.Cookies.preserveOnce('token');
apiDocs.navigateTo();
});
it('should show the API Docs description', () => {
cy.get('.renderedMarkdown').first().contains('This is the official Ceph REST API');
});
});

View File

@ -0,0 +1,5 @@
import { PageHelper } from '../page-helper.po';
export class ApiDocsPageHelper extends PageHelper {
pages = { index: { url: '#/api-docs', id: 'cd-api-docs' } };
}