-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: MySQL & MSSQL query generator (#24516)
Co-authored-by: Aishwarya UR <aishwarya@appsmith.com>
- Loading branch information
1 parent
820beae
commit f24ecc2
Showing
14 changed files
with
1,623 additions
and
7 deletions.
There are no files selected for viewing
108 changes: 108 additions & 0 deletions
108
app/client/cypress/e2e/Regression/ClientSide/OneClickBinding/TableWidget/mysql_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,108 @@ | ||
import oneClickBindingLocator from "../../../../../locators/OneClickBindingLocator"; | ||
import { | ||
agHelper, | ||
assertHelper, | ||
dataSources, | ||
draggableWidgets, | ||
entityExplorer, | ||
table, | ||
} from "../../../../../support/Objects/ObjectsCore"; | ||
import { OneClickBinding } from "../spec_utility"; | ||
|
||
const oneClickBinding = new OneClickBinding(); | ||
|
||
// TODO: Adds two rows on click of save row will debug and fix this in a different PR - Sangeeth | ||
describe.skip("Table widget one click binding feature", () => { | ||
it("1.should check that queries are created and bound to table widget properly", () => { | ||
entityExplorer.DragDropWidgetNVerify(draggableWidgets.TABLE, 400); | ||
|
||
dataSources.CreateDataSource("MySql"); | ||
|
||
cy.get("@dsName").then((dsName) => { | ||
entityExplorer.NavigateToSwitcher("Widgets"); | ||
|
||
entityExplorer.SelectEntityByName("Table1", "Widgets"); | ||
|
||
oneClickBinding.ChooseAndAssertForm( | ||
`${dsName}`, | ||
dsName, | ||
"configs", | ||
"configName", | ||
); | ||
}); | ||
|
||
agHelper.GetNClick(oneClickBindingLocator.connectData); | ||
|
||
assertHelper.AssertNetworkStatus("@postExecute"); | ||
|
||
agHelper.Sleep(2000); | ||
|
||
[ | ||
"id", | ||
"configName", | ||
"configJson", | ||
"configVersion", | ||
"updatedAt", | ||
"updatedBy", | ||
].forEach((column) => { | ||
agHelper.AssertElementExist(table._headerCell(column)); | ||
}); | ||
|
||
agHelper.GetNClick(table._addNewRow, 0, true); | ||
|
||
table.EditTableCell(0, 1, "One Click Config", false); | ||
|
||
table.UpdateTableCell(0, 2, `{{}"key":"oneClick"}`); | ||
table.UpdateTableCell(0, 3, 36); | ||
table.UpdateTableCell(0, 4, "2023-07-03 15:30:00", false, true); | ||
|
||
agHelper.Sleep(2000); | ||
|
||
agHelper.GetNClick(table._saveNewRow, 0, true); | ||
|
||
assertHelper.AssertNetworkStatus("@postExecute"); | ||
|
||
agHelper.TypeText(table._searchInput, "One Click Config"); | ||
|
||
assertHelper.AssertNetworkStatus("@postExecute"); | ||
|
||
agHelper.AssertElementExist(table._bodyCell("One Click Config")); | ||
|
||
agHelper.Sleep(1000); | ||
|
||
table.EditTableCell(0, 1, "Bindings", false); | ||
table.EditTableCell(0, 4, "2023-07-03 15:30:00", false); | ||
|
||
agHelper.Sleep(1000); | ||
|
||
(cy as any).AssertTableRowSavable(6, 0); | ||
|
||
(cy as any).saveTableRow(6, 0); | ||
|
||
assertHelper.AssertNetworkStatus("@postExecute"); | ||
|
||
assertHelper.AssertNetworkStatus("@postExecute"); | ||
|
||
agHelper.Sleep(500); | ||
|
||
agHelper.ClearTextField(table._searchInput); | ||
|
||
agHelper.TypeText(table._searchInput, "Bindings"); | ||
|
||
assertHelper.AssertNetworkStatus("@postExecute"); | ||
|
||
agHelper.Sleep(2000); | ||
|
||
agHelper.AssertElementExist(table._bodyCell("Bindings")); | ||
|
||
agHelper.ClearTextField(table._searchInput); | ||
|
||
agHelper.TypeText(table._searchInput, "One Click Config"); | ||
|
||
assertHelper.AssertNetworkStatus("@postExecute"); | ||
|
||
agHelper.Sleep(2000); | ||
|
||
agHelper.AssertElementAbsence(table._bodyCell("One Click Config")); | ||
}); | ||
}); |
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.