Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Kino.Test.push_smart_cell_editor_source/2 to test editor changes #468

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions lib/kino/test.ex
Original file line number Diff line number Diff line change
Expand Up @@ -185,4 +185,19 @@ defmodule Kino.Test do
unquote(timeout)
end
end

@doc """
Sends a changed smart cell editor source to a `Kino.JS.Live` kino.

This is going to call `c:Kino.SmartCell.handle_editor_change/2` implementation
in the smart cell module.

## Examples

push_smart_cell_editor_source(kino, "source code")

"""
def push_smart_cell_editor_source(kino, source) do
send(kino.pid, {:editor_source, source})
end
end
Loading