Skip to content

Commit

Permalink
Merge branch 'dev' into fix/formula-xlookup
Browse files Browse the repository at this point in the history
  • Loading branch information
lumixraku authored Dec 9, 2024
2 parents 0af6d86 + c9c1e5d commit 313acb6
Show file tree
Hide file tree
Showing 11 changed files with 122 additions and 101 deletions.
3 changes: 3 additions & 0 deletions common/shared/bin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ if (command === 'build') {
if (args.includes('--cleanup')) {
options.cleanup = true;
}
if (args.includes('--nodeFirst')) {
options.nodeFirst = true;
}

build(options);
}
11 changes: 10 additions & 1 deletion common/shared/vite/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -143,6 +143,12 @@ export interface IBuildOptions {
* @default false
*/
cleanup?: boolean;

/**
* Condition to build node first
* @default false
*/
nodeFirst?: boolean;
}

export function remove() {
Expand All @@ -159,7 +165,7 @@ export function remove() {
}

export async function build(options?: IBuildOptions) {
const { skipUMD = false, cleanup = false } = options ?? {};
const { skipUMD = false, cleanup = false, nodeFirst = false } = options ?? {};

if (cleanup) {
remove();
Expand Down Expand Up @@ -195,6 +201,9 @@ export async function build(options?: IBuildOptions) {
build: {
target: 'chrome70',
},
resolve: {
conditions: nodeFirst ? ['node', 'default'] : undefined,
},
define: {
'process.env.NODE_ENV': JSON.stringify('production'),
'process.env.BUILD_TIMESTAMP': JSON.stringify(Math.floor(Date.now() / 1000)),
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 1 addition & 14 deletions e2e/visual-comparison/sheets/sheets-visual-comparison.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ test('diff default sheet toolbar', async () => {
await page.waitForTimeout(2000);

await page.evaluate(() => window.E2EControllerAPI.loadDefaultSheet());
await page.waitForTimeout(8000);
await page.waitForTimeout(2000);

const filename = generateSnapshotName('default-sheet-fullpage');
const screenshot = await page.screenshot({
Expand Down Expand Up @@ -75,7 +75,6 @@ test('diff demo sheet content', async ({ page }) => {
const filename = generateSnapshotName('demo-sheet');
const screenshot = await page.locator(SHEET_MAIN_CANVAS_ID).screenshot();
await expect(screenshot).toMatchSnapshot(filename, { maxDiffPixels: 5 });
await page.waitForTimeout(2000);
expect(errored).toBeFalsy();
});

Expand All @@ -100,9 +99,6 @@ test('diff merged cells rendering', async () => {
const filename = generateSnapshotName('mergedCellsRendering');
const screenshot = await page.locator(SHEET_MAIN_CANVAS_ID).screenshot();
await expect(screenshot).toMatchSnapshot(filename, { maxDiffPixels: 5 });

await page.waitForTimeout(2000);
await browser.close();
});
test('diff merged cells rendering after scrolling', async () => {
const browser = await chromium.launch({
Expand Down Expand Up @@ -164,9 +160,6 @@ test('diff merged cells rendering after scrolling', async () => {
const filename = generateSnapshotName('mergedCellsRenderingScrolling');
const screenshot = await page.locator(SHEET_MAIN_CANVAS_ID).screenshot();
await expect(screenshot).toMatchSnapshot(filename, { maxDiffPixels: 5 });

await page.waitForTimeout(2000);
await browser.close();
});

/**
Expand All @@ -190,9 +183,6 @@ test('diff sheet default style rendering', async () => {
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();
});

test('diff facade sheet hooks', async () => {
Expand Down Expand Up @@ -226,7 +216,4 @@ test('diff facade sheet hooks', async () => {
const filename = generateSnapshotName('facade-sheet-hooks');
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
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.
Loading

0 comments on commit 313acb6

Please sign in to comment.