Skip to main content

Testing

Once you have the initial design and logic for your widget, you’ll want to stress test it across various scenarios to make sure it works properly. This includes not only focusing on the core use cases of your widget, but also considering situations that you didn't expect.

Here are some helpful things to keep in mind as you test & debug your widget:

  • What are the core use cases of your widget? Make sure to test those extensively.
  • What are ways users might incorrectly use your widget? Test those too.
  • Have you loaded all the data your widget needs?
    • Do you need to access pages other than the user's current page?
  • If your widget is only meant to do something if certain type of nodes are selected, what happens when:
    • The user has nothing selected?
    • The wrong type of node is selected?
    • Multiple things are selected?
    • A component is selected? Are you alright with the change propagating to potentially hundreds of instances?
  • If your widget modifies a text layer, what happens if the font for that text layer is missing?
  • If your widget can edit a component, what happens if the component comes from the team library?
  • If your widget executes long-running tasks, note that the user can unexpected stop your widget by:
    • Deleting your widget
    • Interacting with another widget
    • Leaving the file
    • Losing internet connection/going offline
  • If your widget stays open for a while:
    • What happens if the user deletes a node you currently have a reference to?
    • What happens a multiplayer event causes changes in the document?
  • If your widget is concerned with the position of layers, what happens if something is rotated?
  • If your widget can traverse large parts of the document (e.g. search for a node), what happens if the document is very large?
  • If you're using a bundler, have you checked the output size of your widget? Could you make it smaller (e.g. by running your bundler in release mode)?
  • Widgets are highly collaborative — make sure to test your widget with multiple people. If you can’t do that, open a file that contains your widget in two windows of the Figma Desktop app.
  • Keep in mind that FigJam for iPad is available. Is your widget usable on a smaller screen like an iPad?

Read more about our widget review guidelines.