@vendure/testing 2.0.0-next.10 → 2.0.0-next.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/simple-graphql-client.js +28 -28
- package/package.json +4 -4
|
@@ -12,22 +12,22 @@ const printer_1 = require("graphql/language/printer");
|
|
|
12
12
|
const node_fetch_1 = __importDefault(require("node-fetch"));
|
|
13
13
|
const querystring_1 = require("querystring");
|
|
14
14
|
const create_upload_post_data_1 = require("./utils/create-upload-post-data");
|
|
15
|
-
const LOGIN = (0, graphql_tag_1.default) `
|
|
16
|
-
mutation($username: String!, $password: String!) {
|
|
17
|
-
login(username: $username, password: $password) {
|
|
18
|
-
... on CurrentUser {
|
|
19
|
-
id
|
|
20
|
-
identifier
|
|
21
|
-
channels {
|
|
22
|
-
token
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
... on ErrorResult {
|
|
26
|
-
errorCode
|
|
27
|
-
message
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
}
|
|
15
|
+
const LOGIN = (0, graphql_tag_1.default) `
|
|
16
|
+
mutation($username: String!, $password: String!) {
|
|
17
|
+
login(username: $username, password: $password) {
|
|
18
|
+
... on CurrentUser {
|
|
19
|
+
id
|
|
20
|
+
identifier
|
|
21
|
+
channels {
|
|
22
|
+
token
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
... on ErrorResult {
|
|
26
|
+
errorCode
|
|
27
|
+
message
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
31
|
`;
|
|
32
32
|
// tslint:disable:no-console
|
|
33
33
|
/**
|
|
@@ -114,12 +114,12 @@ class SimpleGraphQLClient {
|
|
|
114
114
|
var _a;
|
|
115
115
|
// first log out as the current user
|
|
116
116
|
if (this.authToken) {
|
|
117
|
-
await this.query((0, graphql_tag_1.default) `
|
|
118
|
-
mutation {
|
|
119
|
-
logout {
|
|
120
|
-
success
|
|
121
|
-
}
|
|
122
|
-
}
|
|
117
|
+
await this.query((0, graphql_tag_1.default) `
|
|
118
|
+
mutation {
|
|
119
|
+
logout {
|
|
120
|
+
success
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
123
|
`);
|
|
124
124
|
}
|
|
125
125
|
const result = await this.query(LOGIN, { username, password });
|
|
@@ -142,12 +142,12 @@ class SimpleGraphQLClient {
|
|
|
142
142
|
* Logs out so that the client is then treated as an anonymous user.
|
|
143
143
|
*/
|
|
144
144
|
async asAnonymousUser() {
|
|
145
|
-
await this.query((0, graphql_tag_1.default) `
|
|
146
|
-
mutation {
|
|
147
|
-
logout {
|
|
148
|
-
success
|
|
149
|
-
}
|
|
150
|
-
}
|
|
145
|
+
await this.query((0, graphql_tag_1.default) `
|
|
146
|
+
mutation {
|
|
147
|
+
logout {
|
|
148
|
+
success
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
151
|
`);
|
|
152
152
|
}
|
|
153
153
|
async makeGraphQlRequest(query, variables, queryParams) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vendure/testing",
|
|
3
|
-
"version": "2.0.0-next.
|
|
3
|
+
"version": "2.0.0-next.13",
|
|
4
4
|
"description": "End-to-end testing tools for Vendure projects",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"vendure",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@types/node-fetch": "^2.5.4",
|
|
37
|
-
"@vendure/common": "^2.0.0-next.
|
|
37
|
+
"@vendure/common": "^2.0.0-next.13",
|
|
38
38
|
"faker": "^4.1.0",
|
|
39
39
|
"form-data": "^3.0.0",
|
|
40
40
|
"graphql": "16.3.0",
|
|
@@ -45,11 +45,11 @@
|
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@types/mysql": "^2.15.15",
|
|
47
47
|
"@types/pg": "^7.14.5",
|
|
48
|
-
"@vendure/core": "^2.0.0-next.
|
|
48
|
+
"@vendure/core": "^2.0.0-next.13",
|
|
49
49
|
"mysql": "^2.18.1",
|
|
50
50
|
"pg": "^8.4.0",
|
|
51
51
|
"rimraf": "^3.0.0",
|
|
52
52
|
"typescript": "4.5.5"
|
|
53
53
|
},
|
|
54
|
-
"gitHead": "
|
|
54
|
+
"gitHead": "c4877c253da7ad10dd26450e9a1b1e06901d5872"
|
|
55
55
|
}
|