Skip to content

test: Add RenderToMarkup and RenderObjectToMarkup #5124

@flimzy

Description

@flimzy

Checklist

  • I have searched the issue tracker for open issues that relate to the same feature, before opening a new one.
  • This issue only relates to a single feature. I will open new issues for any other features.

Is your feature request related to a problem?

I would like versions of AssertRendersToMarkup and AssertObjectRendersToMarkup that don't do any assertions, or use golden files. I'd like them just to return the markup version of the object/canvas, which I can then do my own assertions on.

This would give me the flexibility to use regular expressions, or other checks that don't consider the entire output.

Is it possible to construct a solution with the existing API?

No.

Describe the solution you'd like to see.

I propose the following additional functions be added to fyne.io/fyne/v2/test

RenderToMarkup(c fyne.Canvas) string
RenderObjectToMarkup(o fyne.CanvasObject) string

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions