Skip to content

Testing Playground breaks Miro #351

Open

Description

@chodorowicz

Bug Report 🐛

Testing Playground breaks Miro

Cannot read properties of undefined (reading 'startAppLoadingStep')

https://community.miro.com/ask-the-community-45/miro-broken-when-used-with-testing-library-extension-9916

CleanShot 2022-09-23 at 09 55 49

To Reproduce ✔️

  1. Install Testing Playground Extension
  2. Access Miro Board

Expected behavior 🤔

Miro should load correctly.

Suggested solution 🔦

Setting the extension to load on click fixes the problem.

Your Environment 💻

  • browser: Chrome
  • os: Mac

Activity

  1. smeijer commented on Sep 26, 2022

    @smeijer
    Member

    It must be one of the patched methods on window that's causing issues. I'm happy to accept a pull that makes it safer by namespacing or even adding it behind an init function. Something like window.initTestingLibrary();

    export function setup(view) {
    // monkey patch `screen` to add testing library to console
    for (const prop of Object.keys(screen)) {
    view.screen[prop] = view.screen[prop] || augmentQuery(screen[prop]);
    view[prop] = view.screen[prop];
    }
    view.getRoles = getRoles;
    view.fireEvent = fireEvent;
    view.getSuggestedQuery = getSuggestedQuery;
    view.within = within;
    view.container = view.document.body;
    view.userEvent = userEvent;
    view.user = userEvent;
    }

  2. keysmashes commented on Mar 15, 2023

    @keysmashes

    It's not that; I commented out the entire setup function and it's still broken.

    The issue occurs when testing-library.js is injected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions