Skip to content

Commit e3e80e6

Browse files
committed
reporter fro ci removed
1 parent 9e42937 commit e3e80e6

2 files changed

Lines changed: 16 additions & 23 deletions

File tree

src/__test__/utils.ts

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -36,28 +36,23 @@ export async function sleep(waitTimeInMs = 100): Promise<void> {
3636
return new Promise((resolve) => setTimeout(resolve, waitTimeInMs));
3737
}
3838

39-
export const waitForHoverOutline = async (
40-
options?: { timeout?: number; interval?: number }
41-
) => {
42-
const selector = "[data-testid='visual-builder__hover-outline']";
43-
44-
// Query once, reuse on re-check to reduce DOM operations
45-
let element: Element | null = null;
46-
39+
export const waitForHoverOutline = async (options?: {
40+
timeout?: number;
41+
interval?: number;
42+
}) => {
4743
await waitFor(
48-
() => {
49-
element ||= document.querySelector(selector);
50-
expect(element).not.toBeNull();
51-
52-
// Check if it is actually visible (style applied)
53-
expect(element?.getAttribute("style")).not.toBeNull();
54-
},
55-
{
56-
timeout: options?.timeout ?? 1200, // Shorter but safe
57-
interval: options?.interval ?? 20, // Less CPU churn but reliable
58-
}
44+
() => {
45+
const hoverOutline = document.querySelector(
46+
"[data-testid='visual-builder__hover-outline'][style]"
47+
);
48+
expect(hoverOutline).not.toBeNull();
49+
},
50+
{
51+
timeout: options?.timeout ?? 5000, // Default 5s timeout for hover outline to appear
52+
interval: options?.interval ?? 10, // Faster polling: 10ms default
53+
}
5954
);
60-
};
55+
};
6156

6257
export const waitForBuilderSDKToBeInitialized = async (visualBuilderPostMessage: EventManager | undefined) => {
6358
await waitFor(() => {

vitest.config.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,7 @@ export default defineConfig({
5757
// Reduce overhead
5858
css: false,
5959
// Test reporters: Controls how test execution results are displayed/output
60-
reporters: process.env.CI
61-
? ["verbose", "json", "junit", "github-actions"]
62-
: ["verbose", "html"],
60+
reporters: process.env.CI ? [] : ["verbose", "html"],
6361
outputFile: {
6462
json: "./test-results.json",
6563
junit: "./junit.xml",

0 commit comments

Comments
 (0)