diff options
Diffstat (limited to 'spec/frontend/ml/model_registry/graphql_mock_data.js')
-rw-r--r-- | spec/frontend/ml/model_registry/graphql_mock_data.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/spec/frontend/ml/model_registry/graphql_mock_data.js b/spec/frontend/ml/model_registry/graphql_mock_data.js index 1c31ee4627f..27424fbf0df 100644 --- a/spec/frontend/ml/model_registry/graphql_mock_data.js +++ b/spec/frontend/ml/model_registry/graphql_mock_data.js @@ -114,3 +114,27 @@ export const emptyCandidateQuery = { }, }, }; + +export const createModelResponses = { + success: { + data: { + mlModelCreate: { + model: { + id: 'gid://gitlab/Ml::Model/1', + _links: { + showPath: '/some/project/-/ml/models/1', + }, + }, + errors: [], + }, + }, + }, + validationFailure: { + data: { + mlModelCreate: { + model: null, + errors: ['Name is invalid', "Name can't be blank"], + }, + }, + }, +}; |