From 7360fec9493f4779789874a6f903ef1fccca62eb Mon Sep 17 00:00:00 2001 From: MariiaNebesnova Date: Thu, 19 Aug 2021 14:38:05 +0300 Subject: [PATCH 1/3] fix tab uodate --- src/js/blocks/autoFind/autoFindProvider/connector.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/js/blocks/autoFind/autoFindProvider/connector.js b/src/js/blocks/autoFind/autoFindProvider/connector.js index 291c6a8..a5868d6 100644 --- a/src/js/blocks/autoFind/autoFindProvider/connector.js +++ b/src/js/blocks/autoFind/autoFindProvider/connector.js @@ -2,7 +2,7 @@ class Connector { constructor() { this.tab = null; this.port = null; - this.getPageId(); + this.getTab(); this.onerror = null; } @@ -12,7 +12,7 @@ class Connector { else throw error; } - getPageId() { + getTab() { chrome.tabs.query({ active: true, currentWindow: true }, (res) => { if (res && res[0]) this.tab = res[0]; else this.handleError("Connector: active page id is not available."); @@ -43,6 +43,7 @@ class Connector { changeinfo.status === "complete" && this.tab.id === tabId ) { + this.getTab(); if (this.port) { this.port.disconnect(); this.port = null; From 62199bc774aeeacc5c122d662ccf006182336d2a Mon Sep 17 00:00:00 2001 From: MariiaNebesnova Date: Fri, 20 Aug 2021 13:43:03 +0300 Subject: [PATCH 2/3] ver up --- manifest.json | 2 +- package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/manifest.json b/manifest.json index ed169dc..515ebd1 100644 --- a/manifest.json +++ b/manifest.json @@ -3,7 +3,7 @@ "name": "JDN", "description": "", "devtools_page": "index.html", - "version": "3.0.41", + "version": "3.0.42", "permissions": [ "activeTab", "tabs", diff --git a/package.json b/package.json index 2781750..1d3e0a0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "jdi-react-extension", - "version": "3.0.41", + "version": "3.0.42", "description": "jdi react extension", "scripts": { "start": "npm run webpack", From 3fdfe563e0dafc672addd6cf2585393ebfc05584 Mon Sep 17 00:00:00 2001 From: MariiaNebesnova Date: Fri, 20 Aug 2021 13:56:07 +0300 Subject: [PATCH 3/3] fix tests --- package-lock.json | 2 +- src/js/blocks/autoFind/tests/autoFind.test.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package-lock.json b/package-lock.json index 1e81a43..9aa708e 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "jdi-react-extension", - "version": "3.0.40", + "version": "3.0.42", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/src/js/blocks/autoFind/tests/autoFind.test.js b/src/js/blocks/autoFind/tests/autoFind.test.js index 6ed344c..f6643ed 100644 --- a/src/js/blocks/autoFind/tests/autoFind.test.js +++ b/src/js/blocks/autoFind/tests/autoFind.test.js @@ -53,7 +53,7 @@ describe("AutoFind Identify functionality", () => { ); jest.clearAllMocks(); - jest.spyOn(connector, "getPageId").mockReturnValue( + jest.spyOn(connector, "getTab").mockReturnValue( (() => { connector.tab = { id: "42" }; })()