Edit in GitHubLog an issue

cc-everywhere


Class: TestEditorContext

Test-specific extension of EditorContext that includes testing utilities. This class should only be used in test environments and not in production code.

Extends

  • EditorContext

Constructors

Constructor

Copied to your clipboard
new TestEditorContext(context): TestEditorContext;

Parameters

ParameterType
context
ActionContext

Returns

TestEditorContext

Inherited from

Copied to your clipboard
EditorContext.constructor

Properties

PropertyModifierTypeInherited from
context
public
ActionContext
EditorContext.context

Methods

sendCustomMessage()

Copied to your clipboard
sendCustomMessage(data): void;

Sends a message to the SDK Agent to update the state of current running workflow.

Parameters

ParameterTypeDescription
data
any
incoming data coming from client to update the workflow. Note - Type of data is limited to what postMessage supports.

Returns

void

Inherited from

Copied to your clipboard
EditorContext.sendCustomMessage

showToast()

Copied to your clipboard
showToast(message, options?): Promise<void>;

This method is for testing purposes only and should not be used in production. This is a demo usecase to shows a toast message by sending a custom message to the agent side. The agent will handle displaying the toast.

Parameters

ParameterTypeDescription
message
string
The message to display in the toast
options?
{ duration?: number; type?: "info" | "error" | "success" | "warning"; }
Optional toast configuration
options.duration?
number
-
options.type?
"info" | "error" | "success" | "warning"
-

Returns

Promise<void>

Promise that resolves when the toast is displayed

  • Privacy
  • Terms of Use
  • Do not sell or share my personal information
  • AdChoices
Copyright © 2025 Adobe. All rights reserved.