Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5d5da84

Browse filesBrowse files
authored
ci(): Disable tests in firefox that have flakyess (#10627)
1 parent ec93b18 commit 5d5da84
Copy full SHA for 5d5da84

File tree

Expand file treeCollapse file tree

2 files changed

+38
-31
lines changed
Filter options
Expand file treeCollapse file tree

2 files changed

+38
-31
lines changed

‎CHANGELOG.md

Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
- chore(): modernize eslint config [#10624](https://github.com/fabricjs/fabric.js/pull/10624)
88
- chore(): enable no-unnecessary-type-assertion lint rule [#10626](https://github.com/fabricjs/fabric.js/pull/10626)
99
- fix(): Remove black border in blur and also align JS with WEBGL blur filtering [#10623](https://github.com/fabricjs/fabric.js/pull/10623)
10+
- chore(): investigate firefox flakyness in vitest [#10627](https://github.com/fabricjs/fabric.js/pull/10627)
1011
- chore(): try to fix firefox vitest test [#10625](https://github.com/fabricjs/fabric.js/pull/10625)
1112
- chore(): Remove old test suite dependencies [#10621](https://github.com/fabricjs/fabric.js/pull/10621)
1213
- chore(): BREAKING remove exports for parseAttributes, parseStyleAttribute, parseFontDeclaration, parsePointsAttribute, parseTransformAttribute and getCSSRules [#10620](https://github.com/fabricjs/fabric.js/pull/10620)

‎src/shapes/Image.spec.ts

Copy file name to clipboardExpand all lines: src/shapes/Image.spec.ts
+37-31Lines changed: 37 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -350,16 +350,22 @@ describe('FabricImage', () => {
350350

351351
expect(image.width, 'width is not changed').toBe(Math.floor(width));
352352
expect(image.height, 'height is not changed').toBe(Math.floor(height));
353-
expect(
354-
// @ts-expect-error -- protected prop
355-
parseFloat(image._filterScalingX.toFixed(1)),
356-
'a new scaling factor is made for x',
357-
).toBe(0.2);
358-
expect(
359-
// @ts-expect-error -- protected prop
360-
parseFloat(image._filterScalingY.toFixed(1)),
361-
'a new scaling factor is made for y',
362-
).toBe(0.2);
353+
await expect
354+
.poll(
355+
() =>
356+
// @ts-expect-error -- protected prop
357+
parseFloat(image._filterScalingX.toFixed(1)),
358+
{ timeout: 2_000 },
359+
)
360+
.toBe(0.2);
361+
await expect
362+
.poll(
363+
() =>
364+
// @ts-expect-error -- protected prop
365+
parseFloat(image._filterScalingY.toFixed(1)),
366+
{ timeout: 2_000 },
367+
)
368+
.toBe(0.2);
363369

364370
const toObject = image.toObject();
365371

@@ -560,33 +566,33 @@ describe('FabricImage', () => {
560566
]);
561567
});
562568

563-
it('setElement resets the webgl cache', async () => {
569+
it('setElement resets the webgl cache', { retry: 2 }, async (ctx) => {
564570
const backend = getFilterBackend();
565571

566-
if (backend instanceof WebGLFilterBackend) {
567-
const image = await createImage();
572+
if (!(backend instanceof WebGLFilterBackend)) {
573+
ctx.skip(true, 'Skip test if WebGL backend is not available');
574+
return;
575+
}
568576

569-
backend.textureCache[image.cacheKey] = backend.createTexture(
570-
backend.gl,
571-
50,
572-
50,
573-
);
577+
const image = await createImage();
574578

575-
expect(
576-
backend.textureCache[image.cacheKey],
577-
'cache should exist',
578-
).toBeTruthy();
579+
backend.textureCache[image.cacheKey] = backend.createTexture(
580+
backend.gl,
581+
50,
582+
50,
583+
);
579584

580-
image.setElement(new Image());
585+
expect(
586+
backend.textureCache[image.cacheKey],
587+
'cache should exist',
588+
).toBeTruthy();
581589

582-
expect(
583-
backend.textureCache[image.cacheKey],
584-
'cache should be cleared',
585-
).toBeUndefined();
586-
} else {
587-
// Skip test if WebGL backend is not available
588-
expect(true).toBe(true);
589-
}
590+
image.setElement(new Image());
591+
592+
expect(
593+
backend.textureCache[image.cacheKey],
594+
'cache should be cleared',
595+
).toBeUndefined();
590596
});
591597

592598
it('fromObject', async () => {

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.