1
it("tick on the project folder in sideNavigation",() => {
    cy.get(":nth-child(5) > :nth-child(1) > .bp3-menu-item > .eccgui-icon").click();
    cy.get("[data-test-id=empty-workspace-create-project-btn]").click();
    cy.get("[data-test-id=project-import-link]").click();
     const filepath = 'xxx.zip'
    cy.get('.uppy-Root').attachFile(filepath);
    cy.get('[data-test-id="startImportProjectBtn"]').click()

});here i am adding the zip folder in cypress but the zip folder is not adding in the drag n drop box

Fody
  • 23,754
  • 3
  • 20
  • 37

1 Answers1

1

The attachFile() command sets up the data (you can check file is attached in dev-tools), but it may not trigger events required to perform upload.

Try adding a change event trigger or an input event trigger.

.attachFile(filepath).trigger('change');
Fody
  • 23,754
  • 3
  • 20
  • 37