test: Add validation for error handling in custom components and utility function (#6634)

✨ (validate-raise-errors-components.spec.ts): add test to validate error messages on popups when an error is raised in custom components
📝 (add-custom-component.ts): add utility function to add custom components in tests for easier testing and validation of error messages
This commit is contained in:
Cristhian Zanforlin Lousa 2025-02-17 09:07:57 -03:00 • committed by GitHub
commit ca8c5e1e57
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 102 additions and 0 deletions

View file

@ -0,0 +1,12 @@
import { Page } from "playwright/test";
export const addCustomComponent = async (page: Page) => {
let numberOfCustomComponents = 0;
while (numberOfCustomComponents === 0) {
await page.getByTestId("sidebar-custom-component-button").click();
numberOfCustomComponents = await page
.locator('[data-testid="title-Custom Component"]')
.count();
}
};