Skip to content

Commit 7ad52d2

Browse files
committed
Update
1 parent f5e2981 commit 7ad52d2

File tree

2 files changed

+21
-5
lines changed

2 files changed

+21
-5
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -369,8 +369,8 @@ jobs:
369369
if [[ "${{ matrix.os }}" == "macos"* ]]; then
370370
python -m pip install PyAutoGUI
371371
python scripts/enable-downloads-safari-github-ci.py
372-
python -u scripts/automated-notebook-run-script.py --driver safari --notebook ${{ matrix.notebook }} --kernel ${{ matrix.kernel }}
373372
echo "Running xeus-cpp in Jupter Lite in Safari"
373+
python -u scripts/automated-notebook-run-script.py --driver safari --notebook ${{ matrix.notebook }} --kernel ${{ matrix.kernel }}
374374
nbdiff notebooks/${{ matrix.notebook }} $HOME/Downloads/${{ matrix.notebook }} --ignore-id --ignore-metadata >> safari_diff.txt
375375
export SAFARI_TESTS_RETURN_VALUE=$( [ -s safari_diff.txt ] && echo 1 || echo 0 )
376376
rm $HOME/Downloads/${{ matrix.notebook }}

scripts/automated-notebook-run-script.py

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,11 +127,20 @@ def main():
127127
if cell_is_waiting_for_input(driver):
128128
print("Cell requesting input")
129129
actions.send_keys("Test_Name").perform()
130-
time.sleep(1.5)
130+
if platform.system() == "Darwin":
131+
time.sleep(1.5)
132+
else:
133+
time.sleep(0.75)
131134
actions.send_keys(Keys.CONTROL, Keys.ENTER)
132-
time.sleep(1.5)
135+
if platform.system() == "Darwin":
136+
time.sleep(1.5)
137+
else:
138+
time.sleep(0.75)
133139
actions.move_to_element(focused_cell).perform()
134-
time.sleep(1.5)
140+
if platform.system() == "Darwin":
141+
time.sleep(1.5)
142+
else:
143+
time.sleep(0.75)
135144
driver.execute_script("""
136145
var el = document.activeElement;
137146
var evt = new KeyboardEvent('keydown', {
@@ -143,8 +152,14 @@ def main():
143152
});
144153
el.dispatchEvent(evt);
145154
""")
155+
if platform.system() == "Darwin":
156+
time.sleep(1.5)
157+
else:
158+
time.sleep(0.75)
159+
if platform.system() == "Darwin":
146160
time.sleep(1.5)
147-
time.sleep(1.5)
161+
else:
162+
time.sleep(0.75)
148163

149164
elif args.driver == "safari":
150165
print("Running all cells using Shift+Enter...")
@@ -161,6 +176,7 @@ def main():
161176
cell_content = "".join([div.text for div in editor_divs]).strip()
162177

163178
if not cell_content:
179+
print("Empty cell reached")
164180
break
165181

166182
if cell_is_waiting_for_input(driver):

0 commit comments

Comments
 (0)