Skip to content

Commit

Permalink
feat(sheet): styles on rows and columns (#3816)
Browse files Browse the repository at this point in the history
Co-authored-by: GitHub Actions <[email protected]>
  • Loading branch information
VicKun4937 and actions-user authored Oct 22, 2024
1 parent 65cb1c5 commit 8a27b31
Show file tree
Hide file tree
Showing 29 changed files with 36,913 additions and 84 deletions.
1 change: 1 addition & 0 deletions e2e/e2e.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ export interface IE2EControllerAPI {
loadDefaultDoc(loadTimeout?: number): Promise<void>;
loadDemoSheet(loadTimeout?: number): Promise<void>;
loadMergeCellSheet(loadTimeout?: number): Promise<void>;
loadDefaultStyleSheet(loadTimeout?: number): Promise<void>;
disposeUniver(): Promise<void>;
disposeCurrSheetUnit(disposeTimeout?: number): Promise<void>;
}
Expand Down
26 changes: 26 additions & 0 deletions e2e/visual-comparison/sheets/sheets-visual-comparison.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -166,3 +166,29 @@ test('diff merged cells rendering after scrolling', async () => {
await page.waitForTimeout(2000);
await browser.close();
});

/**
* Aim for default sheet style.
*/
test('diff sheet default style rendering', async () => {
const browser = await chromium.launch({
headless: !!isCI, // Set to false to see the browser window
});
const context = await browser.newContext({
viewport: { width: 1280, height: 1280 },
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.loadDefaultStyleSheet());
await page.waitForTimeout(2000);

const filename = generateSnapshotName('defaultstyle');
const screenshot = await page.locator(SHEET_MAIN_CANVAS_ID).screenshot();
await expect(screenshot).toMatchSnapshot(filename, { maxDiffPixels: 5 });

await page.waitForTimeout(2000);
await browser.close();
});
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

0 comments on commit 8a27b31

Please sign in to comment.