Skip to content

Commit

Permalink
Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
MiraGeowerkstatt committed Aug 14, 2024
1 parent 34ce9c4 commit add9887
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 18 deletions.
2 changes: 0 additions & 2 deletions src/api-legacy/v1/borehole/producer.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
16 changes: 2 additions & 14 deletions src/client/cypress/e2e/editor/boreholeTable.cy.js
Original file line number Diff line number Diff line change
@@ -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", () => {
Expand Down
3 changes: 1 addition & 2 deletions src/client/cypress/e2e/helpers/dataGridHelpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) => {
Expand Down

0 comments on commit add9887

Please sign in to comment.