diff --git a/ui/cypress/tests/assetManagement/createAsset.spec.ts b/ui/cypress/tests/assetManagement/createAsset.spec.ts index 1ff47dfb32..fb5c529013 100644 --- a/ui/cypress/tests/assetManagement/createAsset.spec.ts +++ b/ui/cypress/tests/assetManagement/createAsset.spec.ts @@ -89,9 +89,36 @@ describe('Creates a new adapter, add to assets and export assets', () => { cy.dataCy('import-button').click(); // Check if import was successful + cy.visit('#/connect'); + cy.dataCy('adapters-table').children().should('have.length', 1); cy.visit('#/assets'); cy.dataCy('assets-table').should('have.length', 1); + + // Export Asset via Assets page + cy.dataCy('download').click(); + + // Delete Adapter and Asset + cy.visit('#/connect'); + cy.dataCy('delete-adapter').click(); + cy.dataCy('delete-adapter-confirmation').click(); + + cy.visit('#/assets'); + cy.dataCy('delete').click(); + + // Import downloaded Asset + cy.visit('#/configuration/export'); + cy.dataCy('import-application-data-button').click(); + cy.get('input[type="file"]').selectFile( + 'cypress/downloads/assetExport.zip', + { force: true }, + ); + cy.dataCy('next-import-button').click(); + cy.dataCy('import-button').click(); + + // Check if import was successful cy.visit('#/connect'); cy.dataCy('adapters-table').children().should('have.length', 1); + cy.visit('#/assets'); + cy.dataCy('assets-table').should('have.length', 1); }); }); diff --git a/ui/src/app/assets/components/asset-overview/asset-overview.component.html b/ui/src/app/assets/components/asset-overview/asset-overview.component.html index 8e73c95bd8..d08ce9d0e8 100644 --- a/ui/src/app/assets/components/asset-overview/asset-overview.component.html +++ b/ui/src/app/assets/components/asset-overview/asset-overview.component.html @@ -198,6 +198,18 @@