feat: monaco editor toegevoegd voor py bestanden
This commit is contained in:
Binary file not shown.
Binary file not shown.
@@ -67,6 +67,19 @@ class EditApiGoldenTest(unittest.TestCase):
|
||||
self.assertFalse(body["truncated"])
|
||||
self.assertIn("modified", body)
|
||||
|
||||
def test_edit_view_python_success(self) -> None:
|
||||
file_path = self.root / "script.py"
|
||||
file_path.write_text("print('hello')\n", encoding="utf-8")
|
||||
|
||||
response = self._request("GET", "/api/files/view", params={"path": "storage1/script.py", "for_edit": "true"})
|
||||
|
||||
self.assertEqual(response.status_code, 200)
|
||||
body = response.json()
|
||||
self.assertEqual(body["path"], "storage1/script.py")
|
||||
self.assertEqual(body["name"], "script.py")
|
||||
self.assertEqual(body["content_type"], "text/x-python")
|
||||
self.assertEqual(body["content"], "print('hello')\n")
|
||||
|
||||
def test_save_success(self) -> None:
|
||||
file_path = self.root / "notes.txt"
|
||||
file_path.write_text("hello", encoding="utf-8")
|
||||
|
||||
@@ -156,6 +156,7 @@ class UiSmokeGoldenTest(unittest.TestCase):
|
||||
self.assertIn('function openRenamePopup()', app_js)
|
||||
self.assertIn('document.getElementById("rename-btn").onclick = openRenamePopup;', app_js)
|
||||
self.assertIn('return triggerActionButton("rename-btn");', app_js)
|
||||
self.assertIn('".py"', app_js)
|
||||
self.assertIn('function openVideoViewer()', app_js)
|
||||
self.assertIn('function openPdfViewer()', app_js)
|
||||
self.assertIn('async function loadMonacoModule()', app_js)
|
||||
|
||||
Reference in New Issue
Block a user