graphql-engine/console/cypress/e2e/api-explorer/graphql/test.ts

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

41 lines
954 B
TypeScript
Raw Normal View History

import {
openAPIExplorer,
checkQuery,
checkMutation,
createTestTable,
insertValue,
checkSub,
delTestTable,
} from './spec';
2018-06-28 07:57:37 +03:00
import { setMetaData } from '../../validators/validators';
import { testMode } from '../../../helpers/common';
2018-06-28 07:57:37 +03:00
const setup = () => {
describe('Setup route', () => {
it('Visit the index route', () => {
// Visit the index route
cy.visit('/');
// Get and set validation metadata
setMetaData();
});
});
};
export const runApiExplorerTests = () => {
describe('API Explorer', () => {
it('Create test table', createTestTable);
it('Insert row into test table', insertValue);
2018-06-28 07:57:37 +03:00
it('Open API Explorer', openAPIExplorer);
it('Check query result', checkQuery);
it('Check mutation result', checkMutation);
it('Check subscription result', checkSub);
it('Delete test table', delTestTable);
2018-06-28 07:57:37 +03:00
});
};
if (testMode !== 'cli') {
setup();
runApiExplorerTests();
}