[Dashboard] Fix page object getPanels method for new grid system (#217812)

## Summary

@umbopepato made me notice that this method was always returning an
empty list of element.
That was due to the selector used was targeting the old grid system.
This PR fixes that using the right selector for the new grid system.

---------

Co-authored-by: kibanamachine <42973632+kibanamachine@users.noreply.github.com>
This commit is contained in:
Marco Liberati 2025-04-10 16:22:27 +02:00 committed by GitHub
parent bc1124118c
commit ff0ba15eaa
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -685,7 +685,7 @@ export class DashboardPageObject extends FtrService {
}
public async getPanels() {
return await this.find.allByCssSelector('.react-grid-item'); // These are gridster-defined elements and classes
return await this.testSubjects.findAll('dashboardPanel');
}
public async getPanelDimensions() {