From fcee0c3452f3b241a2e2b8d929b5bbae6f92606d Mon Sep 17 00:00:00 2001 From: Yoann Abbes Date: Fri, 2 Oct 2020 14:44:06 +0200 Subject: [PATCH 1/3] unsubscribe return void --- src/controllers/Realtime.ts | 4 +--- test/controllers/realtime.test.js | 4 +--- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/controllers/Realtime.ts b/src/controllers/Realtime.ts index 1d1b391c2..1d8c272fb 100644 --- a/src/controllers/Realtime.ts +++ b/src/controllers/Realtime.ts @@ -187,7 +187,7 @@ export class RealtimeController extends BaseController { }; return this.query(request, options) - .then(response => { + .then(() => { const rooms = this._subscriptions.get(roomId); if (rooms) { @@ -197,8 +197,6 @@ export class RealtimeController extends BaseController { this._subscriptions.delete(roomId); } - - return response.result; }); } diff --git a/test/controllers/realtime.test.js b/test/controllers/realtime.test.js index 698ecd767..da7ec971b 100644 --- a/test/controllers/realtime.test.js +++ b/test/controllers/realtime.test.js @@ -239,7 +239,7 @@ describe('Realtime Controller', () => { it('should call realtime/unsubscribe query with the roomId and return a Promise which resolves the roomId', () => { return kuzzle.realtime.unsubscribe(roomId, options) - .then(res => { + .then(() => { should(kuzzle.query) .be.calledOnce() .be.calledWith({ @@ -247,8 +247,6 @@ describe('Realtime Controller', () => { action: 'unsubscribe', body: {roomId} }, options); - - should(res).be.equal(roomId); }); }); }); From ab49ace24b4a1e79145c09a6e752ff57f5261a83 Mon Sep 17 00:00:00 2001 From: Yoann Abbes Date: Fri, 2 Oct 2020 16:27:27 +0200 Subject: [PATCH 2/3] specify cypress record key --- doc/7/getting-started/.react/with-redux/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/7/getting-started/.react/with-redux/package.json b/doc/7/getting-started/.react/with-redux/package.json index 2d4661e8f..6266aaee7 100644 --- a/doc/7/getting-started/.react/with-redux/package.json +++ b/doc/7/getting-started/.react/with-redux/package.json @@ -16,7 +16,7 @@ "postinstall": "if [ ! -f ../../../../../dist/kuzzle.js ]; then npm run build --prefix ../../../../../;fi && rm -rf ./node_modules/kuzzle-sdk/* && rsync -r --exclude 'getting-started' ../../../../../ ./node_modules/kuzzle-sdk", "start": "react-scripts start", "build": "react-scripts build", - "test": "./node_modules/.bin/cypress run --record", + "test": "./node_modules/.bin/cypress run --record --key $CYPRESS_RECORD_KEY_DOC", "eject": "react-scripts eject" }, "eslintConfig": { From c8b7cd98df03debc152d41de7d270e6301c25e1f Mon Sep 17 00:00:00 2001 From: Yoann Abbes Date: Fri, 2 Oct 2020 16:53:27 +0200 Subject: [PATCH 3/3] specify cypress record key --- doc/7/getting-started/.react-native/package.json | 2 +- doc/7/getting-started/.vuejs/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/7/getting-started/.react-native/package.json b/doc/7/getting-started/.react-native/package.json index 2715fc54b..270fbb877 100644 --- a/doc/7/getting-started/.react-native/package.json +++ b/doc/7/getting-started/.react-native/package.json @@ -7,7 +7,7 @@ "ios": "node_modules/.bin/expo-cli start --ios", "web": "node_modules/.bin/expo-cli start --web", "eject": "node_modules/.bin/expo-cli eject", - "test": "node_modules/.bin/cypress run --record" + "test": "node_modules/.bin/cypress run --record --key $CYPRESS_RECORD_KEY_DOC" }, "dependencies": { "cypress": "^3.8.1", diff --git a/doc/7/getting-started/.vuejs/package.json b/doc/7/getting-started/.vuejs/package.json index d0c39fd37..55f01cfe4 100644 --- a/doc/7/getting-started/.vuejs/package.json +++ b/doc/7/getting-started/.vuejs/package.json @@ -10,7 +10,7 @@ "serve-with-vuex": "cd with-vuex && vue-cli-service serve", "build-with-vuex": "cd with-vuex && vue-cli-service build", "lint-with-vuex": "cd with-vuex && vue-cli-service lint", - "test": "./node_modules/.bin/cypress run --record" + "test": "./node_modules/.bin/cypress run --record --key $CYPRESS_RECORD_KEY_DOC" }, "dependencies": { "core-js": "^2.6.5",