@ssml-builder-js/ssml-editor-react 2.8.1 → 2.9.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -571,6 +571,19 @@ describe("SsmlEditor toolbar menus", () => {
571
571
  });
572
572
 
573
573
  describe("SsmlEditor props", () => {
574
+ it("renders the structured visual editor and exposes formatting controls", async () => {
575
+ const user = userEvent.setup();
576
+ const onChange = vi.fn();
577
+ renderEditor({ editMode: "visual", onChange });
578
+
579
+ expect(screen.getByRole("navigation", { name: "SSML structure tree" })).toBeTruthy();
580
+ expect(screen.getByRole("textbox", { name: "Text" })).toBeTruthy();
581
+ await user.click(
582
+ within(screen.getByRole("group", { name: "Apply SSML formatting" })).getByRole("button", { name: "Rate" }),
583
+ );
584
+ expect(onChange).toHaveBeenCalledWith(expect.objectContaining({ version: "1.0" }));
585
+ });
586
+
574
587
  it("updates toolbar and popover text when the locale changes", async () => {
575
588
  const user = userEvent.setup();
576
589
  const { rerender } = renderEditor({ locale: "ja", showToolbarLabels: true });