File tree 2 files changed +26
-1
lines changed
openwisp_controller/config/tests
2 files changed +26
-1
lines changed Original file line number Diff line number Diff line change 13
13
jobs :
14
14
build :
15
15
name : Python==${{ matrix.python-version }} | ${{ matrix.django-version }}
16
- runs-on : ubuntu-24 .04
16
+ runs-on : ubuntu-22 .04
17
17
18
18
services :
19
19
redis :
50
50
uses : actions/setup-python@v5
51
51
with :
52
52
python-version : ${{ matrix.python-version }}
53
+ cache : ' pip'
54
+ cache-dependency-path : |
55
+ **/requirements*.txt
56
+
57
+ - uses : browser-actions/setup-chrome@v1
58
+ # Using a fixed version, see here for more information on why:
59
+ # https://github.com/openwisp/openwisp-controller/issues/902#issuecomment-2266219715
60
+ # TODO: find a solution to allow using recent versions
61
+ with :
62
+ chrome-version : 125
63
+ install-chromedriver : true
64
+ id : setup-chrome
65
+
66
+ - run : |
67
+ ${{ steps.setup-chrome.outputs.chrome-path }} --version
68
+ chromedriver --version
53
69
54
70
- name : Install Dependencies
55
71
id : deps
80
96
coverage xml
81
97
env :
82
98
SELENIUM_HEADLESS : 1
99
+ CHROME_BIN : ${{ steps.setup-chrome.outputs.chrome-path }}
83
100
84
101
- name : Upload Coverage
85
102
if : ${{ success() }}
Original file line number Diff line number Diff line change @@ -144,13 +144,21 @@ def test_unsaved_changes(self):
144
144
self .fail ('Unsaved changes alert displayed without any change' )
145
145
146
146
with self .subTest ('Alert should be displayed after making changes' ):
147
+ # simulate hand gestures
148
+ self .web_driver .find_element (by = By .TAG_NAME , value = 'body' ).click ()
149
+ self .web_driver .find_element (by = By .NAME , value = 'name' ).click ()
150
+ # set name
147
151
self .web_driver .find_element (by = By .NAME , value = 'name' ).send_keys (
148
152
'new.device.name'
149
153
)
154
+ # simulate hand gestures
155
+ self .web_driver .find_element (by = By .TAG_NAME , value = 'body' ).click ()
150
156
self .web_driver .refresh ()
151
157
try :
152
158
WebDriverWait (self .web_driver , 1 ).until (EC .alert_is_present ())
153
159
except TimeoutException :
160
+ for entry in self .web_driver .get_log ('browser' ):
161
+ print (entry )
154
162
self .fail ('Timed out wating for unsaved changes alert' )
155
163
else :
156
164
alert = Alert (self .web_driver )
You can’t perform that action at this time.
0 commit comments