Skip to content

Commit

Permalink
feat: fix load check
Browse files Browse the repository at this point in the history
  • Loading branch information
hexf00 committed Nov 20, 2024
1 parent 06c7a13 commit 7a161a5
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 24 deletions.
16 changes: 3 additions & 13 deletions tests/sheets/facade-set-values.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ const createTest = (row: number, col: number) => {
}, jsHandle);

await page.waitForFunction(() => {
return document.querySelectorAll('canvas')[2]?.getContext('2d')?.getImageData(70, 40, 10, 10).data.find((d: number) => d !== 0);
return document.querySelector('.univer-workbench-container-canvas .univer-render-canvas')?.getContext('2d')?.getImageData(50, 30, 70, 14).data.find((d: number) => d !== 0);
});
})

Expand All @@ -64,15 +64,5 @@ const createTest = (row: number, col: number) => {
})
};

// createTest(10, 100000);
// createTest(100, 10000);
// createTest(1000, 1000);
// createTest(10000, 100);
createTest(100000, 10);

// createTest(10, 1000000);
// createTest(100, 100000);
// createTest(1000, 10000);
// createTest(10000, 1000);
// createTest(100000, 100);
// createTest(1000000, 10);
createTest(10000, 100);
createTest(100000, 10);
12 changes: 1 addition & 11 deletions tests/sheets/raw-load-data.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -193,24 +193,14 @@ const createTest = (row: number, col: number) => {
}, jsHandle);

await page.waitForFunction(() => {
return document.querySelectorAll('canvas')[2]?.getContext('2d')?.getImageData(70, 40, 10, 10).data.find((d: number) => d !== 0);
return document.querySelector('.univer-workbench-container-canvas .univer-render-canvas')?.getContext('2d')?.getImageData(50, 30, 70, 14).data.find((d: number) => d !== 0);
});
})
})
};


// createTest(10, 100000);
createTest(100, 10000);
createTest(1000, 1000);
createTest(10000, 100);
createTest(100000, 10);

// createTest(10, 1000000);
// createTest(100, 100000);
createTest(1000, 10000);
createTest(10000, 1000);
createTest(100000, 100);
createTest(1000000, 10);
createTest(1000000, 50);
createTest(1000000, 20);

0 comments on commit 7a161a5

Please sign in to comment.