bito-code-review[bot] commented on PR #43487:
URL: https://github.com/apache/superset/pull/43487#issuecomment-5415753946

   <!-- Bito Reply -->
   Yes, scoping the locator to the editor panel or its specific tablist is a 
robust way to avoid ambiguity. You can achieve this by chaining the locator to 
the editor panel container or by using the `tablist` role as a parent scope.
   
   Here is an example of how to scope the locator to the editor panel's tablist:
   
   ```typescript
   async showPalette(): Promise<void> {
     await this.page
       .locator('[data-test="editor-panel"]')
       .getByRole('tablist')
       .getByRole('tab', { name: 'Widgets', exact: true })
       .click();
   }
   ```
   
   This ensures that only the 'Widgets' tab within the editor panel is 
targeted, preventing conflicts with other widgets or tabs elsewhere on the 
dashboard.
   
   **superset-frontend/playwright/pages/DashboardV2Page.ts**
   ```
   async showPalette(): Promise<void> {
       await this.page
         .locator('[data-test="editor-panel"]')
         .getByRole('tablist')
         .getByRole('tab', { name: 'Widgets', exact: true })
         .click();
     }
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to