Skip to content

Commit

Permalink
WIP util edits.
Browse files Browse the repository at this point in the history
  • Loading branch information
ericsnekbytes committed Aug 12, 2022
1 parent 455d5a8 commit 7c00171
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 4 deletions.
6 changes: 3 additions & 3 deletions nbclassic/tests/end_to_end/test_playwright.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@
def test_execute_code(notebook):
# browser = notebook.browser

def clear_outputs():
return notebook.evaluate(
"Jupyter.notebook.clear_all_output();")
# def clear_outputs():
# return notebook.evaluate(
# "Jupyter.notebook.clear_all_output();")

# Execute cell with Javascript API
notebook.edit_cell(index=0, content='a=10; print(a)')
Expand Down
12 changes: 11 additions & 1 deletion nbclassic/tests/end_to_end/utils.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
import datetime
import os
import time
from contextlib import contextmanager
from os.path import join as pjoin

Expand Down Expand Up @@ -131,8 +133,16 @@ def _wait_for_start(self):
# wait_for_selector(self.browser, '.cell')
self.page.locator('.cell')
# TODO: Refactor/fix
import time
time.sleep(10)
# begin = datetime.datetime.now()
# while (datetime.datetime.now() - begin).seconds < 100:
# while not self.is_kernel_running():
# print(self.is_kernel_running())
# time.sleep(.1)
# else:
# print("Kernel running!")
# else:
# raise Exception('Kernel not running!')
# WebDriverWait(self.browser, 10).until(
# lambda drvr: self.is_kernel_running()
# )
Expand Down

0 comments on commit 7c00171

Please sign in to comment.