-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #29572 from appsmithorg/release
13/12 Daily Promotion
- Loading branch information
Showing
21 changed files
with
140 additions
and
123 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
app/client/cypress/e2e/Regression/ClientSide/BugTests/SortedSchema_Spec.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import { | ||
assertHelper, | ||
dataSources, | ||
} from "../../../../support/Objects/ObjectsCore"; | ||
|
||
describe("Bug 29059 - Datasource structure schema should be sorted", () => { | ||
it("1. Postgres schema should be in a sorted order", () => { | ||
dataSources.CreateDataSource("Postgres"); | ||
assertHelper | ||
.WaitForNetworkCall(`@getDatasourceStructure`) | ||
.then((response) => { | ||
const tables: { name: string }[] = response?.body.data?.tables || []; | ||
const isCorrectlyOrdered = tables.every((table, index, array) => { | ||
if (index === 0) { | ||
return true; // The first element is always considered sorted | ||
} else { | ||
// Compare current and previous elements in a case-insensitive manner | ||
return ( | ||
table.name.localeCompare(array[index - 1].name, undefined, { | ||
sensitivity: "base", | ||
}) >= 0 | ||
); | ||
} | ||
}); | ||
expect(isCorrectlyOrdered).to.equal(true); | ||
}); | ||
}); | ||
it("2. Mysql schema should be in a sorted order", () => { | ||
dataSources.CreateDataSource("MySql"); | ||
assertHelper | ||
.WaitForNetworkCall(`@getDatasourceStructure`) | ||
.then((response) => { | ||
const tables: { name: string }[] = response?.body.data?.tables || []; | ||
const isCorrectlyOrdered = tables.every((table, index, array) => { | ||
if (index === 0) { | ||
return true; // The first element is always considered sorted | ||
} else { | ||
// Compare current and previous elements in a case-insensitive manner | ||
return ( | ||
table.name.localeCompare(array[index - 1].name, undefined, { | ||
sensitivity: "base", | ||
}) >= 0 | ||
); | ||
} | ||
}); | ||
expect(isCorrectlyOrdered).to.equal(true); | ||
}); | ||
}); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.