Skip to content

Commit

Permalink
[fix] Fixed non-admin view visualizer disappears on resizing the window
Browse files Browse the repository at this point in the history
#193

Fixes #193
  • Loading branch information
Aryamanz29 committed May 28, 2023
1 parent 4310967 commit f02132e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 26 deletions.
4 changes: 4 additions & 0 deletions openwisp_network_topology/static/netjsongraph/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,10 @@
box-sizing: border-box;
}

.djnjg-overlay {
position: fixed !important;
}

.djnjg-overlay .closeBtn {
border: none;
outline: none;
Expand Down
26 changes: 0 additions & 26 deletions openwisp_network_topology/tests/test_selenium.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
from django.conf import settings
from django.contrib.staticfiles.testing import StaticLiveServerTestCase
from django.urls import reverse
from selenium import webdriver
from selenium.webdriver.common.by import By
from selenium.webdriver.common.desired_capabilities import DesiredCapabilities
from selenium.webdriver.support import expected_conditions as EC
from selenium.webdriver.support.ui import WebDriverWait
from swapper import load_model
Expand Down Expand Up @@ -35,29 +32,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(
Expand Down

0 comments on commit f02132e

Please sign in to comment.