Skip to content

Commit

Permalink
test: set dpr to 2
Browse files Browse the repository at this point in the history
  • Loading branch information
lumixraku committed Oct 10, 2024
1 parent 05c89f4 commit 13d8cd2
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions e2e/visual-comparison/sheet/sheets-visual-comparison.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,22 @@ test('diff default sheet content', async ({ page }) => {

await expect(page).toHaveScreenshot(generateSnapshotName('default-sheet'), { maxDiffPixels: 5 });
});
const isCI = !!process.env.CI;

test('diff demo sheet content', async () => {
const browser = await chromium.launch({
headless: true, //!!CI, // Set to false to see the browser window
headless: !!isCI, // Set to false to see the browser window
});
const context = await browser.newContext({
viewport: { width: 1280, height: 1280 },
deviceScaleFactor: 1, // Set your desired DPR
deviceScaleFactor: 2, // Set your desired DPR
});
const page = await context.newPage();
await page.goto('http://localhost:3000/sheets/');
await page.waitForTimeout(2000);

await page.evaluate(() => window.E2EControllerAPI.loadDemoSheet());
await page.waitForTimeout(2000);
await page.waitForTimeout(5000);

await expect(page).toHaveScreenshot(generateSnapshotName('demo-sheet'), { maxDiffPixels: 5 });
});
Expand All @@ -50,11 +51,11 @@ test('diff demo sheet content', async () => {
*/
test('diff merged cells rendering', async () => {
const browser = await chromium.launch({
headless: true, //!!CI, // Set to false to see the browser window
headless: !!isCI, // Set to false to see the browser window
});
const context = await browser.newContext({
viewport: { width: 1280, height: 1280 },
deviceScaleFactor: 1, // Set your desired DPR
deviceScaleFactor: 2, // Set your desired DPR
});
const page = await context.newPage();
await page.goto('http://localhost:3000/sheets/');
Expand All @@ -67,14 +68,13 @@ test('diff merged cells rendering', async () => {

await browser.close();
});
const isCI = !!process.env.CI;
test('diff merged cells rendering after scrolling', async ({}) => {
test('diff merged cells rendering after scrolling', async () => {
const browser = await chromium.launch({
headless: true, //!!isCI, // Set to false to see the browser window in local
headless: !!isCI, // Set to false to see the browser window in local
});
const context = await browser.newContext({
viewport: { width: 1280, height: 1280 },
deviceScaleFactor: 1, // Set your desired DPR
deviceScaleFactor: 2, // Set your desired DPR
});
const page = await context.newPage();
await page.goto('http://localhost:3000/sheets/');
Expand Down Expand Up @@ -123,7 +123,7 @@ test('diff merged cells rendering after scrolling', async ({}) => {
await dispatchWheelEvent(0, 100, element);
await dispatchWheelEvent(0, -100, element);
});
await page.waitForTimeout(4000);
await page.waitForTimeout(2000);

await expect(page).toHaveScreenshot(generateSnapshotName('mergedCellsRenderingScrolling'), { maxDiffPixels: 5 });

Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 13d8cd2

Please sign in to comment.