Skip to content

Commit

Permalink
chore(cli): Bump up Studio version to 0.365.0 (#6311)
Browse files Browse the repository at this point in the history
  • Loading branch information
Siddhant committed Mar 30, 2021
1 parent b9012e1 commit c21d6bd
Show file tree
Hide file tree
Showing 3 changed files with 246 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/packages/cli/package.json
Expand Up @@ -68,8 +68,8 @@
"@prisma/get-platform": "workspace:*",
"@prisma/migrate": "workspace:*",
"@prisma/sdk": "workspace:*",
"@prisma/studio": "0.359.0",
"@prisma/studio-server": "0.359.0",
"@prisma/studio": "0.365.0",
"@prisma/studio-server": "0.365.0",
"@timsuchanek/copy": "1.4.5",
"@types/jest": "26.0.22",
"@types/ws": "7.4.0",
Expand Down
243 changes: 243 additions & 0 deletions src/packages/cli/src/__tests__/__snapshots__/studio.test.ts.snap
@@ -0,0 +1,243 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`studio can respond to \`create\` queries 1`] = `
Object {
action: clientRequest,
channel: -prisma,
payload: Object {
data: Object {
params: Object {
action: create,
args: Object {
data: Object {
datetime: 2020-08-03T00:00:00.000Z,
float: 0,
id: 3,
int: 0,
relation: Object {
connect: Object {
id: 3,
},
},
relation_list: Object {
connect: Object {
id: 3,
},
},
string: ,
},
select: Object {
datetime: true,
float: true,
id: true,
int: true,
relation: true,
relation_list: true,
string: true,
},
},
clientMethod: with_all_field_types.create,
dataPath: Array [],
model: with_all_field_types,
runInTransaction: false,
},
response: Object {
datetime: 2020-08-03T00:00:00.000Z,
float: 0,
id: 3,
int: 0,
relation: Object {
id: 3,
name: Relation Target 003,
waft_id: 3,
},
relation_list: Array [
Object {
id: 3,
name: Relation Target 003,
waft_id: 3,
},
],
string: ,
},
},
error: null,
},
requestId: 1,
}
`;

exports[`studio can respond to \`delete\` queries 1`] = `
Object {
action: clientRequest,
channel: -prisma,
payload: Object {
data: Object {
params: Object {
action: delete,
args: Object {
select: Object {
datetime: true,
float: true,
id: true,
int: true,
relation: true,
relation_list: true,
string: true,
},
where: Object {
id: 2,
},
},
clientMethod: with_all_field_types.delete,
dataPath: Array [],
model: with_all_field_types,
runInTransaction: false,
},
response: Object {
datetime: 1970-01-01T00:00:00.000Z,
float: 0,
id: 2,
int: 0,
relation: Object {
id: 2,
name: Relation Target 002,
waft_id: 2,
},
relation_list: Array [],
string: Delete me,
},
},
error: null,
},
requestId: 1,
}
`;

exports[`studio can respond to \`findMany\` queries 1`] = `
Object {
action: clientRequest,
channel: -prisma,
payload: Object {
data: Object {
params: Object {
action: findMany,
args: Object {
select: Object {
datetime: true,
float: true,
id: true,
int: true,
relation: true,
relation_list: true,
string: true,
},
},
clientMethod: with_all_field_types.findMany,
dataPath: Array [],
model: with_all_field_types,
runInTransaction: false,
},
response: Array [
Object {
datetime: 2020-08-03T00:00:00.000Z,
float: 3.14,
id: 1,
int: 42,
relation: Object {
id: 1,
name: Relation Target 001,
waft_id: 1,
},
relation_list: Array [],
string: Some string,
},
Object {
datetime: 1970-01-01T00:00:00.000Z,
float: 0,
id: 2,
int: 0,
relation: Object {
id: 2,
name: Relation Target 002,
waft_id: 2,
},
relation_list: Array [],
string: Delete me,
},
],
},
error: null,
},
requestId: 1,
}
`;

exports[`studio can respond to \`update\` queries 1`] = `
Object {
action: clientRequest,
channel: -prisma,
payload: Object {
data: Object {
params: Object {
action: update,
args: Object {
data: Object {
datetime: 2025-08-03T00:00:00.000Z,
float: 100.5,
int: 100,
relation: Object {
connect: Object {
id: 3,
},
},
relation_list: Object {
connect: Object {
id: 3,
},
},
string: Changed String,
},
select: Object {
datetime: true,
float: true,
id: true,
int: true,
relation: true,
relation_list: true,
string: true,
},
where: Object {
id: 1,
},
},
clientMethod: with_all_field_types.update,
dataPath: Array [],
model: with_all_field_types,
runInTransaction: false,
},
response: Object {
datetime: 2025-08-03T00:00:00.000Z,
float: 100.5,
id: 1,
int: 100,
relation: Object {
id: 3,
name: Relation Target 003,
waft_id: 1,
},
relation_list: Array [
Object {
id: 3,
name: Relation Target 003,
waft_id: 1,
},
],
string: Changed String,
},
},
error: null,
},
requestId: 1,
}
`;
2 changes: 1 addition & 1 deletion src/packages/cli/src/__tests__/studio.test.ts
Expand Up @@ -21,7 +21,7 @@ const sendRequest = (message: any): Promise<any> => {
}

let studio: Studio
describe.skip('studio', () => {
describe('studio', () => {
beforeEach(async () => {
process.env.PRISMA_FORCE_NAPI = ''

Expand Down

0 comments on commit c21d6bd

Please sign in to comment.