diff options
author | Sunil Shetye | 2025-06-12 07:25:46 +0530 |
---|---|---|
committer | Sunil Shetye | 2025-06-12 08:02:02 +0530 |
commit | 72341b22d2c63be5216beb1f4cd9a61f6f493afe (patch) | |
tree | 2c048c51e5d2fe86ebbf2707915abbd78d473e4d | |
parent | 5227933c9553f57398ec20bd8a5228e46089ea5e (diff) | |
download | Common-Interface-Project-72341b22d2c63be5216beb1f4cd9a61f6f493afe.tar.gz Common-Interface-Project-72341b22d2c63be5216beb1f4cd9a61f6f493afe.tar.bz2 Common-Interface-Project-72341b22d2c63be5216beb1f4cd9a61f6f493afe.zip |
disable useEffect in selenium
-rw-r--r-- | blocks/eda-frontend/src/components/SchematicEditor/ToolbarExtension.js | 19 | ||||
-rw-r--r-- | blocks/eda-frontend/src/redux/saveSchematicSlice.js | 3 | ||||
-rw-r--r-- | blocks/eda-frontend/src/static/gallery/gallery10.png | bin | 56145 -> 56135 bytes | |||
-rw-r--r-- | blocks/eda-frontend/src/static/gallery/gallery43.png | bin | 54139 -> 54148 bytes | |||
-rw-r--r-- | blocks/eda-frontend/src/static/gallery/gallery65.png | bin | 47224 -> 47213 bytes | |||
-rw-r--r-- | blocks/eda-frontend/src/static/gallery/gallery69.png | bin | 43168 -> 43211 bytes |
6 files changed, 12 insertions, 10 deletions
diff --git a/blocks/eda-frontend/src/components/SchematicEditor/ToolbarExtension.js b/blocks/eda-frontend/src/components/SchematicEditor/ToolbarExtension.js index 17cfbc18..a2b01666 100644 --- a/blocks/eda-frontend/src/components/SchematicEditor/ToolbarExtension.js +++ b/blocks/eda-frontend/src/components/SchematicEditor/ToolbarExtension.js @@ -355,7 +355,7 @@ export function ScriptScreen ({ isOpen, onClose }) { const scriptDump = useSelector(state => state.saveSchematic.scriptDump) const title = useSelector(state => state.saveSchematic.title) const showDot = useSelector(state => state.saveSchematic.showDot) - const fetchComplete = useSelector((state) => state.saveSchematic.fetchComplete) + const hasScript = useSelector((state) => state.saveSchematic.hasScript) const dispatch = useDispatch() const [result, setResult] = useState('No output yet...') const [variables, setVariables] = useState([]) @@ -397,14 +397,17 @@ export function ScriptScreen ({ isOpen, onClose }) { }, [dispatch, prepareScriptNetlist, scriptDump]) useEffect(() => { - if (fetchComplete) { - const timer = setTimeout(() => { - executeScript() - }, 1000) - - return () => clearTimeout(timer) + const isSelenium = typeof navigator !== 'undefined' && navigator.webdriver === true + if (isSelenium || !hasScript) { + return } - }, [executeScript, fetchComplete]) + + const timer = setTimeout(() => { + executeScript() + }, 1000) + + return () => clearTimeout(timer) + }, [executeScript, hasScript]) async function netlistConfig (file, type) { const formData = new FormData() diff --git a/blocks/eda-frontend/src/redux/saveSchematicSlice.js b/blocks/eda-frontend/src/redux/saveSchematicSlice.js index 282b0b57..b805211d 100644 --- a/blocks/eda-frontend/src/redux/saveSchematicSlice.js +++ b/blocks/eda-frontend/src/redux/saveSchematicSlice.js @@ -236,8 +236,7 @@ const saveSchematicSlice = createSlice({ state.xmlData = action.payload.data_dump state.scriptDump = action.payload.script_dump state.showDot = action.payload.script_dump !== '' - state.fetchComplete = action.payload.script_dump !== '' - // state.showDot = true + state.hasScript = action.payload.script_dump !== '' }) .addCase(fetchDiagram.rejected, (state) => { state.isLoading = false diff --git a/blocks/eda-frontend/src/static/gallery/gallery10.png b/blocks/eda-frontend/src/static/gallery/gallery10.png Binary files differindex 941e2080..c67a70f4 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery10.png +++ b/blocks/eda-frontend/src/static/gallery/gallery10.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery43.png b/blocks/eda-frontend/src/static/gallery/gallery43.png Binary files differindex d395e041..826ed34e 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery43.png +++ b/blocks/eda-frontend/src/static/gallery/gallery43.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery65.png b/blocks/eda-frontend/src/static/gallery/gallery65.png Binary files differindex acbbc113..1b4d8a5f 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery65.png +++ b/blocks/eda-frontend/src/static/gallery/gallery65.png diff --git a/blocks/eda-frontend/src/static/gallery/gallery69.png b/blocks/eda-frontend/src/static/gallery/gallery69.png Binary files differindex fbb07cac..097550ec 100644 --- a/blocks/eda-frontend/src/static/gallery/gallery69.png +++ b/blocks/eda-frontend/src/static/gallery/gallery69.png |