mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-12-17 04:24:35 +03:00
fc753ffb42
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/4849 GitOrigin-RevId: 10e0fd62344a0c5c7028ad480b747b7f64c9c773
41 lines
954 B
TypeScript
41 lines
954 B
TypeScript
import {
|
|
openAPIExplorer,
|
|
checkQuery,
|
|
checkMutation,
|
|
createTestTable,
|
|
insertValue,
|
|
checkSub,
|
|
delTestTable,
|
|
} from './spec';
|
|
|
|
import { setMetaData } from '../../validators/validators';
|
|
import { testMode } from '../../../helpers/common';
|
|
|
|
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);
|
|
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);
|
|
});
|
|
};
|
|
|
|
if (testMode !== 'cli') {
|
|
setup();
|
|
runApiExplorerTests();
|
|
}
|