graphql-engine/console/cypress/helpers/metadata.ts
Varun Choudhary 3879e65e7d console: add relationships tab on remote schema [CON-58]
PR-URL: https://github.com/hasura/graphql-engine-mono/pull/3852
Co-authored-by: Vijay Prasanna <11921040+vijayprasanna13@users.noreply.github.com>
GitOrigin-RevId: 275df81b75cf3db255b25a8adf2c1e7df9e31ded
2022-03-24 22:16:01 +00:00

18 lines
598 B
TypeScript

export const replaceMetadata = (newMetadata: Record<string, any>) => {
const postBody = { type: 'replace_metadata', args: newMetadata };
cy.request('POST', 'http://localhost:8080/v1/metadata', postBody).then(
response => {
expect(response.body).to.have.property('message', 'success'); // true
}
);
};
export const resetMetadata = () => {
const postBody = { type: 'clear_metadata', args: {} };
cy.request('POST', 'http://localhost:8080/v1/metadata', postBody).then(
response => {
expect(response.body).to.have.property('message', 'success'); // true
}
);
};