Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Playwright does not scroll the monaco editor #54571

Open
ahmaxed opened this issue Apr 29, 2024 · 0 comments
Open

Playwright does not scroll the monaco editor #54571

ahmaxed opened this issue Apr 29, 2024 · 0 comments
Labels
platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc.

Comments

@ahmaxed
Copy link
Member

ahmaxed commented Apr 29, 2024

Is your feature request related to a problem? Please describe.

Some tests that require interactions with elements inside the Monaco editor are failing.
It looks like Playwright fails to scroll to the targeted element if the element is outside of the viewport

Describe alternatives you've considered

The playwright logs show the following errors:

  • retrying click action, attempt
  • waiting 500ms
  • waiting for element to be visible, enabled and stable
  • element is visible, enabled and stable
  • scrolling into view if needed
  • done scrolling
  • <div class="monaco-editor-background textAreaCover li…></div> intercepts pointer events

Additional context

I was able to run the tests successfully by removing the textAreaCover element in the test by adding the following to the top of the tests:

    await page.evaluate(() => {
        const cover = document.querySelector('.monaco-editor-background.textAreaCover');
        if (cover) {
            cover.remove();  // This removes the element from the DOM
        }
    });
@ahmaxed ahmaxed added status: waiting triage This issue needs help from moderators and users to reproduce and confirm its validity and fix. platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. and removed status: waiting triage This issue needs help from moderators and users to reproduce and confirm its validity and fix. labels Apr 29, 2024
@ahmaxed ahmaxed added the type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc. label Apr 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
platform: learn UI side of the client application that needs familiarity with React, Gatsby etc. type: bug Issues that need priority attention. Platform, Curriculum tests (if broken completely), etc.
Projects
None yet
Development

No branches or pull requests

1 participant