MCPcopy Create free account
hub / github.com/openclaw/gogcli / TestSlidesElementCreateShape

Function TestSlidesElementCreateShape

internal/cmd/slides_element_test.go:37–64  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

35}
36
37func TestSlidesElementCreateShape(t *testing.T) {
38 request := captureSlidesElementRequest(t, &SlidesElementCreateShapeCmd{
39 PresentationID: "pres1",
40 SlideID: "slide1",
41 Type: "round-rectangle",
42 X: 12,
43 Y: 24,
44 Width: 200,
45 Height: 80,
46 Unit: "PT",
47 ObjectID: "shape_123",
48 }, &RootFlags{Account: "a@b.com"})
49
50 create := request.CreateShape
51 if create == nil {
52 t.Fatalf("expected createShape, got %+v", request)
53 }
54 if create.ObjectId != "shape_123" || create.ShapeType != "ROUND_RECTANGLE" {
55 t.Fatalf("unexpected createShape: %+v", create)
56 }
57 properties := create.ElementProperties
58 if properties.PageObjectId != "slide1" || properties.Size.Width.Magnitude != 200 || properties.Size.Height.Magnitude != 80 {
59 t.Fatalf("unexpected element properties: %+v", properties)
60 }
61 if properties.Transform.TranslateX != 12 || properties.Transform.TranslateY != 24 || properties.Transform.ScaleX != 1 || properties.Transform.ScaleY != 1 {
62 t.Fatalf("unexpected transform: %+v", properties.Transform)
63 }
64}
65
66func TestSlidesElementCreateLinePreservesZeroExtent(t *testing.T) {
67 properties := slidesElementProperties("slide1", 0, 0, 120, 0, "PT")

Callers

nothing calls this directly

Calls 1

Tested by

no test coverage detected