From e13f9d3885fd50c9dcedb361f4a7c2ea1ff9997c Mon Sep 17 00:00:00 2001 From: Saul-Mirone Date: Wed, 18 Dec 2024 05:53:08 +0000 Subject: [PATCH] feat: enable new dnd flag (#9194) --- .../common/infra/src/modules/feature-flag/constant.ts | 4 ++-- tests/affine-local/e2e/drag-page.spec.ts | 10 ---------- 2 files changed, 2 insertions(+), 12 deletions(-) diff --git a/packages/common/infra/src/modules/feature-flag/constant.ts b/packages/common/infra/src/modules/feature-flag/constant.ts index b0f1c421adc61..fda9046413cdc 100644 --- a/packages/common/infra/src/modules/feature-flag/constant.ts +++ b/packages/common/infra/src/modules/feature-flag/constant.ts @@ -23,8 +23,8 @@ export const AFFINE_FLAGS = { 'com.affine.settings.workspace.experimental-features.enable-new-dnd.name', description: 'com.affine.settings.workspace.experimental-features.enable-new-dnd.description', - configurable: isCanaryBuild, - defaultState: false, + configurable: false, + defaultState: true, }, enable_database_full_width: { category: 'blocksuite', diff --git a/tests/affine-local/e2e/drag-page.spec.ts b/tests/affine-local/e2e/drag-page.spec.ts index 133515c35353d..961ced37f3d2f 100644 --- a/tests/affine-local/e2e/drag-page.spec.ts +++ b/tests/affine-local/e2e/drag-page.spec.ts @@ -1,4 +1,3 @@ -/* eslint-disable unicorn/prefer-dom-node-dataset */ import { test } from '@affine-test/kit/playwright'; import { openHomePage } from '@affine-test/kit/utils/load-page'; import { @@ -244,15 +243,7 @@ test('drag a page link in editor to favourites', async ({ page }) => { ); }); -async function enableNewDND(page: Page) { - await page.evaluate(() => { - // @ts-expect-error - window.currentEditor.doc.awarenessStore.setFlag('enable_new_dnd', true); - }); -} - test('drag a page card block to another page', async ({ page }) => { - await enableNewDND(page); await clickNewPageButton(page); await page.waitForTimeout(500); await page.keyboard.press('Enter'); @@ -303,7 +294,6 @@ test('drag a page card block to another page', async ({ page }) => { }); test('drag a favourite page into blocksuite', async ({ page }) => { - await enableNewDND(page); await clickNewPageButton(page, 'hi from page'); await page.getByTestId('pin-button').click(); const pageId = getCurrentDocIdFromUrl(page);