feat: added monaco as editor
This commit is contained in:
@@ -1315,6 +1315,9 @@ defmodule BDS.Desktop.ShellLiveTest do
|
||||
html = render_click(view, "set_post_editor_mode", %{"id" => post.id, "mode" => "markdown"})
|
||||
|
||||
assert html =~ ~s(data-testid="post-editor-content")
|
||||
assert html =~ ~s(data-monaco-language="markdown")
|
||||
assert html =~ ~s(phx-hook="MonacoEditor")
|
||||
refute html =~ "post-editor-markdown-highlight"
|
||||
|
||||
html =
|
||||
view
|
||||
@@ -1436,7 +1439,9 @@ defmodule BDS.Desktop.ShellLiveTest do
|
||||
|
||||
assert html =~ ~s(data-testid="post-editor-content")
|
||||
assert Regex.match?(~r/name="post_editor\[content\]"[^>]*># Heading\s+```elixir\s+IO\.puts\(:ok\)\s+```/s, html)
|
||||
assert html =~ "post-editor-markdown-surface"
|
||||
assert html =~ ~s(data-monaco-language="markdown")
|
||||
assert html =~ ~s(phx-hook="MonacoEditor")
|
||||
refute html =~ "post-editor-markdown-highlight"
|
||||
refute html =~ ~s(phx-value-mode="visual")
|
||||
end
|
||||
|
||||
@@ -1697,7 +1702,9 @@ defmodule BDS.Desktop.ShellLiveTest do
|
||||
})
|
||||
|
||||
assert script_html =~ ~s(class="scripts-view-shell")
|
||||
assert script_html =~ ~s(class="scripts-monaco")
|
||||
assert script_html =~ "scripts-monaco"
|
||||
assert script_html =~ ~s(data-monaco-language="lua")
|
||||
assert script_html =~ ~s(phx-hook="MonacoEditor")
|
||||
refute script_html =~ "Desktop workbench content routed through the Elixir shell."
|
||||
|
||||
template_html =
|
||||
@@ -1709,7 +1716,9 @@ defmodule BDS.Desktop.ShellLiveTest do
|
||||
})
|
||||
|
||||
assert template_html =~ ~s(class="templates-view-shell")
|
||||
assert template_html =~ ~s(class="templates-monaco")
|
||||
assert template_html =~ "templates-monaco"
|
||||
assert template_html =~ ~s(data-monaco-language="liquid")
|
||||
assert template_html =~ ~s(phx-hook="MonacoEditor")
|
||||
refute template_html =~ "Desktop workbench content routed through the Elixir shell."
|
||||
|
||||
chat_html =
|
||||
|
||||
Reference in New Issue
Block a user