@vendure/testing 2.0.0-next.2 → 2.0.0-next.21
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/config/test-config.d.ts +10 -0
- package/lib/config/test-config.js +12 -1
- package/lib/config/test-config.js.map +1 -1
- package/lib/simple-graphql-client.js +28 -28
- package/lib/test-server.js +4 -0
- package/lib/test-server.js.map +1 -1
- package/lib/testing-logger.d.ts +1 -1
- package/lib/testing-logger.js +1 -1
- package/package.json +4 -4
|
@@ -11,6 +11,16 @@ export declare const E2E_DEFAULT_CHANNEL_TOKEN = "e2e-default-channel";
|
|
|
11
11
|
* * `assetStorageStrategy: new TestingAssetStorageStrategy()` This strategy does not actually persist any binary data to disk.
|
|
12
12
|
* * `assetPreviewStrategy: new TestingAssetPreviewStrategy()` This strategy is a no-op.
|
|
13
13
|
*
|
|
14
|
+
* ## Logging
|
|
15
|
+
* By default, the testConfig does not output any log messages. This is most desirable to keep a clean CI output.
|
|
16
|
+
* However, for debugging purposes, it can make it hard to figure out why tests fail.
|
|
17
|
+
*
|
|
18
|
+
* You can enable default logging behaviour with the environment variable `LOG`:
|
|
19
|
+
*
|
|
20
|
+
* ```
|
|
21
|
+
* LOG=true yarn e2e
|
|
22
|
+
* ```
|
|
23
|
+
*
|
|
14
24
|
* @docsCategory testing
|
|
15
25
|
*/
|
|
16
26
|
export declare const testConfig: Required<VendureConfig>;
|
|
@@ -7,6 +7,7 @@ const testing_asset_preview_strategy_1 = require("./testing-asset-preview-strate
|
|
|
7
7
|
const testing_asset_storage_strategy_1 = require("./testing-asset-storage-strategy");
|
|
8
8
|
const testing_entity_id_strategy_1 = require("./testing-entity-id-strategy");
|
|
9
9
|
exports.E2E_DEFAULT_CHANNEL_TOKEN = 'e2e-default-channel';
|
|
10
|
+
const logger = process.env.LOG ? new core_1.DefaultLogger() : new core_1.NoopLogger();
|
|
10
11
|
/**
|
|
11
12
|
* @description
|
|
12
13
|
* A {@link VendureConfig} object used for e2e tests. This configuration uses sqljs as the database
|
|
@@ -18,6 +19,16 @@ exports.E2E_DEFAULT_CHANNEL_TOKEN = 'e2e-default-channel';
|
|
|
18
19
|
* * `assetStorageStrategy: new TestingAssetStorageStrategy()` This strategy does not actually persist any binary data to disk.
|
|
19
20
|
* * `assetPreviewStrategy: new TestingAssetPreviewStrategy()` This strategy is a no-op.
|
|
20
21
|
*
|
|
22
|
+
* ## Logging
|
|
23
|
+
* By default, the testConfig does not output any log messages. This is most desirable to keep a clean CI output.
|
|
24
|
+
* However, for debugging purposes, it can make it hard to figure out why tests fail.
|
|
25
|
+
*
|
|
26
|
+
* You can enable default logging behaviour with the environment variable `LOG`:
|
|
27
|
+
*
|
|
28
|
+
* ```
|
|
29
|
+
* LOG=true yarn e2e
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
21
32
|
* @docsCategory testing
|
|
22
33
|
*/
|
|
23
34
|
exports.testConfig = (0, core_1.mergeConfig)(core_1.defaultConfig, {
|
|
@@ -48,7 +59,7 @@ exports.testConfig = (0, core_1.mergeConfig)(core_1.defaultConfig, {
|
|
|
48
59
|
paymentOptions: {
|
|
49
60
|
paymentMethodHandlers: [],
|
|
50
61
|
},
|
|
51
|
-
logger
|
|
62
|
+
logger,
|
|
52
63
|
importExportOptions: {},
|
|
53
64
|
assetOptions: {
|
|
54
65
|
assetNamingStrategy: new core_1.DefaultAssetNamingStrategy(),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-config.js","sourceRoot":"","sources":["../../src/config/test-config.ts"],"names":[],"mappings":";;;AAAA,2EAAqF;AACrF,
|
|
1
|
+
{"version":3,"file":"test-config.js","sourceRoot":"","sources":["../../src/config/test-config.ts"],"names":[],"mappings":";;;AAAA,2EAAqF;AACrF,wCAOuB;AAEvB,qFAA+E;AAC/E,qFAA+E;AAC/E,6EAAuE;AAE1D,QAAA,yBAAyB,GAAG,qBAAqB,CAAC;AAE/D,MAAM,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,IAAI,oBAAa,EAAE,CAAC,CAAC,CAAC,IAAI,iBAAU,EAAE,CAAC;AAExE;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACU,QAAA,UAAU,GAA4B,IAAA,kBAAW,EAAC,oBAAa,EAAE;IAC1E,UAAU,EAAE;QACR,IAAI,EAAE,IAAI;QACV,YAAY,EAAE,iCAAc;QAC5B,WAAW,EAAE,gCAAa;QAC1B,IAAI,EAAE,IAAI;KACb;IACD,mBAAmB,EAAE,iCAAyB;IAC9C,WAAW,EAAE;QACT,WAAW,EAAE,QAAQ;QACrB,mBAAmB,EAAE,IAAI;QACzB,aAAa,EAAE;YACX,MAAM,EAAE,aAAa;SACxB;KACJ;IACD,mBAAmB,EAAE;QACjB,IAAI,EAAE,OAAO;QACb,QAAQ,EAAE,IAAI,UAAU,CAAC,EAAE,CAAC;QAC5B,QAAQ,EAAE,EAAE;QACZ,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,KAAK;KACjB;IACD,gBAAgB,EAAE,EAAE;IACpB,YAAY,EAAE,EAAE;IAChB,aAAa,EAAE,EAAE,gBAAgB,EAAE,IAAI,oDAAuB,EAAE,EAAE;IAClE,cAAc,EAAE;QACZ,qBAAqB,EAAE,EAAE;KAC5B;IACD,MAAM;IACN,mBAAmB,EAAE,EAAE;IACvB,YAAY,EAAE;QACV,mBAAmB,EAAE,IAAI,iCAA0B,EAAE;QACrD,oBAAoB,EAAE,IAAI,4DAA2B,EAAE;QACvD,oBAAoB,EAAE,IAAI,4DAA2B,EAAE;KAC1D;CACJ,CAAC,CAAC"}
|
|
@@ -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/lib/test-server.js
CHANGED
|
@@ -117,6 +117,10 @@ class TestServer {
|
|
|
117
117
|
cors: config.apiOptions.cors,
|
|
118
118
|
logger: new core_2.Logger(),
|
|
119
119
|
});
|
|
120
|
+
const earlyMiddlewares = config.apiOptions.middleware.filter(mid => mid.beforeListen);
|
|
121
|
+
earlyMiddlewares.forEach(mid => {
|
|
122
|
+
app.use(mid.route, mid.handler);
|
|
123
|
+
});
|
|
120
124
|
await app.listen(config.apiOptions.port);
|
|
121
125
|
await app.get(core_2.JobQueueService).start();
|
|
122
126
|
core_2.DefaultLogger.restoreOriginalLogLevel();
|
package/lib/test-server.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"test-server.js","sourceRoot":"","sources":["../src/test-server.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;AACA,uCAA2C;AAC3C,wCAAsF;AACtF,4DAAkE;AAElE,iFAA4E;AAC5E,8DAAgE;AAGhE,4BAA4B;AAC5B;;;;;GAKG;AACH,MAAa,UAAU;IAGnB,YAAoB,aAAsC;QAAtC,kBAAa,GAAb,aAAa,CAAyB;IAAG,CAAC;IAE9D;;;;;;;OAOG;IACH,KAAK,CAAC,IAAI,CAAC,OAA0B;QACjC,MAAM,EAAE,IAAI,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC,mBAAmB,CAAC;QACxD,MAAM,EAAE,mBAAmB,EAAE,GAAG,IAAI,CAAC,aAAa,CAAC;QACnD,MAAM,YAAY,GAAG,IAAI,CAAC,iBAAiB,CAAC,CAAC,CAAC,CAAC;QAC/C,MAAM,WAAW,GAAG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,GAAG,MAAM,IAAA,8BAAkB,EAAC,UAAU,CAAC,CAAC;QACpD,aAAM,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC;QAChC,MAAM,SAAS,GAAG,wDAAa,+BAA+B,GAAC,CAAC;QAChE,IAAI;YACA,oBAAa,CAAC,oBAAoB,EAAE,CAAC;YACrC,MAAM,GAAG,GAAG,MAAM,kBAAW,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,EAAE;gBACtD,IAAI,EAAE,MAAM,CAAC,UAAU,CAAC,IAAI;gBAC5B,MAAM,EAAE,IAAI,aAAM,EAAE;aACvB,CAAC,CAAC;YACH,MAAM,gBAAgB,GAAG,MAAM,CAAC,UAAU,CAAC,UAAU,CAAC,MAAM,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,CAAC,YAAY,CAAC,CAAC;YACtF,gBAAgB,CAAC,OAAO,CAAC,GAAG,CAAC,EAAE;gBAC3B,GAAG,CAAC,GAAG,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,OAAO,CAAC,CAAC;YACpC,CAAC,CAAC,CAAC;YACH,MAAM,GAAG,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;YACzC,MAAM,GAAG,CAAC,GAAG,CAAC,sBAAe,CAAC,CAAC,KAAK,EAAE,CAAC;YACvC,oBAAa,CAAC,uBAAuB,EAAE,CAAC;YACxC,OAAO,GAAG,CAAC;SACd;QAAC,OAAO,CAAM,EAAE;YACb,OAAO,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;YACf,MAAM,CAAC,CAAC;SACX;IACL,CAAC;CACJ;AAjHD,gCAiHC"}
|
package/lib/testing-logger.d.ts
CHANGED
|
@@ -2,7 +2,7 @@ import { VendureLogger } from '@vendure/core';
|
|
|
2
2
|
/**
|
|
3
3
|
* @description
|
|
4
4
|
* The TestingLogger can be used in unit tests or e2e tests to make assertions on whether the various
|
|
5
|
-
* Logger methods have been called, and which
|
|
5
|
+
* Logger methods have been called, and which arguments.
|
|
6
6
|
*
|
|
7
7
|
* Here's some examples of how to use it in e2e tests and unit tests. In both cases we are using
|
|
8
8
|
* the Jest testing framework, but the TestingLogger should work with other similar frameworks
|
package/lib/testing-logger.js
CHANGED
|
@@ -4,7 +4,7 @@ exports.TestingLogger = void 0;
|
|
|
4
4
|
/**
|
|
5
5
|
* @description
|
|
6
6
|
* The TestingLogger can be used in unit tests or e2e tests to make assertions on whether the various
|
|
7
|
-
* Logger methods have been called, and which
|
|
7
|
+
* Logger methods have been called, and which arguments.
|
|
8
8
|
*
|
|
9
9
|
* Here's some examples of how to use it in e2e tests and unit tests. In both cases we are using
|
|
10
10
|
* the Jest testing framework, but the TestingLogger should work with other similar frameworks
|
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.21",
|
|
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.21",
|
|
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.21",
|
|
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": "a1f3cffd598a0c634f86934b70e7c551c3817860"
|
|
55
55
|
}
|