Repository: openwisp/openwisp-network-topology (language: python)

Issue:
[bug] Visualizer disappears on resizing window for published topology
**Steps to replicate**
1. Create a network topology 
2. Open `http:127.0.0.1:8000/topology/` and click on the topology created in above step 
3. Resize the browser window 

**Expected Result**
The topology visualizer appears in the resized window 

**Actual Result**
The webpage becomes blank

https://github.com/openwisp/openwisp-network-topology/assets/32094433/bf88f1e6-31fd-4c5f-a806-7eaf43ee126c


[bug] Visualizer disappears on resizing window for published topology
**Steps to replicate**
1. Create a network topology 
2. Open `http:127.0.0.1:8000/topology/` and click on the topology created in above step 
3. Resize the browser window 

**Expected Result**
The topology visualizer appears in the resized window 

**Actual Result**
The webpage becomes blank

https://github.com/openwisp/openwisp-network-topology/assets/32094433/bf88f1e6-31fd-4c5f-a806-7eaf43ee126c




Discussion / hints:
Remove this workaround after fixing this bug 

https://github.com/openwisp/openwisp-network-topology/blob/8d22f53ea611fa3f50755693a41444f4daba61cf/openwisp_network_topology/tests/test_selenium.py#L38-L59
Remove this workaround after fixing this bug 

https://github.com/openwisp/openwisp-network-topology/blob/8d22f53ea611fa3f50755693a41444f4daba61cf/openwisp_network_topology/tests/test_selenium.py#L38-L59

Fix patch:
diff --git a/openwisp_network_topology/static/netjsongraph/css/style.css b/openwisp_network_topology/static/netjsongraph/css/style.css
index c7dad539..216f7208 100644
--- a/openwisp_network_topology/static/netjsongraph/css/style.css
+++ b/openwisp_network_topology/static/netjsongraph/css/style.css
@@ -62,6 +62,10 @@
     box-sizing: border-box;
 }
 
+.djnjg-overlay {
+    position: fixed !important;
+}
+
 .djnjg-overlay .closeBtn {
     border: none;
     outline: none;


Test patch:
diff --git a/openwisp_network_topology/tests/test_selenium.py b/openwisp_network_topology/tests/test_selenium.py
index 392d14ad..c85cc3a9 100644
--- a/openwisp_network_topology/tests/test_selenium.py
+++ b/openwisp_network_topology/tests/test_selenium.py
@@ -1,13 +1,10 @@
-from django.conf import settings
 from django.contrib.staticfiles.testing import StaticLiveServerTestCase
 from django.urls import reverse
-from selenium import webdriver
 from selenium.common.exceptions import (
     ElementClickInterceptedException,
     TimeoutException,
 )
 from selenium.webdriver.common.by import By
-from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
 from selenium.webdriver.common.keys import Keys
 from selenium.webdriver.support import expected_conditions as EC
 from selenium.webdriver.support.ui import WebDriverWait
@@ -40,29 +37,6 @@ class TestTopologyGraphVisualizer(
     def prefix(self):
         return f'admin:{self.app_label}'
 
-    @classmethod
-    def setUpClass(cls):
-        super().setUpClass()
-        cls.web_driver.quit()
-        # Workaround for https://github.com/openwisp/openwisp-network-topology/issues/193
-        # The "automation" info-bar causes the visualizer to error.
-        # TODO: Remove this when the bug is fixed.
-        chrome_options = webdriver.ChromeOptions()
-        if getattr(settings, 'SELENIUM_HEADLESS', True):
-            chrome_options.add_argument('--headless')
-        chrome_options.add_argument('--window-size=1366,768')
-        chrome_options.add_argument('--ignore-certificate-errors')
-        chrome_options.add_argument('--remote-debugging-port=9222')
-        # Disable the info-bar in chrome browser
-        chrome_options.add_experimental_option("useAutomationExtension", False)
-        chrome_options.add_experimental_option("excludeSwitches", ["enable-automation"])
-        capabilities = DesiredCapabilities.CHROME
-        capabilities['goog:loggingPrefs'] = {'browser': 'ALL'}
-        cls.web_driver = webdriver.Chrome(
-            options=chrome_options,
-            desired_capabilities=capabilities,
-        )
-
     def setUp(self):
         org = self._create_org()
         self.admin = self._create_admin(