fix: test

This commit is contained in:
Nathan
2025-11-26 21:45:46 +08:00
parent 5c8cd97df9
commit fa794e7548

View File

@@ -33,10 +33,9 @@ describe('Editor - Drag and Drop Blocks', () => {
getSource().closest('[data-block-type]').scrollIntoView().should('be.visible').click().then(($sourceBlock) => {
// Use realHover to simulate user interaction which updates elementFromPoint
cy.wrap($sourceBlock).realHover({ position: 'center' });
cy.wait(1000); // Wait for hover controls to appear
// 2. Get the drag handle
cy.get('[data-testid="drag-block"]').should('exist').then(($handle) => {
cy.get('[data-testid="drag-block"]').should('be.visible').then(($handle) => {
const dataTransfer = new DataTransfer();
// 3. Start dragging