Skip to content

Commit d91e11d

Browse files
authored
[fix] Fixed visibility of "Recent Commands" tab on device page
[skip changelog]
1 parent c9463ba commit d91e11d

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

openwisp_controller/connection/static/connection/css/command-inline.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ button[disabled] {
1414
#command_set-group .add-row,
1515
#command_set-group .advanced_editor,
1616
#command_set-group .form-row.field-type,
17-
li.commands {
17+
li.commands:not(.recent) {
1818
display: none !important;
1919
}
2020

openwisp_controller/connection/tests/test_selenium.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,3 +55,15 @@ def test_command_widget_on_device(self):
5555
self.find_element(by=By.CSS_SELECTOR, value="#ow-command-confirm-yes").click()
5656

5757
self.assertEqual(Command.objects.count(), 1)
58+
# TODO: Selenium tests does not support websocket connections.
59+
# Thus, we need to refresh the page. Remove this when support for
60+
# websockets is added.
61+
self.open(path)
62+
self.wait_for_visibility(
63+
By.CSS_SELECTOR,
64+
( # selector for Django 5.2
65+
"#tabs-container li.recent.commands,"
66+
# selector for Django 4.2
67+
" #tabs-container li.recent-commands"
68+
),
69+
)

0 commit comments

Comments
 (0)