From f89555f9018fc698f42ac88a8ba0f34ed8b0b7b2 Mon Sep 17 00:00:00 2001 From: aranega Date: Wed, 18 Oct 2023 02:35:28 -0600 Subject: [PATCH 1/2] Fix issue with fast delete of field content When a field content is deleted too quickly (before the sync mechanism happens), an exception is raised in the Python side. This behavior doesn't occur if you type a value in a field, wait a little bit that the sync happens, and delete it. What's happening is that the code related to the netpyne field tries to delete a key that doesn't exists yet (see the video below). The fix removes this behavior (see video below) --- webapp/components/general/NetPyNEField.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/webapp/components/general/NetPyNEField.js b/webapp/components/general/NetPyNEField.js index 65f4cd2e..c5b67380 100644 --- a/webapp/components/general/NetPyNEField.js +++ b/webapp/components/general/NetPyNEField.js @@ -46,7 +46,11 @@ export default class NetPyNEField extends Component { !this.model.split('.')[0].startsWith('simConfig') || this.model.split('.')[1].startsWith('analysis') ) { - Utils.execPythonMessage(`del netpyne_geppetto.${this.model}`); + Utils.execPythonMessage(` + try: + del netpyne_geppetto.${this.model} + except KeyError: + ...`); } } return value; From 343a0a7e3856e95c1cbca4758126cafb1870401d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sim=C3=A3o=20s=C3=A1?= Date: Tue, 31 Oct 2023 10:30:43 +0000 Subject: [PATCH 2/2] fix selector in test step --- tests/frontend/e2e/tests/RxD.test.js | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/tests/frontend/e2e/tests/RxD.test.js b/tests/frontend/e2e/tests/RxD.test.js index aef64f39..82747916 100644 --- a/tests/frontend/e2e/tests/RxD.test.js +++ b/tests/frontend/e2e/tests/RxD.test.js @@ -230,11 +230,7 @@ describe('RxD testing', () => { await page.waitForSelector('button[aria-selected="true"][id = "simple-tab-1"]') - const no_regions_text = await page.$$eval('#simple-tabpanel-1', no_regions_text => { - return no_regions_text.map(no_regions_text => no_regions_text.innerText) - }) - - expect(no_regions_text).toContain('There are no Species yet.') + await page.waitForSelector('#ip3') console.log('Species tab opened') await page.waitForTimeout(PAGE_WAIT)