From ac213d4b06ef26f2f98d67ac729d52ad4de2c687 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 6 Mar 2024 08:12:59 +0100 Subject: [PATCH] fixup! feat: added file action to Files to import file into Tables --- cypress/e2e/tables-import.cy.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cypress/e2e/tables-import.cy.js b/cypress/e2e/tables-import.cy.js index 81b9dd00c..320e13f13 100644 --- a/cypress/e2e/tables-import.cy.js +++ b/cypress/e2e/tables-import.cy.js @@ -5,6 +5,8 @@ describe('Import csv', () => { before(function() { cy.createRandomUser().then(user => { localUser = user + cy.login(localUser) + cy.uploadFile('test-import.csv', 'text/csv') }) }) @@ -14,7 +16,6 @@ describe('Import csv', () => { }) it('Import csv from Files', () => { - cy.uploadFile('test-import.csv', 'text/csv') cy.loadTable('Tutorial') cy.clickOnTableThreeDotMenu('Import') cy.get('.modal__content button').contains('Select from Files').click() @@ -53,19 +54,18 @@ describe('Import csv from Files file action', () => { before(function() { cy.createRandomUser().then(user => { localUser = user + cy.login(localUser) + cy.uploadFile('test-import.csv', 'text/csv') }) }) beforeEach(function() { cy.login(localUser) cy.visit('apps/files/files') - cy.uploadFile('test-import.csv', 'text/csv') }) it('Import to new table', () => { - cy.reload() - - cy.get('[data-cy-files-list-row-actions] .action-item button').click() + cy.get('[data-cy-files-list-row-name="test-import.csv"] [data-cy-files-list-row-actions] .action-item button').click() cy.get('[data-cy-files-list-row-action="import-to-tables"]').click() cy.intercept({ method: 'POST', url: '**/apps/tables/import/table/*'}).as('importNewTableReq') @@ -81,7 +81,7 @@ describe('Import csv from Files file action', () => { }) it('Import to existing table', () => { - cy.get('[data-cy-files-list-row-actions] .action-item button').click() + cy.get('[data-cy-files-list-row-name="test-import.csv"] [data-cy-files-list-row-actions] .action-item button').click() cy.get('[data-cy-files-list-row-action="import-to-tables"]').click() cy.get('[data-cy="importAsNewTableSwitch"]').click()