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:
parent
c902fb9e11
commit
ca8c5e1e57
2 changed files with 102 additions and 0 deletions
12
src/frontend/tests/utils/add-custom-component.ts
Normal file
12
src/frontend/tests/utils/add-custom-component.ts
Normal 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();
|
||||
}
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue