Skip to content

Commit

Permalink
feat: enable new dnd flag (#9194)
Browse files Browse the repository at this point in the history
  • Loading branch information
Saul-Mirone committed Dec 18, 2024
1 parent 64b017d commit e13f9d3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 12 deletions.
4 changes: 2 additions & 2 deletions packages/common/infra/src/modules/feature-flag/constant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
10 changes: 0 additions & 10 deletions tests/affine-local/e2e/drag-page.spec.ts
Original file line number Diff line number Diff line change
@@ -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 {
Expand Down Expand Up @@ -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');
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit e13f9d3

Please sign in to comment.