diff --git a/src/api-legacy/v1/borehole/producer.py b/src/api-legacy/v1/borehole/producer.py index 9dfb4db5f..5de280a42 100644 --- a/src/api-legacy/v1/borehole/producer.py +++ b/src/api-legacy/v1/borehole/producer.py @@ -204,8 +204,6 @@ async def execute(self, request): request['orderby'] = self.user[ 'setting' ]['eboreholetable']['orderby'] - else : - request['orderby'] = 'original_name' if 'direction' in request and ( request['direction'] is not None diff --git a/src/client/cypress/e2e/editor/boreholeTable.cy.js b/src/client/cypress/e2e/editor/boreholeTable.cy.js index dba160fef..08bd9b4c2 100644 --- a/src/client/cypress/e2e/editor/boreholeTable.cy.js +++ b/src/client/cypress/e2e/editor/boreholeTable.cy.js @@ -1,17 +1,5 @@ -import { loginAsAdmin, loginAsEditor, returnToOverview } from "../helpers/testHelpers.js"; -import { - clickOnRowWithText, - showTableAndWaitForData, - verifiyPaginationText, - verifyRowContains, - waitForTableData, -} from "../helpers/dataGridHelpers"; - -function sortBy(headerTextContent) { - cy.get(".MuiDataGrid-columnHeader").contains(headerTextContent).click(); - cy.wait("@edit_list"); - cy.get(".loading-indicator").should("not.exist"); -} +import { loginAsAdmin } from "../helpers/testHelpers.js"; +import { showTableAndWaitForData, sortBy, verifyRowContains } from "../helpers/dataGridHelpers"; describe("Borehole editor table tests", () => { it("Boreholes are displayed in correct order with admin login", () => { diff --git a/src/client/cypress/e2e/helpers/dataGridHelpers.js b/src/client/cypress/e2e/helpers/dataGridHelpers.js index 53d5f0bd5..2cb4dd03e 100644 --- a/src/client/cypress/e2e/helpers/dataGridHelpers.js +++ b/src/client/cypress/e2e/helpers/dataGridHelpers.js @@ -4,8 +4,7 @@ export const verifiyPaginationText = text => { export const sortBy = headerTextContent => { cy.get(".MuiDataGrid-columnHeader").contains(headerTextContent).click(); - cy.wait("@edit_list"); - cy.get(".loading-indicator").should("not.exist"); + waitForTableData(); }; export const verifyRowContains = (rowContent, rowIndex) => {