Skip to content
This repository has been archived by the owner on Oct 23, 2023. It is now read-only.

feat: wait for detached aria-busy #10

Closed
wants to merge 1 commit into from
Closed

Conversation

jsfez
Copy link
Contributor

@jsfez jsfez commented Jul 19, 2023

⚠️ Breaking changes

In this PR, the state option for waitForSelector is changed from hidden to detached. Here's the key difference:

  • hidden: The element is detached from DOM, or has no bounding box or visibility set to hidden.
  • detached: The element is not present in DOM.

Why this change?

With Playwright, an empty div isn't considered visible, which is a problem for users using empty div with aria-busy to delay the screenshot capture.

@argos-ci
Copy link

argos-ci bot commented Jul 19, 2023

The latest updates on your projects. Learn more about Argos notifications ↗︎

Build Status Details Updated (UTC)
default (Inspect) ✅ No change detected - Jul 19, 2023, 4:50 AM

@@ -76,7 +76,7 @@ export async function argosScreenshot(
await page.addStyleTag({ content: GLOBAL_STYLES });

// Wait for all busy elements to be loaded
await page.waitForSelector('[aria-busy="true"]', { state: "hidden" });
await page.waitForSelector('[aria-busy="true"]', { state: "detached" });
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not what we want here. A "display: none" aria-busy does not count so "state: hidden" is the good one.

Copy link
Contributor Author

@jsfez jsfez Jul 19, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please read my PR description, above

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, I think this fix is not good. It will break things. But did we have some 0x0px aria-busy in Pivot? I think not.

@jsfez jsfez closed this Jul 19, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants