mirror of
https://github.com/toeverything/AFFiNE.git
synced 2026-08-06 03:49:56 +08:00
feat: enable new dnd flag (#9194)
This commit is contained in:
@@ -23,8 +23,8 @@ export const AFFINE_FLAGS = {
|
|||||||
'com.affine.settings.workspace.experimental-features.enable-new-dnd.name',
|
'com.affine.settings.workspace.experimental-features.enable-new-dnd.name',
|
||||||
description:
|
description:
|
||||||
'com.affine.settings.workspace.experimental-features.enable-new-dnd.description',
|
'com.affine.settings.workspace.experimental-features.enable-new-dnd.description',
|
||||||
configurable: isCanaryBuild,
|
configurable: false,
|
||||||
defaultState: false,
|
defaultState: true,
|
||||||
},
|
},
|
||||||
enable_database_full_width: {
|
enable_database_full_width: {
|
||||||
category: 'blocksuite',
|
category: 'blocksuite',
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
/* eslint-disable unicorn/prefer-dom-node-dataset */
|
|
||||||
import { test } from '@affine-test/kit/playwright';
|
import { test } from '@affine-test/kit/playwright';
|
||||||
import { openHomePage } from '@affine-test/kit/utils/load-page';
|
import { openHomePage } from '@affine-test/kit/utils/load-page';
|
||||||
import {
|
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 }) => {
|
test('drag a page card block to another page', async ({ page }) => {
|
||||||
await enableNewDND(page);
|
|
||||||
await clickNewPageButton(page);
|
await clickNewPageButton(page);
|
||||||
await page.waitForTimeout(500);
|
await page.waitForTimeout(500);
|
||||||
await page.keyboard.press('Enter');
|
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 }) => {
|
test('drag a favourite page into blocksuite', async ({ page }) => {
|
||||||
await enableNewDND(page);
|
|
||||||
await clickNewPageButton(page, 'hi from page');
|
await clickNewPageButton(page, 'hi from page');
|
||||||
await page.getByTestId('pin-button').click();
|
await page.getByTestId('pin-button').click();
|
||||||
const pageId = getCurrentDocIdFromUrl(page);
|
const pageId = getCurrentDocIdFromUrl(page);
|
||||||
|
|||||||
Reference in New Issue
Block a user