Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[fix] Fixed non-admin view visualizer disappears on resizing the window #193 #197

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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,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
Expand Down Expand Up @@ -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(
Expand Down
Loading